diff options
author | Michael Jurka <mikejurka@google.com> | 2012-09-13 11:05:59 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2012-09-17 11:51:18 -0700 |
commit | cbe69206c0046d3f4c1f385425e69751d7048156 (patch) | |
tree | 798e9576efeaf695b84404a54d4bc562901e04b6 /packages/SystemUI/src/com/android | |
parent | 8dd9206abbca6d143e3874abf46eca67f5340b31 (diff) | |
download | frameworks_base-cbe69206c0046d3f4c1f385425e69751d7048156.zip frameworks_base-cbe69206c0046d3f4c1f385425e69751d7048156.tar.gz frameworks_base-cbe69206c0046d3f4c1f385425e69751d7048156.tar.bz2 |
Fix issue where recents would not show up sometimes
Change-Id: Iea78f447b71ae23630c76c8982e69c780eef9df6
Diffstat (limited to 'packages/SystemUI/src/com/android')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java index cd33951..9c3756c 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java @@ -33,6 +33,7 @@ import com.android.systemui.statusbar.tablet.StatusBarPanel; public class RecentsActivity extends Activity { public static final String TOGGLE_RECENTS_INTENT = "com.android.systemui.TOGGLE_RECENTS"; public static final String CLOSE_RECENTS_INTENT = "com.android.systemui.CLOSE_RECENTS"; + private static final String WAS_SHOWING = "was_showing"; private RecentsPanelView mRecentsPanel; private IntentFilter mIntentFilter; @@ -139,7 +140,10 @@ public class RecentsActivity extends Activity { mRecentsPanel.setMinSwipeAlpha( getResources().getInteger(R.integer.config_recent_item_min_alpha) / 100f); - handleIntent(getIntent()); + if (savedInstanceState == null || + savedInstanceState.getBoolean(WAS_SHOWING)) { + handleIntent(getIntent()); + } mIntentFilter = new IntentFilter(); mIntentFilter.addAction(CLOSE_RECENTS_INTENT); registerReceiver(mIntentReceiver, mIntentFilter); @@ -147,6 +151,11 @@ public class RecentsActivity extends Activity { } @Override + protected void onSaveInstanceState(Bundle outState) { + outState.putBoolean(WAS_SHOWING, mRecentsPanel.isShowing()); + } + + @Override protected void onDestroy() { final SystemUIApplication app = (SystemUIApplication) getApplication(); final RecentTasksLoader recentTasksLoader = app.getRecentTasksLoader(); @@ -165,7 +174,7 @@ public class RecentsActivity extends Activity { if (TOGGLE_RECENTS_INTENT.equals(intent.getAction())) { if (mRecentsPanel != null) { - if (mRecentsPanel.isShowing() && mForeground) { + if (mRecentsPanel.isShowing()) { dismissAndGoBack(); } else { final SystemUIApplication app = (SystemUIApplication) getApplication(); |