Skip to content

Commit 08924d0

Browse files
mikejurkaAndroid (Google) Code Review
authored andcommitted
Merge "Supporting EXTRA_APPWIDGET_OPTIONS correctly" into jb-mr1-lockscreen-dev
2 parents 7dfc588 + 0a75b94 commit 08924d0

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,10 @@ private void launchPickActivityIntent() {
924924
pickIntent.putExtra(AppWidgetManager.EXTRA_CATEGORY_FILTER,
925925
AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD);
926926

927-
pickIntent.putExtra(Intent.EXTRA_INTENT, getBaseIntent());
927+
Bundle options = new Bundle();
928+
options.putInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY,
929+
AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD);
930+
pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS, options);
928931
pickIntent.addFlags(
929932
Intent.FLAG_ACTIVITY_NEW_TASK
930933
| Intent.FLAG_ACTIVITY_SINGLE_TOP
@@ -937,17 +940,6 @@ private void launchPickActivityIntent() {
937940
}
938941
}
939942

940-
private Intent getBaseIntent() {
941-
Intent baseIntent = new Intent(Intent.ACTION_MAIN, null);
942-
baseIntent.addCategory(Intent.CATEGORY_DEFAULT);
943-
944-
Bundle options = new Bundle();
945-
options.putInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY,
946-
AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD);
947-
baseIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS, options);
948-
return baseIntent;
949-
}
950-
951943
private void removeTransportFromWidgetPager() {
952944
int page = getWidgetPosition(R.id.keyguard_transport_control);
953945
if (page != -1) {

0 commit comments

Comments
 (0)