From 66fc3ac40a133435ac7fcc2b236ff04b8e8f36e4 Mon Sep 17 00:00:00 2001 From: Jaewan Kim Date: Thu, 28 Apr 2016 17:28:52 +0900 Subject: [PATCH] PIP: Prevent PIP icons in Recents from blinking when PIP is closed Bug: 28426049 Change-Id: I462877376bced76aa168af4e99a9d8c1f2f1bc98 --- .../android/systemui/tv/pip/PipRecentsOverlayManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java index dd12360a01969..fe5d8bce17417 100644 --- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java +++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java @@ -134,7 +134,8 @@ public class PipRecentsOverlayManager { */ public void requestFocus(boolean allowRecentsFocusable) { mRecentsView.setVisibility(allowRecentsFocusable ? View.VISIBLE : View.GONE); - if (!mIsPipRecentsOverlayShown || !mIsRecentsShown || mIsPipFocusedInRecent) { + if (!mIsPipRecentsOverlayShown || !mIsRecentsShown || mIsPipFocusedInRecent + || !mPipManager.isPipShown()) { return; } mIsPipFocusedInRecent = true; @@ -153,7 +154,8 @@ public class PipRecentsOverlayManager { * This should be called only by {@link com.android.systemui.recents.tv.RecentsTvActivity}. */ public void clearFocus() { - if (!mIsPipRecentsOverlayShown || !mIsRecentsShown || !mIsPipFocusedInRecent) { + if (!mIsPipRecentsOverlayShown || !mIsRecentsShown || !mIsPipFocusedInRecent + || !mPipManager.isPipShown()) { return; } if (!mRecentsView.hasFocus()) {