mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Add guards for restoreInstanceState (issue 11982812)
Change-Id: Ic4c632a956130ab28843085490dc1badb39b0e8c
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4254,7 +4254,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