Commit Graph

96 Commits

Author SHA1 Message Date
Jon Miranda
53246e5fdc Fix bug where floating view is removed before window animation is complete.
This fix attaches the AnimatorListenerAdapter on the parent AnimatorSet
to ensure all animations are complete before removing the floating view.

Bug: 110156760
Change-Id: I56638d745227e414583fa47a202c9aaa33874baa
2018-06-19 16:13:10 -07:00
Jorim Jaggi
fca9eec464 Optimize system bar switching animations
- Fix a bug where the wrong time was used when the activity was in
overview, but overview wasn't actually visible.
- Fixing this looks pretty bad. Introduce a pre-delay since our
animations decelarate heavily at the end.
- Consolidate logic between swipe-up and swipe-down. Take a middle
value that is most in line with the other animations.

Test: Open/close apps from home and recents with and without
swiping.
Fixes: 109906294

Change-Id: I9cd5568c60fe7281d0f71a75981a3003770e659e
2018-06-13 14:44:18 +02:00
Sunny Goyal
c82c6396e9 Moving clear all button inside the recents view
Bug: 72222505
Bug: 109828536

Change-Id: I843b79db3e47abc2c41ed78f186b9c941941ddef
2018-06-11 13:51:03 -07:00
Winson Chung
1cabec12ea Merge changes from topic "am-6122ccdb-5b5a-43f4-8f32-3d9e1a775ee9" into ub-launcher3-edmonton-polish
* changes:
  [automerger] Set correct target position for other targets am: 707c09d3e3
  Set correct target position for other targets
2018-06-08 19:19:29 +00:00
Sunny Goyal
a04c779f86 Reset the UI to the proper state, if we start the swipe-ui gesture from an
inconsistent state

Bug: 109583168
Change-Id: I451c66bf7643b7c1791c26b5862ca9f7a020f7be
2018-06-07 10:46:39 -07:00
Jorim Jaggi
707c09d3e3 Set correct target position for other targets
Test: Open/close app in split screen
Bug: 109867619
Change-Id: Ice2325e1be2f45c135e1beca63a16afed2d21644
2018-06-07 16:40:18 +02:00
Sunny Goyal
1c63c72c1a Adding a pending invisibility flag, which is used to indicate that the launcher
is not really invisible, but consider it invisible for window transitions

When a recents animation is cancelled, the callback can be received before or after the
wallpaper animation. To ensure that wallpaper animaiton runs properly, we keep the launcher
forceInvisible=true, only for that particular animaiton and false everywhere

Bug: 109735443
Change-Id: I5b22cc3327c8cd53a836d10e09fc88ae103becfc
2018-06-05 16:47:54 -07:00
Jorim Jaggi
c1ee70bf3d Merge changes from topics "am-d455296f-ca9f-4a88-999f-65e8ba3f6b8a", "am-6ed11203-0b52-4aea-b304-3f471c0aa3bf" into ub-launcher3-edmonton
* changes:
  Use SyncRtSurfaceTransactionApplier for recents enter/exit
  Use SyncRtSurfaceTransactionApplier for app opening
2018-06-01 12:27:04 +00:00
Jorim Jaggi
87356e7b48 Merge "Fix binder call for app opening" into ub-launcher3-edmonton 2018-05-29 17:40:56 +00:00
Jorim Jaggi
1008f6d72e Use SyncRtSurfaceTransactionApplier for app opening
To ensure 100% synchronization, fixing jank.

Test: Open and close apps
Bug: 78611607
Change-Id: I6843e88ab1de0b8e7d80e6a6f547b895b527d093
2018-05-28 18:10:47 +02:00
Jorim Jaggi
1d1a3d7242 Fix binder call for app opening
Needs to acquire the AM/WM lock, which may cause jank during
the animation.

