diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-04-05 15:11:20 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-04-05 15:11:42 -0700 |
commit | c7cc3dc2c59d5fcb7817a9aa8377298fbc4f198f (patch) | |
tree | c50cabff0cc44c4037165237fc56d2b60e66a3f2 /quickstep/src/com/android/launcher3 | |
parent | fc6781992de267b4aa0850e06bbfed964f0f9dbc (diff) | |
download | android_packages_apps_Trebuchet-c7cc3dc2c59d5fcb7817a9aa8377298fbc4f198f.tar.gz android_packages_apps_Trebuchet-c7cc3dc2c59d5fcb7817a9aa8377298fbc4f198f.tar.bz2 android_packages_apps_Trebuchet-c7cc3dc2c59d5fcb7817a9aa8377298fbc4f198f.zip |
Removing unnecessary corner size caching in RecentsModel
Change-Id: I1be87dc15a3b9ec8225dccce701bff19785658d6
Diffstat (limited to 'quickstep/src/com/android/launcher3')
-rw-r--r-- | quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java index f77bd6513..cda9d4f34 100644 --- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java +++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java @@ -31,6 +31,7 @@ import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.dragndrop.DragLayer.ALPHA_INDEX_TRANSITIONS; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; import static com.android.quickstep.TaskUtils.taskIsATargetWithMode; +import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; @@ -63,12 +64,12 @@ import com.android.launcher3.shortcuts.DeepShortcutView; import com.android.launcher3.util.MultiValueAlpha; import com.android.launcher3.util.MultiValueAlpha.AlphaProperty; import com.android.launcher3.views.FloatingIconView; -import com.android.quickstep.RecentsModel; import com.android.quickstep.util.MultiValueUpdateListener; import com.android.quickstep.util.RemoteAnimationProvider; import com.android.quickstep.util.RemoteAnimationTargetSet; import com.android.systemui.shared.system.ActivityCompat; import com.android.systemui.shared.system.ActivityOptionsCompat; +import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.RemoteAnimationAdapterCompat; import com.android.systemui.shared.system.RemoteAnimationDefinitionCompat; import com.android.systemui.shared.system.RemoteAnimationRunnerCompat; @@ -473,6 +474,10 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans }); float shapeRevealDuration = APP_LAUNCH_DURATION * SHAPE_PROGRESS_DURATION; + + final float windowRadius = mDeviceProfile.isMultiWindowMode + ? 0 : getWindowCornerRadius(mLauncher.getResources()); + appAnimator.addUpdateListener(new MultiValueUpdateListener() { FloatProp mDx = new FloatProp(0, dX, 0, xDuration, AGGRESSIVE_EASE); FloatProp mDy = new FloatProp(0, dY, 0, yDuration, AGGRESSIVE_EASE); @@ -514,13 +519,6 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans float transX0 = temp.left - offsetX; float transY0 = temp.top - offsetY; - float windowRadius = 0; - if (!mDeviceProfile.isMultiWindowMode && - RecentsModel.INSTANCE.get(mLauncher).supportsRoundedCornersOnWindows()) { - windowRadius = RecentsModel.INSTANCE.get(mLauncher) - .getWindowCornerRadius(); - } - SurfaceParams[] params = new SurfaceParams[targets.length]; for (int i = targets.length - 1; i >= 0; i--) { RemoteAnimationTargetCompat target = targets[i]; @@ -651,7 +649,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans ValueAnimator unlockAnimator = ValueAnimator.ofFloat(0, 1); unlockAnimator.setDuration(CLOSING_TRANSITION_DURATION_MS); float cornerRadius = mDeviceProfile.isMultiWindowMode ? 0 : - RecentsModel.INSTANCE.get(mLauncher).getWindowCornerRadius(); + QuickStepContract.getWindowCornerRadius(mLauncher.getResources()); unlockAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { @@ -677,8 +675,8 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans Matrix matrix = new Matrix(); ValueAnimator closingAnimator = ValueAnimator.ofFloat(0, 1); int duration = CLOSING_TRANSITION_DURATION_MS; - float windowCornerRadius = mDeviceProfile.isMultiWindowMode ? 0 : - RecentsModel.INSTANCE.get(mLauncher).getWindowCornerRadius(); + float windowCornerRadius = mDeviceProfile.isMultiWindowMode + ? 0 : getWindowCornerRadius(mLauncher.getResources()); closingAnimator.setDuration(duration); closingAnimator.addUpdateListener(new MultiValueUpdateListener() { FloatProp mDy = new FloatProp(0, mClosingWindowTransY, 0, duration, DEACCEL_1_7); |