Fix crash in getCurrentWorkspaceScreen.
Bug 2761789 Change-Id: I9f005c876ca20f774e6d8046e34451a7fecbe805
This commit is contained in:
parent
a9bda02f7c
commit
d0afc87d96
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue