Revert "Fix window transformation related issue"

This reverts commit 867210c1de.

This commit is being reverted because the logic it tries to fix does not
make sense and caused a regression causing all animation positions to be
offset incorrectly but applying the animation metrics before applying the
window offset (mainly for bottom screen in multiwindow). The original
case this tries to fix is for older apps like gallery2 which crashes
(ramdump) when trying reproduce the steps.

Fixes: 34769878
Test: ran original case that this tried to fix and played with recents
related to the new bug it created
This commit is contained in:
Matthew Ng
2017-02-03 11:56:08 -08:00
parent ec3211830e
commit 34a06d148e

View File

@@ -915,10 +915,15 @@ class WindowStateAnimator {
if (attachedTransformation != null) {
tmpMatrix.postConcat(attachedTransformation.getMatrix());
}
tmpMatrix.postTranslate(frame.left + mWin.mXOffset, frame.top + mWin.mYOffset);
if (appTransformation != null) {
tmpMatrix.postConcat(appTransformation.getMatrix());
}
// The translation that applies the position of the window needs to be applied at the
// end in case that other translations include scaling. Otherwise the scaling will
// affect this translation. But it needs to be set before the screen rotation animation
// so the pivot point is at the center of the screen for all windows.
tmpMatrix.postTranslate(frame.left + mWin.mXOffset, frame.top + mWin.mYOffset);
if (screenAnimation) {
tmpMatrix.postConcat(screenRotationAnimation.getEnterTransformation().getMatrix());
}