Merge "Move PiP animation to SysUI package" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
0cbb2687ed
@@ -361,25 +361,6 @@ public class ActivityTaskManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resize the input stack id to the given bounds with animate setting.
|
||||
* @param stackId Id of the stack to resize.
|
||||
* @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
|
||||
* @param animate Whether we should play an animation for resizing stack.
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
|
||||
public void resizePinnedStack(int stackId, Rect bounds, boolean animate) {
|
||||
try {
|
||||
if (animate) {
|
||||
getService().animateResizePinnedStack(stackId, bounds, -1 /* animationDuration */);
|
||||
} else {
|
||||
getService().resizePinnedStack(bounds, null /* tempPinnedTaskBounds */);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resize task to given bounds.
|
||||
* @param taskId Id of task to resize.
|
||||
|
||||
@@ -236,32 +236,8 @@ interface IActivityTaskManager {
|
||||
*/
|
||||
boolean setTaskWindowingMode(int taskId, int windowingMode, boolean toTop);
|
||||
void moveTaskToStack(int taskId, int stackId, boolean toTop);
|
||||
/**
|
||||
* Resizes the input pinned stack to the given bounds with animation.
|
||||
*
|
||||
* @param stackId Id of the pinned stack to resize.
|
||||
* @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
|
||||
* @param animationDuration The duration of the resize animation in milliseconds or -1 if the
|
||||
* default animation duration should be used.
|
||||
* @throws RemoteException
|
||||
*/
|
||||
void animateResizePinnedStack(int stackId, in Rect bounds, int animationDuration);
|
||||
boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
|
||||
boolean animate, in Rect initialBounds, boolean showRecents);
|
||||
/**
|
||||
* Use the offset to adjust the stack boundary with animation.
|
||||
*
|
||||
* @param stackId Id of the stack to adjust.
|
||||
* @param compareBounds Offset is only applied if the current pinned stack bounds is equal to
|
||||
* the compareBounds.
|
||||
* @param xOffset The horizontal offset.
|
||||
* @param yOffset The vertical offset.
|
||||
* @param animationDuration The duration of the resize animation in milliseconds or -1 if the
|
||||
* default animation duration should be used.
|
||||
* @throws RemoteException
|
||||
*/
|
||||
void offsetPinnedStackBounds(int stackId, in Rect compareBounds, int xOffset, int yOffset,
|
||||
int animationDuration);
|
||||
/**
|
||||
* Removes stacks in the input windowing modes from the system if they are of activity type
|
||||
* ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
|
||||
@@ -371,23 +347,10 @@ interface IActivityTaskManager {
|
||||
void startLocalVoiceInteraction(in IBinder token, in Bundle options);
|
||||
void stopLocalVoiceInteraction(in IBinder token);
|
||||
boolean supportsLocalVoiceInteraction();
|
||||
void notifyPinnedStackAnimationStarted();
|
||||
void notifyPinnedStackAnimationEnded();
|
||||
|
||||
// Get device configuration
|
||||
ConfigurationInfo getDeviceConfigurationInfo();
|
||||
|
||||
/**
|
||||
* Resizes the pinned stack.
|
||||
*
|
||||
* @param pinnedBounds The bounds for the pinned stack.
|
||||
* @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
|
||||
* might be different from the stack bounds to allow more
|
||||
* flexibility while resizing, or {@code null} if they should be the
|
||||
* same as the stack bounds.
|
||||
*/
|
||||
void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds);
|
||||
|
||||
void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback,
|
||||
in CharSequence message);
|
||||
|
||||
|
||||
@@ -45,16 +45,6 @@ oneway interface ITaskStackListener {
|
||||
*/
|
||||
void onPinnedActivityRestartAttempt(boolean clearedTask);
|
||||
|
||||
/**
|
||||
* Called whenever the pinned stack is starting animating a resize.
|
||||
*/
|
||||
void onPinnedStackAnimationStarted();
|
||||
|
||||
/**
|
||||
* Called whenever the pinned stack is done animating a resize.
|
||||
*/
|
||||
void onPinnedStackAnimationEnded();
|
||||
|
||||
/**
|
||||
* Called when we launched an activity that we forced to be resizable.
|
||||
*
|
||||
|
||||
@@ -56,16 +56,6 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub {
|
||||
public void onPinnedActivityRestartAttempt(boolean clearedTask) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
@UnsupportedAppUsage
|
||||
public void onPinnedStackAnimationStarted() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
@UnsupportedAppUsage
|
||||
public void onPinnedStackAnimationEnded() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
@UnsupportedAppUsage
|
||||
public void onActivityForcedResizable(String packageName, int taskId, int reason)
|
||||
|
||||
@@ -25,32 +25,8 @@ import android.graphics.Rect;
|
||||
* @hide
|
||||
*/
|
||||
interface IPinnedStackController {
|
||||
|
||||
/**
|
||||
* Notifies the controller that the PiP is currently minimized.
|
||||
*/
|
||||
oneway void setIsMinimized(boolean isMinimized);
|
||||
|
||||
/**
|
||||
* @return what WM considers to be the current device rotation.
|
||||
*/
|
||||
int getDisplayRotation();
|
||||
|
||||
/**
|
||||
* Notifies the controller to actually start the PiP animation.
|
||||
* The bounds would be calculated based on the last save reentry fraction internally.
|
||||
* {@param destinationBounds} is the stack bounds of the final PiP window
|
||||
* and {@param sourceRectHint} is the source bounds hint used when entering picture-in-picture,
|
||||
* expect the same bound passed via IPinnedStackListener#onPrepareAnimation.
|
||||
* {@param animationDuration} suggests the animation duration transitioning to PiP window.
|
||||
*/
|
||||
void startAnimation(in Rect destinationBounds, in Rect sourceRectHint, int animationDuration);
|
||||
|
||||
/**
|
||||
* Notifies the controller to reset on bounds animation, if there is any.
|
||||
* This could happen when screen rotation is happening and we need to notify the WM to reset
|
||||
* any running bounds animation on the pinned stack.
|
||||
* {@param bounds} here is the final destination bounds.
|
||||
*/
|
||||
void resetBoundsAnimation(in Rect bounds);
|
||||
}
|
||||
|
||||
@@ -43,8 +43,7 @@ oneway interface IPinnedStackListener {
|
||||
* pinned stack (the final bounds if animating, the current bounds if not),
|
||||
* which may be helpful in calculating dependent animation bounds.
|
||||
*/
|
||||
void onMovementBoundsChanged(in Rect animatingBounds, boolean fromImeAdjustment,
|
||||
boolean fromShelfAdjustment);
|
||||
void onMovementBoundsChanged(in Rect animatingBounds, boolean fromImeAdjustment);
|
||||
|
||||
/**
|
||||
* Called when window manager decides to adjust the pinned stack bounds because of the IME, or
|
||||
@@ -54,12 +53,6 @@ oneway interface IPinnedStackListener {
|
||||
*/
|
||||
void onImeVisibilityChanged(boolean imeVisible, int imeHeight);
|
||||
|
||||
/**
|
||||
* Called when window manager decides to adjust the minimized state, or when the listener
|
||||
* is first registered to allow the listener to synchronized its state with the controller.
|
||||
*/
|
||||
void onMinimizedStateChanged(boolean isMinimized);
|
||||
|
||||
/**
|
||||
* Called when the set of actions for the current PiP activity changes, or when the listener
|
||||
* is first registered to allow the listener to synchronized its state with the controller.
|
||||
@@ -99,13 +92,4 @@ oneway interface IPinnedStackListener {
|
||||
* Called by the window manager when the aspect ratio is reset.
|
||||
*/
|
||||
void onAspectRatioChanged(float aspectRatio);
|
||||
|
||||
/**
|
||||
* Called by the window manager to notify the listener to prepare for PiP animation.
|
||||
* Internally, the target bounds would be calculated from the given {@param aspectRatio}
|
||||
* and {@param bounds}, the saved reentry snap fraction also contributes.
|
||||
* Caller would wait for a IPinnedStackController#startAnimation callback to actually
|
||||
* start the animation, see details in IPinnedStackController.
|
||||
*/
|
||||
void onPrepareAnimation(in Rect sourceRectHint, float aspectRatio, in Rect bounds);
|
||||
}
|
||||
|
||||
@@ -76,13 +76,6 @@ interface IRecentsAnimationController {
|
||||
*/
|
||||
void hideCurrentInputMethod();
|
||||
|
||||
/**
|
||||
* This call is deprecated, use #setDeferCancelUntilNextTransition() instead
|
||||
* TODO(138144750): Remove this method once there are no callers
|
||||
* @deprecated
|
||||
*/
|
||||
void setCancelWithDeferredScreenshot(boolean screenshot);
|
||||
|
||||
/**
|
||||
* Clean up the screenshot of previous task which was created during recents animation that
|
||||
* was cancelled by a stack order change.
|
||||
|
||||
Reference in New Issue
Block a user