diff options
author | Mike Cleron <mcleron@google.com> | 2009-10-22 13:55:21 -0700 |
---|---|---|
committer | Mike Cleron <mcleron@google.com> | 2009-10-22 13:55:21 -0700 |
commit | a0618e4102d0543d953d81e162d93c8ea641d0fd (patch) | |
tree | 9985c36cd2f7f4e9011e557480a47a439b039220 /src/com/android/launcher2/Launcher.java | |
parent | 7d5d74686337fb057eaa7eeff15667a2d900c673 (diff) | |
download | android_packages_apps_Trebuchet-a0618e4102d0543d953d81e162d93c8ea641d0fd.tar.gz android_packages_apps_Trebuchet-a0618e4102d0543d953d81e162d93c8ea641d0fd.tar.bz2 android_packages_apps_Trebuchet-a0618e4102d0543d953d81e162d93c8ea641d0fd.zip |
Fix 2198937: Home becomes unresponsive after picking wallpaper
THe problem was that the code was relying on mWaitingForResult being
cleared in onActivityResult. This was not being called because the
wallpaper choosing activity was not being invoked with a result code.
We may want to rethink blocking touch events when isWorkspaceLocked().
There may be other places where we can get stuck like this.
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 851636681..6fb8e4c96 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -107,6 +107,7 @@ public final class Launcher extends Activity private static final int REQUEST_PICK_SHORTCUT = 7; private static final int REQUEST_PICK_LIVE_FOLDER = 8; private static final int REQUEST_PICK_APPWIDGET = 9; + private static final int REQUEST_PICK_WALLPAPER = 10; static final String EXTRA_SHORTCUT_DUPLICATE = "duplicate"; @@ -376,6 +377,9 @@ public final class Launcher extends Activity case REQUEST_CREATE_APPWIDGET: completeAddAppWidget(data, mAddItemCellInfo); break; + case REQUEST_PICK_WALLPAPER: + // We just wanted the activity result here so we can clear mWaitingForResult + break; } } else if (requestCode == REQUEST_PICK_APPWIDGET && resultCode == RESULT_CANCELED && data != null) { @@ -1258,7 +1262,7 @@ public final class Launcher extends Activity li.setClassName(wi.getPackageName(), wi.getSettingsActivity()); chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { li }); } - startActivity(chooser); + startActivityForResult(chooser, REQUEST_PICK_WALLPAPER); } @Override @@ -1614,6 +1618,7 @@ public final class Launcher extends Activity //mWorkspace.hide(); mAllAppsGrid.setFocusable(true); + mAllAppsGrid.requestFocus(); // TODO: fade these two too mDeleteZone.setVisibility(View.GONE); |