Test: Open app, observe no binder calls.
Bug: 78611607
Change-Id: I3459383c9597801405dd9c688837a2bffeeb7f9e
2018-05-28 18:08:40 +02:00
Winson Chung
30d2fc748d Merge "Tweaking quickscrub launch animation for new task sizes." into ub-launcher3-edmonton 2018-05-25 19:54:24 +00:00
Sunny Goyal
4dcda06542 Fixing launcher going to a different state when dragging an icon from different activity
Bug: 80191074
Change-Id: I45ea646dc2bd21627e8b724dac9c9fc23c18797d
2018-05-25 11:56:53 -07:00
Winson Chung
35cde20a17 Tweaking quickscrub launch animation for new task sizes.
Bug: 79945202
Change-Id: Ibe1e53d45bc3fda325cebc14aa6a61f61f08edb0
2018-05-25 10:58:17 -07:00
Jorim Jaggi
0d25fc094d Revert "Use SyncRtSurfaceTransactionApplier for app closing/opening"
This reverts commit 4a545dd1b2.

Reason for revert: Messes up SF vsync timings.
Bug: 78611607

Change-Id: I5978eb65a7bab0d75b4150b8d394a28b38fc1da4
2018-05-23 14:07:08 +00:00
Jorim Jaggi
4a545dd1b2 Use SyncRtSurfaceTransactionApplier for app closing/opening
To ensure 100% synchronization, fixing jank.

Test: Open and close apps
Bug: 78611607
Change-Id: I5646bb259c90b65e1abe0fd67c9918f6a2b196cc
2018-05-23 14:39:13 +02:00
Jon Miranda
73c27ec176 Enable new open app transitions when in multiwindow mode.
Bug: 79118278
Change-Id: Iba79948256d70c913af0a9a584eb040f3a8b4151
2018-05-22 17:25:11 -07:00
Sunny Goyal
32359e6b85 Some quick scrub fixes
> Skipping quick scrub, if its already in progress, or is waiting on previous task launch
> Restoring to proper state is the task animation is cancelled before launcher gets onStop
> Crash when using quickscrub before last list has loaded

Bug: 77289180
Bug: 77856587
Bug: 79919440
Change-Id: I8db127bf9539cfc8f47c1e86c5030637845749d4
2018-05-18 14:10:41 -07:00
Jon Miranda
bbe666631f Fix app open animation when in overview mode.
* Avoids scrim hard line by animating the RecentsViewContainer and
  AllAppsTransitionController progress.

Bug: 79689563
Change-Id: If467e07667ae4d6eeac663608f77bec0eb7ef82f
2018-05-16 12:51:23 -07:00
Sunny Goyal
6001ea2e2f Separating the draglayer alpha into multiple dimensions so that different animaitons
can run without affecting the other.

Bug: 79323355
Bug: 78880824
Change-Id: I11cb464ebdaad0a7f0a56d4bc4c3dff1d56da16b
2018-05-11 12:18:39 -07:00
Jon Miranda
973622e8ec Tweak and fix bugs with new app close transition.
* Animates LauncherRootView instead of DragLayer to avoids the flashing that
  can occur when the overlay callback also changes the DragLayer alpha.
* To avoid the scrim's hard line: we hide it and then fade it in later.
* Launcher animation was wrong in landscape mode.

Change-Id: I7673228f5ed8bb72d7393f3d0769577b262f286f
2018-05-10 15:29:34 -07:00
Jon Miranda
d26d5aaa6d Tweaks to app closing animation.
Change-Id: Ia2cbc1401a57ad8dc3e3553110497eb35c19fe64
2018-05-09 12:51:34 -07:00
android-build-team Robot
db05fc28cf Merge "Tweaks to opening app window animation." into ub-launcher3-edmonton 2018-05-04 22:53:05 +00:00
Winson Chung
9ebc88a381 Fixing transaction regression.
- Need to call setEarlyWakeup() for each transaction, not just the
  first

Bug: 79204453
Change-Id: Ib83bddb9eaeb7563954bc9d7f584fdd5d302b501
2018-05-03 10:57:23 -07:00
Jon Miranda
ce1402132a Tweaks to opening app window animation.
We decrease the the durations for the downward app launch animations (by 80%)
except for the scale animation.

