summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recents/Recents.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-06-17 16:03:54 -0700
committerWinson Chung <winsonc@google.com>2015-06-17 16:18:28 -0700
commitfe855d124b3fb3d59262b0fc6d528d91caf36951 (patch)
tree6168f8eb8da4113c2df888b5e7cfc62f38736dcc /packages/SystemUI/src/com/android/systemui/recents/Recents.java
parent3aa16d761efb970f16aa913dcda9a3cc458cc227 (diff)
downloadframeworks_base-fe855d124b3fb3d59262b0fc6d528d91caf36951.zip
frameworks_base-fe855d124b3fb3d59262b0fc6d528d91caf36951.tar.gz
frameworks_base-fe855d124b3fb3d59262b0fc6d528d91caf36951.tar.bz2
Fixing issue with recents not being hidden for translucent apps.
- When tapping home, we can't depend on the stack state to determine whether or not hide recents since there can be translucent windows above it. In this case, we just dismiss recents directly since the receiver will only be registered while recents is visible. Bug: 20110140 Change-Id: I6b796cc4cbd790aac9a0857549e34117adb808d8
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/Recents.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/Recents.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
index 442af90..89c456c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
@@ -316,14 +316,12 @@ public class Recents extends SystemUI
void hideRecentsInternal(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
if (mBootCompleted) {
- ActivityManager.RunningTaskInfo topTask = mSystemServicesProxy.getTopMostTask();
- if (topTask != null && mSystemServicesProxy.isRecentsTopMost(topTask, null)) {
- // Notify recents to hide itself
- Intent intent = createLocalBroadcastIntent(mContext, ACTION_HIDE_RECENTS_ACTIVITY);
- intent.putExtra(EXTRA_TRIGGERED_FROM_ALT_TAB, triggeredFromAltTab);
- intent.putExtra(EXTRA_TRIGGERED_FROM_HOME_KEY, triggeredFromHomeKey);
- mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
- }
+ // Defer to the activity to handle hiding recents, if it handles it, then it must still
+ // be visible
+ Intent intent = createLocalBroadcastIntent(mContext, ACTION_HIDE_RECENTS_ACTIVITY);
+ intent.putExtra(EXTRA_TRIGGERED_FROM_ALT_TAB, triggeredFromAltTab);
+ intent.putExtra(EXTRA_TRIGGERED_FROM_HOME_KEY, triggeredFromHomeKey);
+ mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
}
}