summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-06-11 07:03:15 (GMT)
committerJoe Onorato <joeo@android.com>2010-06-11 07:03:15 (GMT)
commitd0afc87d9639a228b247cfbc2cf19d16132137b3 (patch)
tree53b49093adca12b932da2f7115b62a3c35358dc9 /src
parenta9bda02f7c931f7c4414c0cf8d64e3559c701bcd (diff)
downloadandroid_packages_apps_Trebuchet-d0afc87d9639a228b247cfbc2cf19d16132137b3.zip
android_packages_apps_Trebuchet-d0afc87d9639a228b247cfbc2cf19d16132137b3.tar.gz
android_packages_apps_Trebuchet-d0afc87d9639a228b247cfbc2cf19d16132137b3.tar.bz2
Fix crash in getCurrentWorkspaceScreen.
Bug 2761789 Change-Id: I9f005c876ca20f774e6d8046e34451a7fecbe805
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/Launcher.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 13a39a3..6bd915a 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2093,7 +2093,11 @@ public final class Launcher extends Activity
* Implementation of the method from LauncherModel.Callbacks.
*/
public int getCurrentWorkspaceScreen() {
- return mWorkspace.getCurrentScreen();
+ if (mWorkspace != null) {
+ return mWorkspace.getCurrentScreen();
+ } else {
+ return SCREEN_COUNT / 2;
+ }
}
/**