We do this because we want the window to reach the center faster so that the
window never goes off screen as it scales up.

Bug: 78891245

Change-Id: I6ece6ee1f01d32f2fcee42bba6a99c72b82f9023
2018-05-02 13:49:53 -07:00
Jorim Jaggi
bbeedd1d2f Merge "Fix some jank with transitions" into ub-launcher3-edmonton 2018-05-02 13:17:42 +00:00
Sunny Goyal
5fdd300e8a Fixing task open animation in split screen mode
Removing duplicate logic for task bounds calculation and using
ClipAnimationHelper everywhere

Bug: 78126501
Change-Id: I5ed8b2f9162f0bd6144a849f5b677963776d325c
2018-04-27 16:36:19 -07:00
Winson Chung
90749604f4 Fix issue with z order layering
- Move first frame remote animation logic into the same method to ensure
  we consistently update the layers and state for every animation

Bug: 78249267
Change-Id: Id0378cfe3e1be56128c2a1cd607929225927e3b4
2018-04-26 10:58:01 -07:00
Jorim Jaggi
118295e07c Fix some jank with transitions
- Animations in WorkspacePageIndicator while the app transition
was running was causing layer trashing, potentially leading to
jank.
- Make sure to use a layer in the wallpaper open animation.

Test: Open app while indicators are about to fade out.
Bug: 75985430
Change-Id: Iad6a511d98dff81b5cde727f4472f0f039ffc4be
2018-04-26 14:47:44 +02:00
Jorim Jaggi
6e9f6838b8 Post at front of queue for app launch and recents launch
Saves one frame of delay.

Test: Open app, inspect systrace
Fixes: 78503854
Change-Id: I6ca1a039335b833f87ada0dde50ac908e70ae8cb
2018-04-24 16:30:30 +02:00
Sunny Goyal
ed2d2bcbb8 Force finish any pending animations if the insets or orientation change
Some animation might be running from a previous orientation, which can cuase property changes
to get skipped.

Bug: 77848165
Bug: 77774619
Change-Id: I3e198196192746abdd72a1970ff2ef407bf4aff9
2018-04-20 20:53:16 +00:00
Jorim Jaggi
71142fa4ac Fix jank in launcher
The icon grid was reappearing at the end of the animation, causing
slower frame draws at the end of the animation, possibly leading
to jank.

Fix this by waiting with resetting the alpha until the whole
animation is done.

Test: Open/close apps
Bug: 75985430
Change-Id: I8fa62c5f648335ce9d4c4450d52c46465e2d08bf
(cherry picked from commit 197808681d)
2018-04-17 19:59:34 +00:00
Sunny Goyal
3483c52e6b Waiting until onResume before creating the wallpaper-open animation.
Bug: 77853906
Change-Id: I5126855492da59c9dbfef0ce2a97f94662a6522b
2018-04-16 13:01:57 -07:00
Sunny Goyal
7eff40ff2d Several app transition fixes:
> If launcher already started, creating the state transition only after threshold crossed, so that previous animations are not cancelled
> Not posting animaiton callbacks at the front of the queue, as that sometimes causes it get executed before onNewIntent
> Farking the activity as forceInvisible while launching an opaque app, so that quickly pressing home/back runs the reverse animation
> Not running state animations when force-invisible is true

Bug: 77830325
Bug: 77898806
Change-Id: I50a7e915ca35fd6aeb284c8f321ecca74396fe98
2018-04-11 17:08:31 -07:00
Sunny Goyal
82d2074cd2 Merge "Do not reset the previous state animation, if it is a part of the new state animaiton" into ub-launcher3-master 2018-04-10 03:02:02 +00:00
Sunny Goyal
68c47c5620 Adding task open animation in fallback activity
Change-Id: I9a861cc4162b98c067061afad42631dc4fa0e3e2
2018-04-09 17:03:41 -07:00
Sunny Goyal
b35f50cf55 Do not reset the previous state animation, if it is a part of the new state animaiton
Change-Id: Ic433db8cd2b0701923185d0a2db2a4361567437f
2018-04-09 16:31:12 -07:00
Jorim Jaggi
f4beeb8dfb Enable early wakeup during transitions
We hit GL comp likely on some devices so we start composing
earlier to avoid jank.

