Loading core/java/android/view/IRecentsAnimationController.aidl +4 −6 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package android.view; import android.app.ActivityManager; import android.view.IRemoteAnimationFinishedCallback; import android.graphics.GraphicBuffer; import android.graphics.Rect; import android.window.PictureInPictureSurfaceTransaction; import android.window.TaskSnapshot; Loading @@ -39,14 +38,13 @@ interface IRecentsAnimationController { TaskSnapshot screenshotTask(int taskId); /** * Sets the final bounds on a Task. This is used by Launcher to notify the system that * animating Activity to PiP has completed and the associated task surface should be updated * accordingly. This should be called before `finish` * Sets the final surface transaction on a Task. This is used by Launcher to notify the system * that animating Activity to PiP has completed and the associated task surface should be * updated accordingly. This should be called before `finish` * @param taskId for which the leash should be updated * @param destinationBounds bounds of the final PiP window * @param finishTransaction leash operations for the final transform. */ void setFinishTaskBounds(int taskId, in Rect destinationBounds, void setFinishTaskTransaction(int taskId, in PictureInPictureSurfaceTransaction finishTransaction); /** Loading core/java/android/window/PictureInPictureSurfaceTransaction.java +19 −0 Original line number Diff line number Diff line Loading @@ -16,10 +16,13 @@ package android.window; import android.annotation.NonNull; import android.annotation.Nullable; import android.graphics.Matrix; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.view.SurfaceControl; import java.util.Objects; Loading Loading @@ -127,6 +130,22 @@ public final class PictureInPictureSurfaceTransaction implements Parcelable { + ")"; } /** Applies {@link PictureInPictureSurfaceTransaction} to a given leash. */ public static void apply(@NonNull PictureInPictureSurfaceTransaction surfaceTransaction, @NonNull SurfaceControl surfaceControl, @NonNull SurfaceControl.Transaction tx) { final Matrix matrix = new Matrix(); matrix.setScale(surfaceTransaction.mScaleX, surfaceTransaction.mScaleY); if (surfaceTransaction.mRotation != 0) { matrix.postRotate(surfaceTransaction.mRotation); } tx.setMatrix(surfaceControl, matrix, new float[9]) .setPosition(surfaceControl, surfaceTransaction.mPositionX, surfaceTransaction.mPositionY) .setWindowCrop(surfaceControl, surfaceTransaction.getWindowCrop()) .setCornerRadius(surfaceControl, surfaceTransaction.mCornerRadius); } public static final @android.annotation.NonNull Creator<PictureInPictureSurfaceTransaction> CREATOR = new Creator<PictureInPictureSurfaceTransaction>() { Loading data/etc/services.core.protolog.json +6 −12 Original line number Diff line number Diff line Loading @@ -367,12 +367,6 @@ "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayRotation.java" }, "-1729340764": { "message": "setFinishTaskBounds(%d): bounds=%s", "level": "DEBUG", "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimationController.java" }, "-1715268616": { "message": "Last window, removing starting window %s", "level": "VERBOSE", Loading Loading @@ -1705,6 +1699,12 @@ "group": "WM_ERROR", "at": "com\/android\/server\/wm\/WindowManagerService.java" }, "-163974242": { "message": "setFinishTaskTransaction(%d): transaction=%s", "level": "DEBUG", "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimationController.java" }, "-143556958": { "message": "resumeNextFocusableActivityWhenRootTaskIsEmpty: %s, go home", "level": "DEBUG", Loading Loading @@ -1897,12 +1897,6 @@ "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimationController.java" }, "86989930": { "message": "setTaskWindowingMode: moving task=%d to windowingMode=%d toTop=%b", "level": "DEBUG", "group": "WM_DEBUG_TASKS", "at": "com\/android\/server\/wm\/ActivityTaskManagerService.java" }, "90764070": { "message": "Could not report token removal to the window token client.", "level": "WARN", Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java +5 −7 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.shared.system; import android.graphics.Rect; import android.os.RemoteException; import android.util.Log; import android.view.IRecentsAnimationController; Loading Loading @@ -72,17 +71,16 @@ public class RecentsAnimationControllerCompat { } /** * Sets the final bounds on a Task. This is used by Launcher to notify the system that * animating Activity to PiP has completed and the associated task surface should be updated * accordingly. This should be called before `finish` * Sets the final surface transaction on a Task. This is used by Launcher to notify the system * that animating Activity to PiP has completed and the associated task surface should be * updated accordingly. This should be called before `finish` * @param taskId Task id of the Activity in PiP mode. * @param destinationBounds Bounds of the PiP window on home. * @param finishTransaction leash operations for the final transform. */ public void setFinishTaskBounds(int taskId, Rect destinationBounds, public void setFinishTaskTransaction(int taskId, PictureInPictureSurfaceTransaction finishTransaction) { try { mAnimationController.setFinishTaskBounds(taskId, destinationBounds, finishTransaction); mAnimationController.setFinishTaskTransaction(taskId, finishTransaction); } catch (RemoteException e) { Log.d(TAG, "Failed to set finish task bounds", e); } Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java +2 −2 Original line number Diff line number Diff line Loading @@ -185,10 +185,10 @@ public class RemoteTransitionCompat implements Parcelable { mWrapped.hideCurrentInputMethod(); } @Override public void setFinishTaskBounds(int taskId, Rect destinationBounds, @Override public void setFinishTaskTransaction(int taskId, PictureInPictureSurfaceTransaction finishTransaction) { if (mWrapped != null) { mWrapped.setFinishTaskBounds(taskId, destinationBounds, finishTransaction); mWrapped.setFinishTaskTransaction(taskId, finishTransaction); } } Loading Loading
core/java/android/view/IRecentsAnimationController.aidl +4 −6 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package android.view; import android.app.ActivityManager; import android.view.IRemoteAnimationFinishedCallback; import android.graphics.GraphicBuffer; import android.graphics.Rect; import android.window.PictureInPictureSurfaceTransaction; import android.window.TaskSnapshot; Loading @@ -39,14 +38,13 @@ interface IRecentsAnimationController { TaskSnapshot screenshotTask(int taskId); /** * Sets the final bounds on a Task. This is used by Launcher to notify the system that * animating Activity to PiP has completed and the associated task surface should be updated * accordingly. This should be called before `finish` * Sets the final surface transaction on a Task. This is used by Launcher to notify the system * that animating Activity to PiP has completed and the associated task surface should be * updated accordingly. This should be called before `finish` * @param taskId for which the leash should be updated * @param destinationBounds bounds of the final PiP window * @param finishTransaction leash operations for the final transform. */ void setFinishTaskBounds(int taskId, in Rect destinationBounds, void setFinishTaskTransaction(int taskId, in PictureInPictureSurfaceTransaction finishTransaction); /** Loading
core/java/android/window/PictureInPictureSurfaceTransaction.java +19 −0 Original line number Diff line number Diff line Loading @@ -16,10 +16,13 @@ package android.window; import android.annotation.NonNull; import android.annotation.Nullable; import android.graphics.Matrix; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.view.SurfaceControl; import java.util.Objects; Loading Loading @@ -127,6 +130,22 @@ public final class PictureInPictureSurfaceTransaction implements Parcelable { + ")"; } /** Applies {@link PictureInPictureSurfaceTransaction} to a given leash. */ public static void apply(@NonNull PictureInPictureSurfaceTransaction surfaceTransaction, @NonNull SurfaceControl surfaceControl, @NonNull SurfaceControl.Transaction tx) { final Matrix matrix = new Matrix(); matrix.setScale(surfaceTransaction.mScaleX, surfaceTransaction.mScaleY); if (surfaceTransaction.mRotation != 0) { matrix.postRotate(surfaceTransaction.mRotation); } tx.setMatrix(surfaceControl, matrix, new float[9]) .setPosition(surfaceControl, surfaceTransaction.mPositionX, surfaceTransaction.mPositionY) .setWindowCrop(surfaceControl, surfaceTransaction.getWindowCrop()) .setCornerRadius(surfaceControl, surfaceTransaction.mCornerRadius); } public static final @android.annotation.NonNull Creator<PictureInPictureSurfaceTransaction> CREATOR = new Creator<PictureInPictureSurfaceTransaction>() { Loading
data/etc/services.core.protolog.json +6 −12 Original line number Diff line number Diff line Loading @@ -367,12 +367,6 @@ "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayRotation.java" }, "-1729340764": { "message": "setFinishTaskBounds(%d): bounds=%s", "level": "DEBUG", "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimationController.java" }, "-1715268616": { "message": "Last window, removing starting window %s", "level": "VERBOSE", Loading Loading @@ -1705,6 +1699,12 @@ "group": "WM_ERROR", "at": "com\/android\/server\/wm\/WindowManagerService.java" }, "-163974242": { "message": "setFinishTaskTransaction(%d): transaction=%s", "level": "DEBUG", "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimationController.java" }, "-143556958": { "message": "resumeNextFocusableActivityWhenRootTaskIsEmpty: %s, go home", "level": "DEBUG", Loading Loading @@ -1897,12 +1897,6 @@ "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimationController.java" }, "86989930": { "message": "setTaskWindowingMode: moving task=%d to windowingMode=%d toTop=%b", "level": "DEBUG", "group": "WM_DEBUG_TASKS", "at": "com\/android\/server\/wm\/ActivityTaskManagerService.java" }, "90764070": { "message": "Could not report token removal to the window token client.", "level": "WARN", Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java +5 −7 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.shared.system; import android.graphics.Rect; import android.os.RemoteException; import android.util.Log; import android.view.IRecentsAnimationController; Loading Loading @@ -72,17 +71,16 @@ public class RecentsAnimationControllerCompat { } /** * Sets the final bounds on a Task. This is used by Launcher to notify the system that * animating Activity to PiP has completed and the associated task surface should be updated * accordingly. This should be called before `finish` * Sets the final surface transaction on a Task. This is used by Launcher to notify the system * that animating Activity to PiP has completed and the associated task surface should be * updated accordingly. This should be called before `finish` * @param taskId Task id of the Activity in PiP mode. * @param destinationBounds Bounds of the PiP window on home. * @param finishTransaction leash operations for the final transform. */ public void setFinishTaskBounds(int taskId, Rect destinationBounds, public void setFinishTaskTransaction(int taskId, PictureInPictureSurfaceTransaction finishTransaction) { try { mAnimationController.setFinishTaskBounds(taskId, destinationBounds, finishTransaction); mAnimationController.setFinishTaskTransaction(taskId, finishTransaction); } catch (RemoteException e) { Log.d(TAG, "Failed to set finish task bounds", e); } Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java +2 −2 Original line number Diff line number Diff line Loading @@ -185,10 +185,10 @@ public class RemoteTransitionCompat implements Parcelable { mWrapped.hideCurrentInputMethod(); } @Override public void setFinishTaskBounds(int taskId, Rect destinationBounds, @Override public void setFinishTaskTransaction(int taskId, PictureInPictureSurfaceTransaction finishTransaction) { if (mWrapped != null) { mWrapped.setFinishTaskBounds(taskId, destinationBounds, finishTransaction); mWrapped.setFinishTaskTransaction(taskId, finishTransaction); } } Loading