Merge "Fix some cases when enabling hierarchical animation"
This commit is contained in:
committed by
Android (Google) Code Review
commit
72973ef6e8
@@ -5934,7 +5934,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
mAnimationBoundsLayer = createAnimationBoundsLayer(t);
|
||||
|
||||
// Crop to stack bounds.
|
||||
t.setWindowCrop(mAnimationBoundsLayer, mTmpRect);
|
||||
if (!WindowManagerService.sHierarchicalAnimations) {
|
||||
// For Hierarchical animation, we don't need to set window crop since the leash
|
||||
// surface size has already same as the animating container.
|
||||
t.setWindowCrop(mAnimationBoundsLayer, mTmpRect);
|
||||
}
|
||||
t.setLayer(mAnimationBoundsLayer, layer);
|
||||
|
||||
// Reparent leash to animation bounds layer.
|
||||
@@ -5982,9 +5986,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
return;
|
||||
}
|
||||
clearThumbnail();
|
||||
final Transaction transaction = getAnimatingContainer().getPendingTransaction();
|
||||
mThumbnail = new WindowContainerThumbnail(mWmService.mSurfaceFactory,
|
||||
getPendingTransaction(), this, thumbnailHeader);
|
||||
mThumbnail.startAnimation(getPendingTransaction(), loadThumbnailAnimation(thumbnailHeader));
|
||||
transaction, getAnimatingContainer(), thumbnailHeader);
|
||||
mThumbnail.startAnimation(transaction, loadThumbnailAnimation(thumbnailHeader));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6011,13 +6016,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
if (thumbnail == null) {
|
||||
return;
|
||||
}
|
||||
final Transaction transaction = getAnimatingContainer().getPendingTransaction();
|
||||
mThumbnail = new WindowContainerThumbnail(mWmService.mSurfaceFactory,
|
||||
getPendingTransaction(), this, thumbnail);
|
||||
transaction, getAnimatingContainer(), thumbnail);
|
||||
final Animation animation =
|
||||
getDisplayContent().mAppTransition.createCrossProfileAppsThumbnailAnimationLocked(
|
||||
win.getFrameLw());
|
||||
mThumbnail.startAnimation(getPendingTransaction(), animation, new Point(frame.left,
|
||||
frame.top));
|
||||
mThumbnail.startAnimation(transaction, animation, new Point(frame.left, frame.top));
|
||||
}
|
||||
|
||||
private Animation loadThumbnailAnimation(GraphicBuffer thumbnailHeader) {
|
||||
|
||||
@@ -42,6 +42,7 @@ import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
|
||||
import static com.android.server.wm.WindowManagerService.logWithStack;
|
||||
import static com.android.server.wm.WindowManagerService.sHierarchicalAnimations;
|
||||
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_AFTER_ANIM;
|
||||
|
||||
import android.annotation.CallSuper;
|
||||
@@ -1855,7 +1856,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
||||
// TODO: Remove this and use #getBounds() instead once we set an app transition animation
|
||||
// on TaskStack.
|
||||
Rect getAnimationBounds(int appStackClipMode) {
|
||||
return getBounds();
|
||||
return getDisplayedBounds();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1929,7 +1930,11 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
||||
|
||||
// Separate position and size for use in animators.
|
||||
mTmpRect.set(getAnimationBounds(appStackClipMode));
|
||||
mTmpPoint.set(mTmpRect.left, mTmpRect.top);
|
||||
if (sHierarchicalAnimations) {
|
||||
getRelativeDisplayedPosition(mTmpPoint);
|
||||
} else {
|
||||
mTmpPoint.set(mTmpRect.left, mTmpRect.top);
|
||||
}
|
||||
mTmpRect.offsetTo(0, 0);
|
||||
|
||||
final RemoteAnimationController controller =
|
||||
|
||||
Reference in New Issue
Block a user