diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-05-03 09:59:51 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-05-03 10:02:59 -0700 |
commit | 4c8e5dd275d0df820b5bd367b35ad3f7c55fb7ab (patch) | |
tree | 6db98492993245bb44502b9233d81c8aa738be4b /quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java | |
parent | cd5ed8b28f6813d2ae0670fe1bc2d20c533fbb2c (diff) | |
parent | a3c0a082f9fe84e007596646e544371fc4df277f (diff) | |
download | android_packages_apps_Trebuchet-4c8e5dd275d0df820b5bd367b35ad3f7c55fb7ab.tar.gz android_packages_apps_Trebuchet-4c8e5dd275d0df820b5bd367b35ad3f7c55fb7ab.tar.bz2 android_packages_apps_Trebuchet-4c8e5dd275d0df820b5bd367b35ad3f7c55fb7ab.zip |
Merging ub-launcher3-qt-dev, build 5528135
Test: Manual
Bug:119847865 'CANCEL' option does not disappear immediately after adding Gmail widget to Home page
Bug:123874711 APR: StrictMode Violation in systemui: at android.view.SurfaceControl
Bug:128364741 Launcher surface cropped during gesture in multiwindow mode
Bug:129297366 [Gesture Nav] Swipe up to home: Forced adaptive icon switches to normal during animation
Bug:129297464 [Gesture Nav] Exclude edges from most Launcher / Overview states.
Bug:129434166 Lab-only flake: drag to workspace doesn't happen
Bug:129796627 [Gesture Nav] Allow disabling home gesture for Tips app for first-time setup
Bug:129883568 Update task view outline with task thumbnail progress
Bug:130558787 [Tests broken/flaky] home button not visible to accessibility in 2-button mode
Bug:130618737 Home, Back key, Recent Key not working in All app page. (Will pop up under layer app.)
Bug:130689544 Unable to quickswitch apps under landscape mode
Bug:130802487 [Gestural Navigation Bar] Swipe up for home not working
Bug:130828765 [Gesture Nav] App launch is not smooth in landscape mode when fully gestural navigation is ON
Bug:130905838 [Gesture Nav] Implement a11y gesture
Bug:131088901 In multiwindow mode, swipe up navigation to overview screen not working.
Bug:131116002 Convert tests to TAPL and enable them
Bug:131170582 [Flaky test] TaplTestsLauncher3.testDragShortcut
Bug:131188880 [Failing test] AppPredictionsUITests.testPredictionExistsInAllApps
Bug:131242470 Swipe up to home is broken in RTL
Bug:131310726 Pixel QSB – app titles are black and long press overlay is white
Bug:131360075 [Gesture Nav] Polish/finish landscape
Bug:131367388 Recents Go order is occasionally reversed
Bug:131419978 [Massive test failure] Switching to 3-button mode results in 2-button mode (at least on Crosshatch)
Bug:131420412 java.lang.AssertionError: http://go/tapl : App didn't start: BySelector [PKG='\Qcom.android.chrome\E']
Bug:131427332 Thumbnail views sometimes don't update to orientation in Recents Go
Bug:131434765 [Android Go - Mediatek] KB3 "Recents" button no longer works
Bug:131436393 When quick switching and grabbing again before animation complete, task scales up slightly
Bug:131552865 Can't swipe up for home
Bug:131610834 Align recents Go layout to 4/8 dp grid
Bug:131626311 System bars should not clip Recents Go items
Bug:131628231 Disable com.google.android.contacts
Bug:131630813 FallbackRecentsTest failing in 0-button mode
Bug:131636735 Additional white space for top item is too large
Bug:131686863 Don't clip children while swiping task items out on Recents Go
Bug:131689686 Disable window corners when quickswitching in multiwindow mode
Bug:131708240 When Go Recents is empty, the first tap to go to recents doesnt do anything
Bug:131772711 [Failing test] AppPredictionsUITests.testPredictionsDisabled
Bug:131775822 Allow touches on launcher while animating to home
Bug:131779031 Anti-alias thumbnail rounded corners in Recents Go
Bug:131809649 The going home animation goes to quick shortcut if app is in the folder
Bug:131834685 Status bar left side not readable when white thumbnail is behind it
Bug:131848689 Recents Go: Off screen thumbnails don't change orientation
Bug:69236787 Expanding an app folder is slow if there are many folders on the same desktop
Change-Id: I2218d330f4959a3dbc13e48e61e93c36989fd052
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java')
-rw-r--r-- | quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java index 71f33c3fe..c9f4ab437 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java @@ -31,11 +31,12 @@ import android.graphics.RectF; import android.os.Build; import android.os.RemoteException; +import androidx.annotation.Nullable; + import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.Utilities; -import com.android.launcher3.util.Themes; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.RecentsModel; import com.android.quickstep.views.RecentsView; @@ -50,8 +51,6 @@ import com.android.systemui.shared.system.WindowManagerWrapper; import java.util.function.BiFunction; -import androidx.annotation.Nullable; - /** * Utility class to handle window clip animation */ @@ -81,6 +80,7 @@ public class ClipAnimationHelper { private final RectF mClipRectF = new RectF(); private final RectFEvaluator mRectFEvaluator = new RectFEvaluator(); private final Matrix mTmpMatrix = new Matrix(); + private final Rect mTmpRect = new Rect(); private final RectF mTmpRectF = new RectF(); private final RectF mCurrentRectWithInsets = new RectF(); // Corner radius of windows, in pixels @@ -89,6 +89,8 @@ public class ClipAnimationHelper { private final float mTaskCornerRadius; // If windows can have real time rounded corners. private final boolean mSupportsRoundedCornersOnWindows; + // Whether or not to actually use the rounded cornders on windows + private boolean mUseRoundedCornersOnWindows; // Corner radius currently applied to transformed window. private float mCurrentCornerRadius; @@ -103,6 +105,7 @@ public class ClipAnimationHelper { mWindowCornerRadius = getWindowCornerRadius(context.getResources()); mSupportsRoundedCornersOnWindows = supportsRoundedCornersOnWindows(context.getResources()); mTaskCornerRadius = TaskCornerRadius.get(context); + mUseRoundedCornersOnWindows = mSupportsRoundedCornersOnWindows; } private void updateSourceStack(RemoteAnimationTargetCompat target) { @@ -144,8 +147,9 @@ public class ClipAnimationHelper { mSourceRect.set(scaledTargetRect); } - public void prepareAnimation(boolean isOpening) { + public void prepareAnimation(DeviceProfile dp, boolean isOpening) { mBoostModeTargetLayers = isOpening ? MODE_OPENING : MODE_CLOSING; + mUseRoundedCornersOnWindows = mSupportsRoundedCornersOnWindows && !dp.isMultiWindowMode; } public RectF applyTransform(RemoteAnimationTargetSet targetSet, TransformParams params) { @@ -177,7 +181,9 @@ public class ClipAnimationHelper { for (int i = 0; i < targetSet.unfilteredApps.length; i++) { RemoteAnimationTargetCompat app = targetSet.unfilteredApps[i]; mTmpMatrix.setTranslate(app.position.x, app.position.y); - Rect crop = app.sourceContainerBounds; + Rect crop = mTmpRect; + crop.set(app.sourceContainerBounds); + crop.offsetTo(0, 0); float alpha = 1f; int layer = RemoteAnimationProvider.getLayer(app, mBoostModeTargetLayers); float cornerRadius = 0f; @@ -188,7 +194,9 @@ public class ClipAnimationHelper { mTmpMatrix.postTranslate(app.position.x, app.position.y); mClipRectF.roundOut(crop); if (mSupportsRoundedCornersOnWindows) { - cornerRadius = Utilities.mapRange(params.progress, mWindowCornerRadius, + float windowCornerRadius = mUseRoundedCornersOnWindows + ? mWindowCornerRadius : 0; + cornerRadius = Utilities.mapRange(params.progress, windowCornerRadius, mTaskCornerRadius); mCurrentCornerRadius = cornerRadius; } @@ -318,12 +326,14 @@ public class ClipAnimationHelper { float scale = mTargetRect.width() / mSourceRect.width(); float insetProgress = (1 - progress); + float windowCornerRadius = mUseRoundedCornersOnWindows + ? mWindowCornerRadius : 0; ttv.drawOnCanvas(canvas, -mSourceWindowClipInsets.left * insetProgress, -mSourceWindowClipInsets.top * insetProgress, ttv.getMeasuredWidth() + mSourceWindowClipInsets.right * insetProgress, ttv.getMeasuredHeight() + mSourceWindowClipInsets.bottom * insetProgress, - Utilities.mapRange(progress, mWindowCornerRadius * scale, ttv.getCornerRadius())); + Utilities.mapRange(progress, windowCornerRadius * scale, ttv.getCornerRadius())); } public RectF getTargetRect() { |