Merge "Fix ActivityRecord#attachCrossProfileAppsThumbnailAnimation issue" into rvc-dev

This commit is contained in:
Ming-Shin Lu
2020-03-18 16:01:35 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 6 deletions

View File

@@ -5936,7 +5936,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (win == null) {
return;
}
final Rect frame = win.getFrameLw();
final Rect frame = win.getRelativeFrameLw();
final int thumbnailDrawableRes = task.mUserId == mWmService.mCurrentUserId
? R.drawable.ic_account_circle
: R.drawable.ic_corp_badge;
@@ -5946,12 +5946,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (thumbnail == null) {
return;
}
final Transaction transaction = getAnimatingContainer().getPendingTransaction();
final Transaction transaction = getPendingTransaction();
mThumbnail = new WindowContainerThumbnail(mWmService.mSurfaceFactory,
transaction, getAnimatingContainer(), thumbnail);
transaction, getTask(), thumbnail);
final Animation animation =
getDisplayContent().mAppTransition.createCrossProfileAppsThumbnailAnimationLocked(
win.getFrameLw());
frame);
mThumbnail.startAnimation(transaction, animation, new Point(frame.left, frame.top));
}

View File

@@ -97,7 +97,7 @@ class WindowContainerThumbnail implements Animatable {
// TODO: This should be attached as a child to the app token, once the thumbnail animations
// use relative coordinates. Once we start animating task we can also consider attaching
// this to the task.
mSurfaceControl = mWindowContainer.makeSurface()
mSurfaceControl = mWindowContainer.makeChildSurface(mWindowContainer.getTopChild())
.setName("thumbnail anim: " + mWindowContainer.toString())
.setBufferSize(mWidth, mHeight)
.setFormat(PixelFormat.TRANSLUCENT)
@@ -209,7 +209,7 @@ class WindowContainerThumbnail implements Animatable {
@Override
public Builder makeAnimationLeash() {
return mWindowContainer.makeSurface();
return mWindowContainer.makeChildSurface(mWindowContainer.getTopChild());
}
@Override