Commit Graph

96 Commits

Author SHA1 Message Date
Sunny Goyal
a246727501 Registering app transition animations with the internal stateManager,
so that the animation is reset when we start a state animation from
launcher

Bug: 74975768
Bug: 75290288
Change-Id: If7f71f087d7bb64fb25c085c476a6fcbc86518e2
2018-03-19 20:11:41 -07:00
Sunny Goyal
4eeafdecd4 Removing screenshot based quickstep logic
Bug: 75324790
Change-Id: Ifa6c2d9db64791f2d8151eda6ecf0d1f7406e1f3
2018-03-19 13:50:11 -07:00
Jorim Jaggi
6c869151c0 Do not abort animations for translucent activities
When Launcher isn't in the opening targets, we should still run
an animation on the closing window, just not on Launcher itself

Test: Close share-sheet with back or home button
Bug: 72686618
Change-Id: I2d55dfa79fe2d2c4bb735cf1a9a4a0b47ff1b7ba
2018-03-19 13:36:35 +01:00
Jorim Jaggi
3c0c818970 Only use remote animation definition for ACTIVITY_TYPE_STANDARD
So we don't override any other animations, like for the assistant.

Change-Id: Ia9b7938d40ebfe29de1ef3eb730f798e2bb5f157
Fixes: 72702760
Test: Open/close assistant
2018-03-16 14:18:56 +01:00
Tony Wickham
39b5534b96 Merge "Small updates for recents launch animation" into ub-launcher3-master 2018-03-15 23:54:56 +00:00
Sunny Goyal
f633ef5f43 Adding fallback recents activity
> Refactoring RecentsView to a common base class
> Moving some dependency form Launcher to BaseActivity
> Using the Recents view in RecentsActivity

Change-Id: Ie0e6741d356291e77420798c140c999121de3a0d
2018-03-13 17:22:52 -07:00
Jon Miranda
d3c91fa058 Fix logic to get icon from any view that is a child of DeepShortcutView.
Change-Id: Ie05b2c2bb1b9d69e44f7869d80c52ecc2e5437db
2018-03-13 10:26:20 -07:00
TreeHugger Robot
fad58c8159 Merge "Set remote animations duration based on animation being run" into ub-launcher3-master 2018-03-13 17:07:27 +00:00
Tony Wickham
02e1875926 Set remote animations duration based on animation being run
Previously we always set the duration to 500, the app launch duration,
but now the animation can resolve to launching a recent task instead,
which uses a shorter duration. This led to effects such as the status
bar transitioning a bit late on those transitions.

Since we don't techinically know whether we are launching an app vs a
recent task until the animation starts (since we need to check the
opening target and corresponding task id), for now we just make an
educated guess based on the view type and launched component.

Change-Id: I8ebf10d24081d474a48a1eea55419651e2214545
2018-03-13 16:57:10 +00:00
Jonathan Miranda
844505819e Merge "Fix window transition when opening app from deep shortcut menu." into ub-launcher3-master 2018-03-13 16:40:19 +00:00
Jon Miranda
79d9b632ef Fix window transition when opening app from deep shortcut menu.
Bug: 74109370
Change-Id: I10bbc6d6dd2ead1f4649830795af5d84a346073e
2018-03-13 09:23:50 -07:00
Tony
b8f7d9a3ad Small updates for recents launch animation
- Increase translation x of adjacnet tasks, in order to maintain
  gaps between pages
- Fix parallax when launching side task (used to be based on launched
  task's translation, but now that is 0 since there's no curve)

Change-Id: Iace47761a6e0a69982cf2eac34436b7164e60792
2018-03-12 18:07:09 +00:00
Tony
404e625516 Remove workspace card
Swiping up for recents scales down workspace and hides it, similar to the transition
to all apps. Simultaneously, recents slides in from the side.

Also removed the setting for swiping to the first task, as it is required now.

Change-Id: Id0845db6650a37917a4faa9c8a434a2270913904
2018-03-12 14:05:18 +00:00
Sunny Goyal
46d259d9fb Updating launch transition for transparent activities
When a transparent activity is started from recents, animate the launcher
NORMAL state instead of animating the launcher UI separately

Change-Id: Ibfc9f7096f668e0129042b8a69ed5130029df797
2018-03-06 09:51:03 -08:00
Sunny Goyal
726bee7d5d Removing click-feedback shadow generation logic in BubbleTextView
Instead of animating the shadow, animating the icon scale. This avoids
unnecessary bitmap creating at app-launch and also plays nice with the
app-launch transition

