It is possible to animate a non-running task to home mid-quick switch, which was not properly supported, causing a janky animation. Added custom animations to handle this more smoothly.
Flag: ACONFIG com.android.launcher3.enable_additional_home_animations DISABLED
Fixes: 237638627
Test: swipe to home mid-quick switch on handheld/large screen in portrait/landscape from an app present/missing on the workscape in RTL/LTR
Change-Id: I89c9cf1ed1c0b88ff6c3ce71a663cb16e69d5843
Also simplifying the bitmap fetching path to return all relevant data in one-call
Bug: 299336510
Test: Verified that the icons are themed during drag and app launch
Flag: ENABLE_FORCED_MONO_ICON
Change-Id: Ib4c457e911e7b5616e8370d111cc68c5d6401fe6
Bug: 288491653
Test: Verify that dragging icons with work badge have the right badge theming and that when the icons are animatng (e.g swipe to go back home from app) have the right themed/non-themed work badge
Change-Id: I3d75e83ebab0d99866f1fe3688dc06bb7e933a6e
- In the case where the system does not play the requested animation
we can still ensure that this doesn't result in a leak of the
activity by resetting the result when launcher is hidden (which
happens after the launch transition)
Bug: 285995223
Test: Presubmit
Test: Take heapdump after repro steps in b/285995223#comment6 and verify
there are no lingering static icon load results
Change-Id: I1d169df158cfaab64fbe1f4ce597d8f73d86a1c1
The array mTmpObjArray is not properly clean but ther is no need
for the array to be global since every time is used is provided
so a use of a local variable will make sure is never leaked.
Fix: 269163620
Test: the flake related to memory leak on testWorkspace should dissapear
Change-Id: I29fb3dd6419f621f2ccce9db2fc5ed86358f7516
Prior to this change, if taskbar is showing and we are cloing an app
that is visible in the taskbar, the taskbar view would immediately
disappear.
Now we will fade out the view until the animation is 33% complete,
at which point the 'space' will be clear for the FloatingIconView
to settle at its final location.
Bug: 273961611
Test: open app in hotseat
note that the taskbar view is gone immediately
have taskbar visible, close app that is shown in taskbar
note that the taskbar view fades out
Change-Id: I5589e2ce3033cfa19669d1bfaf568aef2a96015e
For apps that use AdaptiveIcon, we used to animate the foreground
drawable independently from the background. This is sometimes
perceived as jank so we remove the animation since it is very subtle
in the best case scenario.
Bug: 268026344
Test: open/close apps/folders that use AdaptiveIcons
Change-Id: I500bf56e04823757d511d909a93d3b30703249a1
Bug: 246635237
Test: open app in hotseat
close app in hotseat
the 'matching' view in taskbar should be hidden
tested icon, predicted icon, folders in taskbar/hotseat
Change-Id: I74382480826afafe6ae58e78faf26fe10812e29b
Bug: 235812580
Test: Verified the correct "Swipe Back to Home" position for the
floating icon view in landscape and portrait (rtl and ltr for both
orientations) with a tablet. There is a screen recording on the bug.
Change-Id: Id06f43e70ef617e39e1b26d0c8b7466147e325d2
Previously, if a user tapped on the clock icon then rapidly swiped back,
the clock icon would stop updating. This fixes that issue by avoiding
changes to the original icon's inner callback state while preparing and
displaying the FloatingIconView.
Bug: 188377749
Test: Locally enabled the second hand on the clock icon in addition to
the minute and hour hands, then verified that it was incrementing
correctly every second even after tapping then rapidly swiping back on
the clock icon.
Change-Id: Ib8eddb53de293194e5f9dce2fcafe8a481a6116c
> Only clearing bitmap for foreground layer.
Background and dot have only one draw command and is waster without rasterizing
> Moving bitmap creation to background thread
> Removing folder clipping since the folder draws outside bounds anyway
> Fixing the size of the foreground layer to what is actually needed
Bug: 224945025
Test: Manual
Change-Id: I72a8149ce4c44c266d5bdf45368d3dda5a960ac2
Previously we only let the icons take up the max width if the
device was in vertical bar layout. For tablets this meant
that the icons would be smaller than the actual window crop.
We want the full width in any cases where the profile width
is greater than the height, so created a new method to check for that.
Bug: 203157974
Test: phone/tablet in portrait/landscape
Change-Id: I467f142bac87ec7c3b369c01f8d9c96ddf74fc76
This properly hides just the icon/dot and leaves the
text for All Apps views during the app launch/exit animation.
Bug: 213306709
Test: open/close apps on workspace, open/swipe back apps in all apps
Change-Id: I327ce3e41298e50e34b8809491fc6d97a89f9f96
Fixes bug where animations uses themed icons in All Apps, where the
icons are not themed.
We want the DragView themed since all valid drop locations will have it
appear themed.
Bug: 215650713
Test: open/close an app from All Apps
Change-Id: I9969ce4921831dd12858ed9b0fe64379e9e3b188
& Make sure properties are reset when recycled.
This fixes the bug that causes BubbleTextView drawable not to get set.
Bug: 207389002
Test: locally disable loading AdaptiveIcons, ensure BubbleTextView
drawable always gets drawn for closing animation
Change-Id: Ifdbf3e733e27918c57a5e9b23e5a11b65f8f338c
Has been enabled for past few releases, no longer needed
as a debug flag.
Bug: 209856611
Test: manual
Change-Id: Id25e36522636e5c5d8ee60cdec49b3ee3f4d4251
- We already display the BubbleTextView icon during app close
since we need the shadows to ensure a clean handoff.
- Previously, we waited until the icon and the AdaptiveIcon were
both loaded to show the FloatingIconView.
- This change immediately shows the BubbleTextView icon so that
we can have something displayed in the cases where AdaptiveIcon
is slow to load (ie. immediately after killing/restarting launcher).
Currently there are cases where we defer some BubbleTextView drawing to
ClipIconView. We can refactor in master so that ClipIconView is only used
when drawable is an AdaptiveIcon.
Bug: 207389002
Test: manual
Change-Id: Ie54642fef4258862a155ab0aba6e49cea9c9ead0
- Prediction row views were never updated when notification changes.
- FloatingIconView set the BubbleTextView to force hide dot, but never restored it.
BubbleTextView is instanceof IconLabelDotView, so its already handled in the end runnable
Bug: 183360736
Test: 1. swipe up to go home such that the closing app has a notification,
note that the notification dot is properly updated
2. have all apps open
make notification update for a predicted app
ensure dot is properly updated
Change-Id: I35dacf9b71a3d8b8a857be450690d65ea9199bf6
- Delay app launch animations by a frame, and skip logic to skip the first frame.
- Note the icon pressed state animation still occurs, so there is still some
visual feedback for the user that something is happening.
Bug: 181901105
Test: ensure animation still looks smooth (using window animation scale & record in slow mo)
Change-Id: Ia904b8b96301042c900e0589f33fc625c1c1148b
Merged-In: Ia904b8b96301042c900e0589f33fc625c1c1148b
- Added support for widgets for the new close animation.
- This anim is used with the new app close.
- This anim is not compataible with the old app close, so we need to
keep StaggeredWorkspaceAnim in case we turn the app close flag off.
- We will also use this anim in the lockscreen to launcher anim, will
connect them in a follow up CL.
Bug: 188413065
Bug: 173107751
Test: manual
Change-Id: Icab3fd700f2c268bb1c4509a37466e4e6748f789
have its own set of temp variables.
- Pass in float[] param to not create new obj in each frame
for dragging widget case.
Bug: 175329686
Bug: 187019711
Test: manual, verify
Change-Id: I4350fb7e66a80c73def5659fb41abc14d357e667
This reverts commit 17fda29bf3.
Reason for revert: Fixing the memory leak
Leak was detected in caused launcher tapl tests to fail.
For instructions on how to debug leaks, see go/launcher-testing.
Using AS memory profiler, the color extractor class is holding
onto a reference to launcher that has already been destroyed.
The fix is to set the listener to null when view is closed.
Bug: 175329686
Test: run profiler in AS, open and close popups, and verify no leaks
Change-Id: I2d4a87f0481cbc88f3587dce91278e85ca113545
This reverts commit 242c805f82.
Reason for revert: Introduces a leak. I haven't seen a bug for it yet, but this CL is the only in the culprit list; the leak can block multiple teams presubmits, and the leak is via ArrowPopup. Enough evidence.
https://fusion2.corp.google.com/invocations/4b50db71-d598-4e52-9076-e91d42b65014/targets
Change-Id: I1700a9eea8705983598aee43c0a63e67c1d9cf71
Bug: 187075409
- Updated logic to accept any view that is a a child of draglayer
(from being workspace dependent)
- Move color extraction logic from widget class to utility class.
- Initial CL, future CL will interpolate between colors
and expand color extraction to other abstract floating views.
Bug: 175329686
Test: long press on colorful wallpaper and test colors are extracted
test in multiwindow mode
Change-Id: I18a6bb5013de4eea7e9b45810401f5b9b3cd7302
- We remove the fling completely
- We set damping to 1 for x/y springs so there is no
bounciness, and updated the stiffness and bounds to tighten
up the path to the final location.
- During the animation, we translate all launcher content
down
- When the x/y springs, and rect animator all finish,
we use a spring to bounce the launcher content back up
- Added AppCloseConfig so that the entire animation can
be defined in one location, with getter methods so that
all the involved parties of the animation can access the
current value.
- The animations are all defined linearly, and then
interpolated over using a 3 point curve.
Building behind feature flag as we tune the values.
Bug: 173107751
Test: manual, visual
Change-Id: I83ad0fa2c4234cf30004240d43e191354595adc8
Swiping up to go home on an app that is downloading incrementally would cause a jittery animation. Updated FloatingIconView to animate directly to a PreloadIconDrawable.
Demo: https://drive.google.com/file/d/1ddr8OGR4c1ZneyQ0VkkAAxGpwNcP8Wyn/view?usp=sharing
Fixes: 177685929
Test: manual
Change-Id: I4cd2daa18f6d3fed42a9b666063e0b1c1c46e5d9
(cherry picked from commit b8cab8d878)
The BubbleTextView drawable has built in shadows.
Prior to this, we waited for the FloatingIconView to finish
animating into place before fading in the BubbleTextView behind it.
We did this to prevent the shadow from blinking in.
Now that we've refactored FloatingIconView & ClipIconView,
we draw the BubbleTextView behind the ClipIconView so that the shadow is
revealed when the icon finishes clipping to its final shape and it
no longer has to be faded in.
Bug: 168608912
Change-Id: Ic0809f74ecbbec2f6e7caf7eca2fb560a8a02dec
When user swipes up to home, Launcher will receive a onNewIntent
callwith a bundle-extra gesture_nav_contract_v1. It will contain
the componentName & UserHandle of the closing app & a callback.
Launcher can use the callback to return the final position where
the app should animate to and an optional surface to be used for
crossFade animation. The surface cleanup can be handled in
onEnterAnimationComplete.
Change-Id: I76fdd810fdcb80b71f7d7588ccac8976d9dfe278
> Using a separate View as icon, instead of the taskView
> Updating swipe animation logic to abstract out FloatingIconView dependency
Change-Id: Ib466262afead11ebe4ca035d589f0382c37e3e97