Bug: 75985430
Change-Id: I94ff218c79fb512002a2fb7f8aa600d6662f269e
2018-04-09 16:45:06 +02:00
Sunny Goyal
9054843a1f Simplifying fallback recents animation
Instead of using WindowTransformSwipeHandler, keeping the launcher UI in place and
just animating the window

Change-Id: I4defce3a9745407523de651aeb28a37867567507
2018-04-05 13:51:21 -07:00
Sunny Goyal
83bf457aaa Fixing crash when starting transparent activities
StateManager was setting the transition lenght to 0 when a workspace state transtion
was being created as part of launching a transparent activity.

Bug: 77635129
Change-Id: Ie9f40138d9b1387ba880bca0fbf130a4872e8733
2018-04-05 10:28:23 -07:00
Winson Chung
7296dc19b9 Fix crash when launching translucent activities.
Bug: 77604451
Change-Id: I618d98a437e36e872faee2bbb07d9b8bf8779dbd
2018-04-04 17:29:54 -07:00
Winson Chung
9800e730a2 Fix animations home
- To prevent surface thrashing, we no longer hide the home activity before
  starting the transition home. This prevents the launcher from being added
  to the remote animation target list, which means that we default to
  skipping the launcher animation. As a workaround, we special case the
  flow and force the animation to run when starting the recents animation.

Bug: 74405472
Test: Go home from an app, ensure there is an animation.
Change-Id: Ifd2b39444fdeab323ee79a368b580a6264c3e5b9
2018-04-04 14:36:40 -07:00
Winson Chung
bc5bfc1119 Make recents animation work with fallback activity.
Bug: 77157702
Bug: 77152886
Change-Id: Ide312b750efb8214a7c262f7380b5dbd2ef4647f
2018-04-04 14:36:33 -07:00
Sunny Goyal
1c6d566870 Ensuring that previous animation is completed before starting a new state animation
Bug: 76231621
Bug: 77150113
Change-Id: I086e8063b08d2ba69ead1bd0ee1772d65fb6075c
2018-04-02 15:29:47 -07:00
Sunny Goyal
76e2775bb6 Moving some methods related to task launch animation to
recents view and related classes.
This allows the common animation to be used in fallback activity.

Bug: 75979063
Change-Id: I2b5bf5e66406621305b9a076793434f9c5cecdfd
2018-03-30 09:30:11 -07:00
Tony Wickham
3a6746ac04 Animate TaskView as you swipe down on it to launch
Bug: 73835352
Change-Id: Ia255a7af8fb6cd972f99de6390e097afc29c1b90
2018-03-29 17:46:47 -07:00
Tony Wickham
7a802eb6db Calculate task view animation instead of using dimens
Now we compute the precise scales and offsets to synchronize adjacent
pages with the launched page. Also adjusted all apps progress so that
the predictions/hotseat go offscreen directly based on the opening
window.

Change-Id: I74e74e541c60b3b116e2b5713522bd4a0f5928a7
2018-03-29 09:32:18 -07:00
Jonathan Miranda
6b34edcc0f Merge "Fix logic to get icon from any view that is a child of DeepShortcutView." into ub-launcher3-master 2018-03-23 21:15:57 +00:00
Sunny Goyal
25a5472947 Resetting UI at the end of every app transtion (instead of using a global reset)
Bug: 76145902
Change-Id: Ia7851026b5e33a67434787bd10441fe714bfc64b
2018-03-22 09:31:43 -07:00
Jorim Jaggi
f24c0757e1 Fix wrong position in first frame
mFloatingView wasn't laid out yet when processing the first
animation frame. Force the initial values to make sure we don't
submit a wrong position for the surface.

Test: Open app, take surface trace
Bug: 74220420
Change-Id: Ie0a827969b980eeffa1860e307586d0e648b4834
2018-03-20 18:28:20 +01:00