Change-Id: I1d3d24bc7212a6d659855ff1002a45388e269e52
2018-03-05 14:56:38 -08:00
Sunny Goyal
6c6c2f45f7 Adding a separate state for QuickScrub
Bug: 74014237
Change-Id: Ie86ac589f0ad0e1470fb6b0b71263ec6593eb1e3
2018-03-02 15:38:21 -08:00
TreeHugger Robot
c06a7e137d Merge "Set disabled state when getting new icon from DrawableFactory." into ub-launcher3-master 2018-02-28 20:10:09 +00:00
Jon Miranda
d6aa658b6f Reduce launcher resume animation start delay from 150 to 100.
Bug: 70220260
Change-Id: I61c76a619841fc91d080b53190fd46aa20667e30
2018-02-28 08:19:30 -08:00
TreeHugger Robot
3e3e87e6aa Merge "Fix app opening transition for deep shortcuts." into ub-launcher3-master 2018-02-28 04:00:50 +00:00
Jon Miranda
93e9dbddc5 Fix app opening transition for deep shortcuts.
With this change, the floating view now starts on top of the
deep shortcut icon; before this change the view stared in the
middle of the text portion of the view.

Bug: 70220260
Change-Id: I7a1ed705f6f8d9d2ff594f52c4cf678aa0575012
2018-02-28 03:51:03 +00:00
TreeHugger Robot
e01c217b3d Merge "Don't animate the workspace background alpha during recents anim" into ub-launcher3-master 2018-02-27 22:09:42 +00:00
Tony Wickham
270d6567cc Don't animate the workspace background alpha during recents anim
This is somewhat expensive and could cause jank

Change-Id: I75c2e957781c865e8d275ecc083e5edfa31e04d3
2018-02-27 13:55:35 -08:00
Tony Wickham
b7168cd019 Merge "Flip recents if setting is true" into ub-launcher3-master 2018-02-27 19:50:17 +00:00
Jon Miranda
d82c5cd2b0 Set disabled state when getting new icon from DrawableFactory.
Change-Id: Ic9c508d24cc0e65d45f5c1f4bcbe8d5cd7fb9200
2018-02-27 10:12:03 -08:00
Jon Miranda
b4047eb9da Fix transitions with disabled items and translucent activities.
- Floating view icon now matches the disabled state of the
  original icon.
- We only run the animator that hides the launcher content
  if launcher is in the set of closing targets. This avoids
  the flickering that occurs when the content fades out and
  then is visible again.

Bug: 73876918
Change-Id: Iddb7c8b8d74639e4ddf4044569d6f18256ff5eaa
2018-02-27 09:06:37 -08:00
Tony Wickham
dfb5cc9a09 Flip recents if setting is true
Bug: 72860694
Change-Id: I5cb71f553b2833a18a1b419b3744175bff963da8
2018-02-26 18:12:39 -08:00
Tony Wickham
005df0ba69 Animate launcher when launching recent tasks
- Scale up adjacent recent tasks and translate away from center
  - Workspace card instead recenters in the screen
- Translate hotseat offscreen

Clicking on one of the adjacent tasks will scale it up to the
center of the screen while the center and other adjacent task
parallax to the right beneath it.

Change-Id: If96eec987c100458b8444a6cd698ec7bf6e6ba6b
2018-02-26 14:05:59 -08:00
Jon Miranda
863e05556e Tweaks to synchronized app transitions.
* Animations appear snappier by using new interpolators
  ie. new EXAGGERATED_EASE and updated AGGRESSIVE_EASE_IN_OUT
* Updated app icon/window alpha to make the motion/synchronization clearer.

Bug: 70220260
Change-Id: Ib05efc7f58d53b070e58f682f30651e31f9b3524
2018-02-16 15:44:40 -08:00
Sunny Goyal
66f2b35320 Adding a utility class to simplify main process initialization.
Change-Id: I796cf758d2a25cf8fd5f9a9b78a7977fd54ca451
2018-02-13 17:08:09 -08:00
TreeHugger Robot
ba747b6f19 Merge "Skip Launcher opening animation if its not in the set of opening apps." into ub-launcher3-master 2018-02-13 01:50:09 +00:00
Winson Chung
3e803c7a4b Animate the visible task view if launching an app that resolves to the task
Test: Manual, launch app for associated visible task
Change-Id: I7a56553197ad23e1269eb50523eca0ea88898f47
2018-02-09 12:40:10 -08:00
TreeHugger Robot
7780fa7bc7 Merge "Prevent blinking when user presses home." into ub-launcher3-master 2018-02-08 03:48:56 +00:00
Jon Miranda
0d5daafd2f Prevent blinking when user presses home.
Intead of finishing the entire animation (launcher animation and
window animation), we finish just the launcher animation.

