am b0ee0810: Add guards for restoreInstanceState (issue 11982812)

* commit 'b0ee08109ec89959d9bbd526c6e5f7ab96c8c3ea':
  Add guards for restoreInstanceState (issue 11982812)
This commit is contained in:
Adam Cohen
2013-12-03 17:59:52 -08:00
committed by Android Git Automerger
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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);
}
}
+3 -1
View File
@@ -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);
}
}
}