summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jaewan Kim <jaewan@google.com> 2016-03-22 00:34:17 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-03-22 00:34:19 +0000
commit61ad7ad7fd8932854c498884770810d2424ee7af (patch)
treeedd010e69854a308dab676244db5b7d143c40942
parentd8e91f65ae038a5223d6efd4ca4e382c7764bd4e (diff)
parent7ed7657c21e6f253afffdfbe7290157ef5db471f (diff)
Merge "Hide system UI activity with FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS in Recents" into nyc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index 532e79661c6a..de3c2bed9435 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -94,12 +94,18 @@ public class SystemServicesProxy {
final static String TAG = "SystemServicesProxy";
final static BitmapFactory.Options sBitmapOptions;
-
static {
sBitmapOptions = new BitmapFactory.Options();
sBitmapOptions.inMutable = true;
}
+ final static List<String> sRecentsBlacklist;
+ static {
+ sRecentsBlacklist = new ArrayList<>();
+ sRecentsBlacklist.add("com.android.systemui.tv.pip.PipOnboardingActivity");
+ sRecentsBlacklist.add("com.android.systemui.tv.pip.PipMenuActivity");
+ }
+
AccessibilityManager mAccm;
ActivityManager mAm;
IActivityManager mIam;
@@ -227,12 +233,13 @@ public class SystemServicesProxy {
// Check the first non-recents task, include this task even if it is marked as excluded
// from recents if we are currently in the app. In other words, only remove excluded
- // tasks if it is not the first active task.
+ // tasks if it is not the first active task, and not in the blacklist.
boolean isExcluded = (t.baseIntent.getFlags() & Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
== Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
+ boolean isBlackListed = sRecentsBlacklist.contains(t.realActivity.getClassName());
// Filter out recent tasks from managed profiles which are in quiet mode.
isExcluded |= quietProfileIds.contains(t.userId);
- if (isExcluded && (isTopTaskHome || !isFirstValidTask)) {
+ if (isBlackListed || (isExcluded && (isTopTaskHome || !isFirstValidTask))) {
iter.remove();
continue;
}