Fix for crash in gtasks widget

pull/14/head
Sam Bosley 14 years ago
parent 0c2ce67fd4
commit 043beb2b39

@ -223,6 +223,9 @@ public class AndroidUtilities {
*/ */
public static String bundleToSerializedString(Bundle source) { public static String bundleToSerializedString(Bundle source) {
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
if (source == null)
return null;
for(String key : source.keySet()) { for(String key : source.keySet()) {
addSerialized(result, key, source.get(key)); addSerialized(result, key, source.get(key));
} }

@ -169,8 +169,9 @@ abstract public class WidgetConfigActivity extends ExpandableListActivity {
Preferences.setString(WidgetConfigActivity.PREF_CUSTOM_INTENT + mAppWidgetId, Preferences.setString(WidgetConfigActivity.PREF_CUSTOM_INTENT + mAppWidgetId,
flattenedName); flattenedName);
String flattenedExtras = AndroidUtilities.bundleToSerializedString(((FilterWithCustomIntent)filterListItem).customExtras); String flattenedExtras = AndroidUtilities.bundleToSerializedString(((FilterWithCustomIntent)filterListItem).customExtras);
Preferences.setString(WidgetConfigActivity.PREF_CUSTOM_EXTRAS + mAppWidgetId, if (flattenedExtras != null)
flattenedExtras); Preferences.setString(WidgetConfigActivity.PREF_CUSTOM_EXTRAS + mAppWidgetId,
flattenedExtras);
} }
} }

Loading…
Cancel
Save