am ec6b71a0: am 531a5c32: am b0ee0810: Add guards for restoreInstanceState (issue 11982812)

* commit 'ec6b71a008977995f3782c4781b43a360598be1c':
  Add guards for restoreInstanceState (issue 11982812)
This commit is contained in:
Adam Cohen
2014-02-14 20:54:20 +00: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);
}
}
}