Loading core/java/android/app/ITaskStackListener.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -39,8 +39,11 @@ oneway interface ITaskStackListener { * Called whenever IActivityManager.startActivity is called on an activity that is already * running in the pinned stack and the activity is not actually started, but the task is either * brought to the front or a new Intent is delivered to it. * * @param clearedTask whether or not the launch activity also cleared the task as a part of * starting */ void onPinnedActivityRestartAttempt(); void onPinnedActivityRestartAttempt(boolean clearedTask); /** * Called whenever the pinned stack is starting animating a resize. Loading core/java/android/app/TaskStackListener.java +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { } @Override public void onPinnedActivityRestartAttempt() throws RemoteException { public void onPinnedActivityRestartAttempt(boolean clearedTask) throws RemoteException { } @Override Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -107,12 +107,12 @@ public class PipManager implements BasePipManager { } @Override public void onPinnedActivityRestartAttempt() { public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (!checkCurrentUserId(false /* debug */)) { return; } mTouchHandler.getMotionHelper().expandPip(); mTouchHandler.getMotionHelper().expandPip(clearedTask /* skipAnimation */); } }; Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java +15 −4 Original line number Diff line number Diff line Loading @@ -140,14 +140,25 @@ public class PipMotionHelper { * Resizes the pinned stack back to fullscreen. */ void expandPip() { expandPip(false /* skipAnimation */); } /** * Resizes the pinned stack back to fullscreen. */ void expandPip(boolean skipAnimation) { cancelAnimations(); mHandler.post(() -> { try { if (skipAnimation) { mActivityManager.moveTasksToFullscreenStack(PINNED_STACK_ID, true /* onTop */); } else { mActivityManager.resizeStack(PINNED_STACK_ID, null /* bounds */, true /* allowResizeInDockedMode */, true /* preserveWindows */, true /* animate */, EXPAND_STACK_TO_FULLSCREEN_DURATION); } } catch (RemoteException e) { Log.e(TAG, "Error showing PiP menu activity", e); Log.e(TAG, "Error expanding PiP activity", e); } }); } Loading packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -625,7 +625,7 @@ public class PipManager implements BasePipManager { } @Override public void onPinnedActivityRestartAttempt() { public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (DEBUG) Log.d(TAG, "onPinnedActivityRestartAttempt()"); if (!checkCurrentUserId(DEBUG)) { return; Loading Loading
core/java/android/app/ITaskStackListener.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -39,8 +39,11 @@ oneway interface ITaskStackListener { * Called whenever IActivityManager.startActivity is called on an activity that is already * running in the pinned stack and the activity is not actually started, but the task is either * brought to the front or a new Intent is delivered to it. * * @param clearedTask whether or not the launch activity also cleared the task as a part of * starting */ void onPinnedActivityRestartAttempt(); void onPinnedActivityRestartAttempt(boolean clearedTask); /** * Called whenever the pinned stack is starting animating a resize. Loading
core/java/android/app/TaskStackListener.java +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { } @Override public void onPinnedActivityRestartAttempt() throws RemoteException { public void onPinnedActivityRestartAttempt(boolean clearedTask) throws RemoteException { } @Override Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -107,12 +107,12 @@ public class PipManager implements BasePipManager { } @Override public void onPinnedActivityRestartAttempt() { public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (!checkCurrentUserId(false /* debug */)) { return; } mTouchHandler.getMotionHelper().expandPip(); mTouchHandler.getMotionHelper().expandPip(clearedTask /* skipAnimation */); } }; Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMotionHelper.java +15 −4 Original line number Diff line number Diff line Loading @@ -140,14 +140,25 @@ public class PipMotionHelper { * Resizes the pinned stack back to fullscreen. */ void expandPip() { expandPip(false /* skipAnimation */); } /** * Resizes the pinned stack back to fullscreen. */ void expandPip(boolean skipAnimation) { cancelAnimations(); mHandler.post(() -> { try { if (skipAnimation) { mActivityManager.moveTasksToFullscreenStack(PINNED_STACK_ID, true /* onTop */); } else { mActivityManager.resizeStack(PINNED_STACK_ID, null /* bounds */, true /* allowResizeInDockedMode */, true /* preserveWindows */, true /* animate */, EXPAND_STACK_TO_FULLSCREEN_DURATION); } } catch (RemoteException e) { Log.e(TAG, "Error showing PiP menu activity", e); Log.e(TAG, "Error expanding PiP activity", e); } }); } Loading
packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -625,7 +625,7 @@ public class PipManager implements BasePipManager { } @Override public void onPinnedActivityRestartAttempt() { public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (DEBUG) Log.d(TAG, "onPinnedActivityRestartAttempt()"); if (!checkCurrentUserId(DEBUG)) { return; Loading