diff options
author | Winson Chung <winsonc@google.com> | 2019-05-18 22:01:28 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2019-05-19 05:03:33 +0000 |
commit | 90eb08d838b890d14a9af3a345899c074d6aa141 (patch) | |
tree | 7ba4ff54e4999a9e9aea229714ea50c2d924e2e7 /quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java | |
parent | 662f12fe6206d571bad8c1bc013be31dae87806a (diff) | |
parent | 0de5939638d95f7f5111aaf1ee7927be19efd5e6 (diff) | |
download | android_packages_apps_Trebuchet-90eb08d838b890d14a9af3a345899c074d6aa141.tar.gz android_packages_apps_Trebuchet-90eb08d838b890d14a9af3a345899c074d6aa141.tar.bz2 android_packages_apps_Trebuchet-90eb08d838b890d14a9af3a345899c074d6aa141.zip |
Merging ub-launcher3-qt-dev, build 5582981
Test: Manual
Bug:118758696 Define grid display options
Bug:123900446 App to home animation should zoom into the app icon
Bug:124510042 [Gesture Nav] Home animation polish
Bug:129985827 [Fully Gestural Navigation] Delay Recents animation when swiping up
Bug:130020567 Handle fullscreen correctly for quick switch
Bug:130193889 Half screenshot in the app switcher
Bug:130292844 App close animation is slightly off for Squircle adaptive icons
Bug:130451254 QSB/Folder icon color depends on three variants of wallpaper shade on light/dark theme
Bug:130521490 Dock bar is too close to the edge when in landscape home screen
Bug:130689544 Unable to quickswitch apps under landscape mode
Bug:131231579 Long-swipe up to app drawer goes to overview
Bug:131360075 [Gesture Nav] Polish/finish landscape
Bug:132269977 Pixel launcher crashed while swiping up home button after disabling an app
Bug:132309376 Launcher held ION buffers after clearing all apps in Recent Apps
Bug:132458092 Recents Go: Transparent apps have double vision for apps to recents
Bug:132584688 Disallowed association between launcher and aiai
Bug:132816938 [Please fix ASAP] Failed test: sometimes home screen doesn't have all_apps
Bug:132892578 Split screen option missing for recent apps after restarting / upgrading the device.
Bug:132898688 NPE in 'com.android.quickstep.views.TaskThumbnailView com.android.quickstep.views.TaskView.getThumbnail()'
Bug:132908798 Gesture haptic double triggers
Bug:132916535 Handle multi-touch
Bug:74500048 Fix launcher transition while in startActivityForResult
Change-Id: I68d6af2ec47f2b379f5607685b2257029ab07a91
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 | 34 |
1 files changed, 8 insertions, 26 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 3121dc379..805cf3328 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 @@ -285,13 +285,20 @@ public class ClipAnimationHelper { /** * Compute scale and translation y such that the specified task view fills the screen. */ - public LauncherState.ScaleAndTranslation getOverviewFullscreenScaleAndTranslation(TaskView v) { + public ClipAnimationHelper updateForFullscreenOverview(TaskView v) { TaskThumbnailView thumbnailView = v.getThumbnail(); RecentsView recentsView = v.getRecentsView(); fromTaskThumbnailView(thumbnailView, recentsView); Rect taskSize = new Rect(); recentsView.getTaskSize(taskSize); updateTargetRect(taskSize); + return this; + } + + /** + * @return The source rect's scale and translation relative to the target rect. + */ + public LauncherState.ScaleAndTranslation getScaleAndTranslation() { float scale = mSourceRect.width() / mTargetRect.width(); float translationY = mSourceRect.centerY() - mSourceRect.top - mTargetRect.centerY(); return new LauncherState.ScaleAndTranslation(scale, 0, translationY); @@ -332,35 +339,10 @@ public class ClipAnimationHelper { mSourceStackBounds.offset(left, insets.top + fullDp.availableHeightPx - taskHeight); } - public void drawForProgress(TaskThumbnailView ttv, Canvas canvas, float progress) { - RectF currentRect = mRectFEvaluator.evaluate(progress, mSourceRect, mTargetRect); - canvas.translate(mSourceStackBounds.left - mHomeStackBounds.left, - mSourceStackBounds.top - mHomeStackBounds.top); - mTmpMatrix.setRectToRect(mTargetRect, currentRect, ScaleToFit.FILL); - - canvas.concat(mTmpMatrix); - canvas.translate(mTargetRect.left, mTargetRect.top); - - 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, windowCornerRadius * scale, ttv.getCornerRadius())); - } - public RectF getTargetRect() { return mTargetRect; } - public RectF getSourceRect() { - return mSourceRect; - } - public float getCurrentCornerRadius() { return mCurrentCornerRadius; } |