Commit Graph

13 Commits

Author SHA1 Message Date
Schneider Victor-tulias
cb2a1474a7 Fix icon flash on app launch
Flag: com.android.launcher3.enable_additional_home_animations
Fixes: 343051344
Test: temp logs, launched apps from home, quickly swiped home while quick switching
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9fb1f8043573d5bc3376f0786354fc8f7a9cf2cd)
Merged-In: I91071d53f753eb7bc99305c46241de203bcfdc98
Change-Id: I91071d53f753eb7bc99305c46241de203bcfdc98
2024-06-27 03:45:11 +00:00
Schneider Victor-tulias
65ae550a92 Add support for animating non-running tasks
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
2024-05-01 20:06:34 +00:00
Sunny Goyal
638a687fc8 Converting IconShape to mainThreadInitializedObject instead of
keeping it a process static

Bug: 297950111
Flag: None
Test: Presubmit
Change-Id: Id66100e0cb300659c6017c287eb38ab04290477b
2024-04-25 15:56:30 -07:00
Andy Wickham
b922dccbf5 Cleanup API checks for P, Q, and R.
Test: Build with gradle
Flag: NA
Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
2024-01-24 14:58:08 -08:00
fbaron
3b894e1f70 Fix IllegalArguemntException for ClipIconView#update
The scale was infinity sometimes which means that the view minSize is probably getting set to 0 due to lp height and width being 0, so we do not update the views as they are no longer laid out

Flag: NONE
Test: Opening apps should work fine, but i wasn't able to repro this exception before or after this fix
Fix: 318099222
Change-Id: I1c08346c7ee1d4e89d9c3ba23ee2aa51a451cb31
2024-01-03 12:44:10 -08:00
Kateryna Ivanova
7120373bbc Migrate Interpolators from Launcher3 to the public animation library
Test: atest
Bug: 271850966
Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
2023-05-30 07:20:38 +00:00
Jon Miranda
f23e2d1e16 Keep foreground drawable centered during app open/close animation.
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
2023-03-20 16:13:02 +00:00
Jon Miranda
39334f4013 Allow icons to take up full width in all cases where width > height.
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
2022-03-07 18:17:50 -08:00
Jon Miranda
c9ad2dd6c7 Add new app close implementation.
- 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
2021-04-22 16:11:11 -04:00
Jon Miranda
8f09aa3438 Fix IllegalArgumentException for Float.NaN in ClipIconView.
Bug: 173703326
Test: not able to repo bug but this prevents the code from
      executing in bad case
Change-Id: I3701c040e72e6ce37a624b10bb82b2200935e283
2021-01-22 17:49:36 -05:00
Sunny Goyal
6fd105b69a Updating gesture tutorial home animation
> Using a separate View as icon, instead of the taskView
> Updating swipe animation logic to abstract out FloatingIconView dependency

Change-Id: Ib466262afead11ebe4ca035d589f0382c37e3e97
2020-07-09 07:51:34 -07:00
Jon Miranda
b133a52e86 Fix app open/close animation in landscape.
When we refactored ClipIconView, we never init mIsVerticalBarLayout.
Instead we pass it in along with the rest of the info from FloatingIconView.

Bug: 155039118
Change-Id: Iff93105c512a8e6478dc49d8ab9100fd129af48c
2020-04-30 22:50:59 -07:00
Jon Miranda
4848604882 Polish badge animation on app open/close.
Create new ClipIconView so that the adaptive icon foreground/background can
get clipped properly, and the badge gets drawn separately on top of it.

Bug: 142105172

Change-Id: Ie5d65c20f845d9219fd01daa383f273dde0e096c
2020-03-23 12:24:04 -07:00