Bug: 73071035
Change-Id: Ied84cb641f3cedc367433ad99d21ab1b258ae7f8
2018-02-07 17:41:22 -08:00
Jon Miranda
ce29861598 Use DrawableFactory to get icons for animation.
* This ensures that the current time is used for the clock icon.
* Also switch from ImageView to View, to avoid an alpha bug.

Bug: 73000086
Change-Id: I6576d76b95fb157d0bfe8db4fda899e644773bfa
2018-02-07 17:37:24 -08:00
Tony
dc76f8e856 Cancel launcher app transition when changing states
The app transition might change an object that the new
state depends on, causing an inconsistent state.

Bug: 72816542
Change-Id: Ia6dd52971b52be5589c88f4f6d93d06146fbadab
2018-02-05 18:48:24 -08:00
Jon Miranda
39552b83b7 Skip Launcher opening animation if its not in the set of opening apps.
Bug: 72811741
Change-Id: I81d71fac9908c375052567cda43dffa92cd3d9f6
2018-02-05 14:10:36 -08:00
Sunny Goyal
fde5505d02 Handling configuration changes
> Adding a listener for device profile changes
> Updating various controllers instead of recreating them
> Clearing all-apps icon

Bug: 71709920
Change-Id: Ief7db199eb7494ebd8fb433198f333cd2e8e661d
2018-02-01 14:47:08 -08:00
Sunny Goyal
c94cfc052c Merge "Initial changes for handling configuration changes dynamically" into ub-launcher3-master 2018-02-01 21:35:10 +00:00
TreeHugger Robot
d0f20abec4 Merge "Fix a couple of issues with app close" into ub-launcher3-master 2018-02-01 18:18:53 +00:00
Jorim Jaggi
fc0f6a5c5a Fix a couple of issues with app close
- Make sure to use center pivot point
- Use correct curve for alpha
- No need for the layer hack anymore because framework issue
was fixed.
- End X should be 480dp for a 411dp device, so we need to scale
it with 1.16

Test: Close app
Change-Id: Ib4587e324aeeb11921de87da7c389b2e148dc913
Fixes: 72691044
2018-02-01 19:07:33 +01:00
Sunny Goyal
f8d56fc8a1 Initial changes for handling configuration changes dynamically
Bug: 71709920
Change-Id: I88cf2229dea28d01c13a5a76d2290e91b07d095e
2018-01-31 15:20:30 -08:00
TreeHugger Robot
260fec1b24 Merge changes Ib95f0c41,I5a1488aa into ub-launcher3-master
* changes:
  Start the recents window animation on touch down.
  Only keep running task id.
2018-01-31 17:22:03 +00:00
Winson Chung
7dde1c3b9b Start the recents window animation on touch down.
Change-Id: Ib95f0c41e2dc0e9274268e70da63b63e3092fc94
2018-01-31 09:09:15 -08:00
Jorim Jaggi
6674249107 Fix app closing transition in multi-window
Previously we attempted to disable the app closing transition
in multi-window. However, that didn't work because the registered
remote animation was still registered on the ActivityRecord, even
if the activity was restarted, leading to passing a null handler
into post, and then the animation never started.

Enable it in multi-window and also fix the transition.

Test: Enter multi-window, go home
Change-Id: I4d5d46688310b61365ba954fb41811efa29e41a5
Fixes: 72525431
2018-01-31 17:51:17 +01:00
Jorim Jaggi
d30e74b58c Fix parameter order
Test: Close app
Change-Id: Id476852a83e353d7651c011fcf9e532cfddc9112
Fixes: 72627528
2018-01-29 14:19:37 +01:00
Jon Miranda
54441f5df9 Refactor LauncherAppTransitionManager & polish for new app transitions.
* Add start delay when launcher resumes from all apps or landscape.
* Track the last app transition animator and cancel it before beginning a new one,
  otherwise the animators can conflict with each other.
  ie. Opening an app from all apps and then immediately pressing back to return to
      all apps.
* Use class overrride instead of UiFactory.

Bug: 70220260
Change-Id: I4755d45d820f9d551e443d6c4a148e8789c5bc57
2018-01-25 14:32:47 -08:00