Don't load views before onResume called.
Views were being kicked off when RecentsTaskLoader was being started
from BaseStatusBar.toggleRecentsActivity. Then RecentTasksLoader called
RecentsPanelView.onTasksLoaded which invalidated the Adapter and loaded
the item views. All this before window manager had determined that the
Activity should be rotated and providing a new Configuration.
This fix waits for the Activity to resume before allowing the Adapter
to be invalidated.
Fixes bug 7138698.
Change-Id: I0df67ff2e07a0e0b69cc3b52e9843f90ce763704
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
index 9c3756c..291f38c 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
@@ -94,6 +94,9 @@
@Override
public void onResume() {
mForeground = true;
+ if (mRecentsPanel != null) {
+ mRecentsPanel.refreshViews();
+ }
super.onResume();
}
@@ -186,4 +189,7 @@
}
}
+ boolean isForeground() {
+ return mForeground;
+ }
}