summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongwon Kang <dwkang@google.com>2016-03-02 18:34:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-03-02 18:34:10 +0000
commit19d7eeaedf4c80ae1d191f201ab028adc88ac2cb (patch)
tree7a422cd05a84582e02a02d053e3c781140685ee8
parent1df152284db991e63a81773824f270fa3aa99aec (diff)
parent3ebc1e3f9963c8d786f83f21abb6b6f78270ede1 (diff)
Merge "PIP: Show recents again when PIP menu is closed" into nyc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java
index fb7fa4de088f..fd753e9a7044 100644
--- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java
@@ -25,6 +25,9 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.android.systemui.R;
+import com.android.systemui.SystemUI;
+import com.android.systemui.SystemUIApplication;
+import com.android.systemui.recents.Recents;
import static android.content.pm.PackageManager.FEATURE_LEANBACK;
import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE;
@@ -214,4 +217,18 @@ public class PipMenuActivity extends Activity implements PipManager.Listener {
mPipManager.suspendPipResizing(
PipManager.SUSPEND_PIP_RESIZE_REASON_WAITING_FOR_MENU_ACTIVITY_FINISH);
}
+
+ @Override
+ public void finish() {
+ super.finish();
+ if (mPipManager.isRecentsShown()) {
+ SystemUI[] services = ((SystemUIApplication) getApplication()).getServices();
+ for (int i = services.length - 1; i >= 0; i--) {
+ if (services[i] instanceof Recents) {
+ ((Recents) services[i]).showRecents(false, null);
+ break;
+ }
+ }
+ }
+ }
}