Merge "Ensure Gesture Nav Edu animation scales to fit different screen sizes" into udc-qpr-dev am: 15b0c9ea54

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24623620

Change-Id: I76dcb5ab590f458fdebb2b171e3faf58d7d919f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index ed2d18a..545a94d 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -226,13 +226,11 @@
             return;
         }
         Matrix scaleMatrix = new Matrix();
-        float pivotX = mScreenWidth / 2f;
-        float pivotY = mScreenHeight;
         float scaleFactor = mScreenWidth / animationBoundsRect.width();
+        float heightTranslate = (mScreenHeight - (scaleFactor * animationBoundsRect.height()));
 
-        scaleMatrix.postScale(scaleFactor, scaleFactor, pivotX, pivotY);
-        scaleMatrix.postTranslate(0,
-                mTutorialFragment.getDeviceProfile().heightPx - animationBoundsRect.height());
+        scaleMatrix.postScale(scaleFactor, scaleFactor);
+        scaleMatrix.postTranslate(0, heightTranslate);
         mAnimatedGestureDemonstration.setImageMatrix(scaleMatrix);
     }