PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist
Bug: 27954955
Change-Id: I517e378d5c1672ac0eb87bdf4375b7d733276e58
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
index f9202c4..27726af 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
@@ -189,8 +189,8 @@
}
@Override
- public void requestTvPictureInPicture() {
- PipManager.getInstance().requestTvPictureInPicture();
+ public void showTvPictureInPictureMenu() {
+ PipManager.getInstance().showTvPictureInPictureMenu();
}
@Override
@@ -224,8 +224,22 @@
putComponent(TvStatusBar.class, this);
}
+ /**
+ * Updates the visibility of the picture-in-picture.
+ */
+ public void updatePipVisibility(boolean visible) {
+ if (visible) {
+ mSystemUiVisibility |= View.TV_PICTURE_IN_PICTURE_VISIBLE;
+ } else {
+ mSystemUiVisibility &= ~View.TV_PICTURE_IN_PICTURE_VISIBLE;
+ }
+ notifyUiVisibilityChanged(mSystemUiVisibility);
+ }
+
+ /**
+ * Updates the visibility of the Recents
+ */
public void updateRecentsVisibility(boolean visible) {
- // Update the recents visibility flag
if (visible) {
mSystemUiVisibility |= View.RECENT_APPS_VISIBLE;
} else {