Handle TaskStackListener.onPinnedActivityRestartAttempt in PIP system UI
Bug: 26452296
Change-Id: Ic828462dce0b6f88c9b00fac36ade5492cec94fb
diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
index b237400..e947ed5 100644
--- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
@@ -94,6 +94,12 @@
}
}
};
+ private final Runnable mOnPinnedActivityRestartAttempt = new Runnable() {
+ @Override
+ public void run() {
+ movePipToFullscreen();
+ }
+ };
private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@Override
@@ -315,6 +321,8 @@
@Override
public void onPinnedActivityRestartAttempt() {
+ // Post the message back to the UI thread.
+ mHandler.post(mOnPinnedActivityRestartAttempt);
}
}