From 165410d445bf200ac615d4d1abc7221e95c5f82c Mon Sep 17 00:00:00 2001 From: Sid Soundararajan Date: Mon, 16 May 2016 14:55:08 -0700 Subject: [PATCH] Add an extra to HOME intent to indicate it comes form recents. This allows the launcher to know how to handle HOME press properly when a video is playing in the background. Without this, the Launcher dismisses it's UI. Launcher CL: https://googleplex-android-review.git.corp.google.com/#/c/1043435/ BUG: 28173127 Change-Id: Iab0c5013fc41f79a6fd45f49904edd0d0f9c17ff --- .../src/com/android/systemui/recents/tv/RecentsTvActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java index acebf427feabc..3e322e2e7e0ec 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java @@ -73,6 +73,8 @@ public class RecentsTvActivity extends Activity implements OnPreDrawListener { private final static boolean DEBUG = false; public final static int EVENT_BUS_PRIORITY = Recents.EVENT_BUS_PRIORITY + 1; + private final static String RECENTS_HOME_INTENT_EXTRA = + "com.android.systemui.recents.tv.RecentsTvActivity.RECENTS_HOME_INTENT_EXTRA"; private boolean mFinishedOnStartup; private RecentsPackageMonitor mPackageMonitor; @@ -320,6 +322,7 @@ public class RecentsTvActivity extends Activity implements OnPreDrawListener { homeIntent.addCategory(Intent.CATEGORY_HOME); homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); + homeIntent.putExtra(RECENTS_HOME_INTENT_EXTRA, true); mFinishLaunchHomeRunnable = new FinishRecentsRunnable(homeIntent); mPipManager.addListener(mPipListener);