am b0ee0810: Add guards for restoreInstanceState (issue 11982812)
* commit 'b0ee08109ec89959d9bbd526c6e5f7ab96c8c3ea': Add guards for restoreInstanceState (issue 11982812)
This commit is contained in:
@@ -2298,7 +2298,7 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
r = new Runnable() {
|
||||
public void run() {
|
||||
Callbacks callbacks = tryGetCallbacks(oldCallbacks);
|
||||
if (callbacks != null) {
|
||||
if (callbacks != null && currentScreen >= 0) {
|
||||
callbacks.onPageBoundSynchronously(currentScreen);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4264,7 +4264,9 @@ public class Workspace extends SmoothPagedView
|
||||
if (mSavedStates != null) {
|
||||
mRestoredPages.add(child);
|
||||
CellLayout cl = (CellLayout) getChildAt(child);
|
||||
cl.restoreInstanceState(mSavedStates);
|
||||
if (cl != null) {
|
||||
cl.restoreInstanceState(mSavedStates);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user