diff options
author | Adam Cohen <adamcohen@google.com> | 2012-09-27 13:14:17 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-27 13:14:17 -0700 |
commit | f4b6a68215a0269837b73f134ff57cf150bc1d9c (patch) | |
tree | c4817a4ff7450b50447be753e4f263bce4588391 /src/com | |
parent | fffc9bef49428ac4974ed5c1ee2e4d0c0f9d4a5a (diff) | |
parent | eeb464ae43180624b7a45c50f643802dda56f2b0 (diff) | |
download | packages_apps_Settings-f4b6a68215a0269837b73f134ff57cf150bc1d9c.zip packages_apps_Settings-f4b6a68215a0269837b73f134ff57cf150bc1d9c.tar.gz packages_apps_Settings-f4b6a68215a0269837b73f134ff57cf150bc1d9c.tar.bz2 |
Merge "Addressing issue 7243210, can't set status widget properly" into jb-mr1-dev
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 2af212c..420dcbc 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -482,7 +482,7 @@ public class SecuritySettings extends SettingsPreferenceFragment } private void launchPickActivityIntent(int featuresFilter, int defaultLabelId, int defaultIconId, - ComponentName defaultComponentName, String defaultTag) { + ComponentName defaultComponentName, String defaultTag, int widgetType) { // Create intent to pick widget Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK); @@ -515,7 +515,7 @@ public class SecuritySettings extends SettingsPreferenceFragment pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_INFO, extraInfos); pickIntent.putExtra(AppWidgetManager.EXTRA_CUSTOM_EXTRAS, extraExtras); pickIntent.putExtra(Intent.EXTRA_INTENT, getBaseIntent()); - startActivityForResult(pickIntent, REQUEST_PICK_USER_SELECTED_APPWIDGET); + startActivityForResult(pickIntent, widgetType); } else { Log.e(TAG, "Unable to allocate an AppWidget id in lock screen"); } @@ -542,7 +542,8 @@ public class SecuritySettings extends SettingsPreferenceFragment SET_OR_CHANGE_LOCK_METHOD_REQUEST, null); } else if (KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET.equals(key)) { launchPickActivityIntent(AppWidgetProviderInfo.WIDGET_FEATURES_NONE, - R.string.widget_none, 0, new ComponentName("", ""), EXTRA_NO_WIDGET); + R.string.widget_none, 0, new ComponentName("", ""), EXTRA_NO_WIDGET, + REQUEST_PICK_USER_SELECTED_APPWIDGET); } else if (KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET.equals(key)) { int defaultIconId; ComponentName clock = new ComponentName( @@ -553,7 +554,8 @@ public class SecuritySettings extends SettingsPreferenceFragment defaultIconId = 0; } launchPickActivityIntent(AppWidgetProviderInfo.WIDGET_FEATURES_STATUS, - R.string.widget_default, defaultIconId, clock, EXTRA_DEFAULT_WIDGET); + R.string.widget_default, defaultIconId, clock, EXTRA_DEFAULT_WIDGET, + REQUEST_PICK_STATUS_APPWIDGET); } else if (KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING.equals(key)) { ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(this.getActivity(), this); |