summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-06-11 18:15:10 (GMT)
committerAndroid Git Automerger <android-git-automerger@android.com>2010-06-11 18:15:10 (GMT)
commit9d944c6fb8c117674d1f02ca567629ab62add6b8 (patch)
tree25abf254d529250bebff4b77509a8daf3e8c3e92 /src
parentce6160d7c3c0e791fad8498aaffe9b5ef25d5209 (diff)
parentd0afc87d9639a228b247cfbc2cf19d16132137b3 (diff)
downloadandroid_packages_apps_Trebuchet-9d944c6fb8c117674d1f02ca567629ab62add6b8.zip
android_packages_apps_Trebuchet-9d944c6fb8c117674d1f02ca567629ab62add6b8.tar.gz
android_packages_apps_Trebuchet-9d944c6fb8c117674d1f02ca567629ab62add6b8.tar.bz2
am d0afc87d: Fix crash in getCurrentWorkspaceScreen.
Merge commit 'd0afc87d9639a228b247cfbc2cf19d16132137b3' * commit 'd0afc87d9639a228b247cfbc2cf19d16132137b3': Fix crash in getCurrentWorkspaceScreen.
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;
+ }
}
/**