Commit Graph

7283 Commits

Author SHA1 Message Date
Sunny Goyal a52d2eca83 Moving the hotseat by same amount as the task window bottom when dragging
Bug: 73354752
Change-Id: I7d20e718aab9bc9be75b4d536f1aa8b87c385caf
2018-02-23 10:12:07 -08:00
Sunny Goyal 0e7724cef7 Ensuring that all the pending tasks are run
before marking the ViewOnDrawExecutor as completed.

Also fixing model writer not updated on rotation

Change-Id: I5ecd7ac865b939ffa4c02afe892bd773d9f275c3
2018-02-22 17:27:13 -08:00
TreeHugger Robot a12bd507d1 Merge "Adding some trace logging around RecentsController" into ub-launcher3-master 2018-02-23 01:23:40 +00:00
Winson Chung a7843583be Fix flash when switching from app window to snapshot.
- If there is any delay in launcher draw, then we will finish the
  transition and hide the app window before launcher has had a chance to
  draw the task view with the updated snapshot.

Change-Id: I81c5b467f32520fd7474bde0e89819336292e84f
2018-02-22 16:42:44 -08:00
Sunny Goyal 8a7351fec6 Adding some trace logging around RecentsController
Change-Id: Ieb019d3d8c5f8540cba7b162f4c6f911d2005f5a
2018-02-22 16:32:46 -08:00
Sunny Goyal 5c86b5d9cd Synchronizing invalidating interaction handler with the eventQueue.
In some cases, eventQueue could be running on the background thread where as
the invalidate happens on the UI thread, which could cause race conditions in
touch consumer

Change-Id: Iebd84238eb2b5d6774beaa3bc21afdeb09e62561
2018-02-22 13:42:55 -08:00
Sunny Goyal d70e75a514 Removing launcher dependency when logging quickstep interaction
as Launcher may not be ready when the touch gesture completes.

Change-Id: Ia69eb7bfb0340f7b7ce9b6c67be8851e5429f867
2018-02-22 10:21:41 -08:00
TreeHugger Robot 668dd40a98 Merge "Fixing window transform not changing monotonically with shift" into ub-launcher3-master 2018-02-22 00:37:02 +00:00
Sunny Goyal 30897aaa1d Temporarily enabling various tracing for debug devices
Change-Id: Iebee7d0a4c408f50ab911b31edbec12499a42844
2018-02-21 15:58:40 -08:00
Sunny Goyal b1e2e2956e Fixing window transform not changing monotonically with shift
Change-Id: I40f095e73ca1cdb994d34aecc2c6be90f3e0f25b
2018-02-21 14:56:17 -08:00
Hyunyoung Song 41431af541 Merge "Quick step/scrub/switch logging - state transition happening due to Home and back is handled by specifying src target as 'from' container and dst target as the 'to' container - Source and Destination container shows FROM and TO state for SWIPE/FLING - event.isStateChange = true indicates that an action resulted in state transition - Elapsed container millis is the screen time on the source container" into ub-launcher3-master 2018-02-21 07:00:45 +00:00
Hyunyoung Song b3fbc0ba8f Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
  specifying src target as 'from' container and dst target as the 'to'
  container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
  state transition
- Elapsed container millis is the screen time on the source container

Bug: 70181187

- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
  action:FLING direction=UP
  Source child:HOTSEAT id=0	parent:WORKSPACE id=0
  Destination child:ALLAPPS
  Elapsed container 1225 ms, session 1225 ms, action 0 ms

2) ALLAPPS -> HOMESCREEN
  action:FLING direction=DOWN
  Source child:ALLAPPS	parent:ALLAPPS
  Destination child:WORKSPACE id=0
  Elapsed container 971 ms, session 2197 ms, action 0 ms

3) HOMESCREEN -> OVERVIEW
  action:FLING direction=UP
  Source child:NAVBAR	parent:WORKSPACE id=0
  Destination child:TASKSWITCHER
  Elapsed container 4834 ms, session 4834 ms, action 0 ms

4) OVERVIEW-> ALLAPPS
  action:FLING direction=UP
  Source child:TASK	parent:TASKSWITCHER
  Destination child:ALLAPPS
  Elapsed container 2176 ms, session 7010 ms, action 0 ms

5) ALLAPPS->OVERVIEW
  action:FLING direction=DOWN
  Source child:ALLAPPS	parent:ALLAPPS
  Destination child:TASKSWITCHER
  Elapsed container 3683 ms, session 10693 ms, action 0 ms

6) OVERVIEW-> HOMESCREEN
  action:FLING direction=DOWN
  Source child:TASK	parent:TASKSWITCHER
  Destination child:WORKSPACE id=0
  Elapsed container 2108 ms, session 12801 ms, action 0 ms

7) APPS-> OVERVIEW
  action:FLING direction=UP
  Source child:NAVBAR	parent:APP
  Destination child:TASKSWITCHER
  Elapsed container 104 ms, session 104 ms, action 0 ms

8) Quickscrub: action:DRAGANDDROP Source child: QUICK

9) Quickswitch: action:FLING Source child: QUICK

Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-20 22:40:19 -08:00
Sunny Goyal 60876ac0d7 Handling recents animation cancelation
When the animation is cancelled, if remove the pending handler
(incase it has not executed yet) and revert back to the old
state if it has executed.

Change-Id: Iddc305aaaeae78c06cbf6c1c271254409cc1487d
2018-02-20 16:06:06 -08:00
Winson Chung b186136a37 Merge "Re-enable deferring recents animation on back button." into ub-launcher3-master 2018-02-20 20:46:41 +00:00
Winson Chung 82db735196 Re-enable deferring recents animation on back button.
Bug: 73242451
Test: Swipe up over back button, ensure that we don't start the animation
      until the threshold is crossed

Change-Id: If84c39370428f8ea5bf9d5f7110d17227f00ccc0
2018-02-20 10:19:46 -08:00
Tony Wickham f2f08fc4c6 Merge "Fix task icon not showing if you press home" into ub-launcher3-master 2018-02-20 17:59:11 +00:00
TreeHugger Robot 40583a2f9b Merge "Increase initial delay for auto-advancing on quickscrub." into ub-launcher3-master 2018-02-20 17:22:51 +00:00
Tony ff35921926 Fix task icon not showing if you press home
Instead of setting the icon scale to 0 in showTask(), which is
called whenever we get a new intent, only set it to 0 when
starting the swipe up gesture.

Change-Id: I657a1c5763c60b65e28f453ffe854ae8dab83bbc
2018-02-20 09:21:17 -08:00
Winson Chung df7eb4ca86 Increase initial delay for auto-advancing on quickscrub.
- Also reduce the number of quickscrub sections

Change-Id: I34334d2bf79bd7e720f8b4efa4ac18c6be894704
2018-02-20 09:11:28 -08:00
Tony Wickham 096948022c Merge "Hide split screen option if app doesn't support it" into ub-launcher3-master 2018-02-20 16:44:05 +00:00
TreeHugger Robot 41157f3ca2 Merge "Tweaks to synchronized app transitions." into ub-launcher3-master 2018-02-20 15:06:48 +00:00
Tony 73296f2793 Hide split screen option if app doesn't support it
Bug: 73120439
Bug: 70294936
Change-Id: I3cfb665d54f59222936aa6f735275b692b0a7e54
2018-02-18 16:52:17 -08:00
Tony Wickham 5f72d3b8b6 Merge "Fix a couple bugs with back button visibility" into ub-launcher3-master 2018-02-18 19:51:55 +00:00
Bill Yi bdb0348992 Import translations. DO NOT MERGE
Change-Id: Idd59dca233e29983e7b7145a2595e7880b12f878
Auto-generated-cl: translation import
2018-02-17 03:04:05 -08:00
Tony Wickham 0c22a6c2c7 Fix a couple bugs with back button visibility
- Fix back button flickering when returning to NORMAL state instead of
  finishing a gesture to, say, ALL_APPS. This is achieved by posting
  changes to the back visibility on the UI thread (binder calls are
  posted on the background thread).
- Restore back button when touch service reconnects (in case we were
  forced into an app when launcher is force-stopped, for instance).

Change-Id: I3731ee43d66965ce7cd8cf026174aabfe2d5c56c
2018-02-16 15:55:16 -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 841bbf07d0 Serializing all event handling from SystemUI
> EventQueue is only accessed on the binder thread
> For every new touch down, we use a new event queue to prevent race conditions
> All event hendling are serialized by event queue (including quick switch/scrub)
> Using state handlers for quick scrub

Bug: 73356768
Change-Id: Idde33a348270b8167a087129f177d5d2b54f5822
2018-02-16 14:00:09 -08:00
Tony Wickham bd3a798aa2 Merge "Fix a couple quickscrub issues" into ub-launcher3-master 2018-02-16 16:42:02 +00:00
TreeHugger Robot 19a3906ec0 Merge "Revert "Revert "Generating fake “to Recents” events for overview NOT from task""" into ub-launcher3-master 2018-02-16 04:44:26 +00:00
TreeHugger Robot 7fa87bb1f1 Merge "Revert "Revert "Remove back button when on home screen""" into ub-launcher3-master 2018-02-16 04:43:59 +00:00
Winson Chung 021c06cde9 Don't rely on ORIENTATION_BEHIND, lock th rotation during the gesture.
Bug: 73486148
Change-Id: I83650c6a3ba8634fb37a5792614e958fb01dd7b8
2018-02-15 19:40:24 -08:00
Winson Chung d782394132 Revert "Revert "Remove back button when on home screen""
This reverts commit dd176e65e3.

Reason for revert: Post-drop revert

Change-Id: If93eb4bca636bfba2471c8992621a59895bfcbe2
2018-02-16 03:23:47 +00:00
Winson Chung 9d286e6753 Revert "Revert "Generating fake “to Recents” events for overview NOT from task""
This reverts commit 53daa2cae8.

Reason for revert: Post-drop revert

Change-Id: I74a4d473951d7990424610adfcd4483135c817c5
2018-02-16 03:23:38 +00:00
Winson Chung 6485766bd1 Merge "Revert "Remove back button when on home screen"" into ub-launcher3-master 2018-02-16 03:04:30 +00:00
Winson Chung 3b26183907 Merge "Revert "Generating fake “to Recents” events for overview NOT from task"" into ub-launcher3-master 2018-02-16 03:04:25 +00:00
Winson Chung dd176e65e3 Revert "Remove back button when on home screen"
This reverts commit 663759e444.

Reason for revert: Temporary revert for NL build

Change-Id: I8614ee348e6e9290c0de0dfdf3e24663f220e356
2018-02-16 02:42:26 +00:00
Winson Chung 53daa2cae8 Revert "Generating fake “to Recents” events for overview NOT from task"
This reverts commit d46e428706.

Reason for revert: Temporary revert for NL build

Change-Id: I0bb46d0fc56a12c642a0ea8610e7a86002a21ada
2018-02-16 02:42:00 +00:00
Tony Wickham fa3efe9494 Fix a couple quickscrub issues
- Always launch workspace card if it's focused when quick scrub ends
  - Previously it would get stuck if quick scrub end was called on
    a background thread (since it was trying to touch RecentsView)
  - Prevent user from being able to get to the workspace card if
    starting quick scrub from an app by introducing bounds checking
- Prevent getting stuck in overview when ending quick scrub
  - There was a race condition where the task wouldn't launch if
    the animation to recents hadn't yet finished. Now there is a
    callback to ensure that launchTask() is always called after.

Bug: 70180755
Change-Id: I3c131011634880a97de8c2935c3ebdab26494b48
2018-02-15 17:21:56 -08:00
TreeHugger Robot cfab8c5ded Merge "Generating fake “to Recents” events for overview NOT from task" into ub-launcher3-master 2018-02-16 00:24:11 +00:00
Vadim Tryshev d46e428706 Generating fake “to Recents” events for overview NOT from task
These records are required by “Transition Delay - Hot Launch From
Recents” test. It doesn’t look at transition times for this event. They
are just a part of its expected sequence of events.

I generate transition delay times as zeroes because no one is looking at
them.

Bug: 72967764
Test: atest google/perf/app-transition/app-transition-from-recents-trace
Change-Id: I4a5b76b95c6c4b54e7fb620951342a3ed8564aed
2018-02-15 16:13:28 -08:00
Winson Chung 748c55bc76 Merge "Prevent rotation during quickscrub gesture." into ub-launcher3-master 2018-02-15 21:58:47 +00:00
Tony Wickham 22a24c1aa2 Merge "Remove back button when on home screen" into ub-launcher3-master 2018-02-15 21:49:26 +00:00
Tony Wickham 663759e444 Remove back button when on home screen
Add OverviewInteractionState to handle setting OverviewInteractionFlags.

Hide back button when in NORMAL state and launcher's window is focused.
Show it when in other states or when launcher's window loses focus.

Change-Id: I35919561b9972789e995f1cc434c23e2afe9e77c
2018-02-15 12:20:16 -08:00
Winson Chung 9004912eaa Prevent rotation during quickscrub gesture.
Bug: 73486148
Change-Id: Ia435608484e49daf93ff4aa675da11ea4f0fd421
2018-02-15 11:35:37 -08:00
Sunny Goyal c36d6eefae Temporarily disabling model preloading
Bug: 73399920
Change-Id: Ia4a93c77a3209c6a9b2baae02a3ee3d6abb693d4
2018-02-14 20:46:31 -08:00
TreeHugger Robot 1672549d9f Merge "Fixing crash when window is not attached" into ub-launcher3-master 2018-02-15 00:28:32 +00:00
Sunny Goyal 1e9da8b5aa Fixing crash when window is not attached
Bug: 72233154
Change-Id: Ibe94f5804be85b0df9180c508e4ae7afe3ba9a1a
2018-02-14 16:17:01 -08:00
Vadim Tryshev 51fc778eea Fixing “Transition Delay - App to Recents” test: the Launcher part
The fix is quite hacky and should be re-done soon. I’m not leaving TODOs
in the code, but I’m tracking the cleanup elsewhere.

We also need a fix in the server to make the test work, but that will be
another CL.

Bug: 72967764
Test: atest google/perf/app-transition/app-transition-to-recents
Change-Id: Ia21c308caa81bd5502f4a4587ae445928f6eca17
2018-02-14 14:48:47 -08:00
Winson Chung 4c021ee1bc Temporarily disable back button deferral of start animation.
Bug: 73356768
Change-Id: I156b0e6db0ac51a325a3a76118ce8efd01e50419
2018-02-14 13:13:41 -08:00
Winson Chung db3a95c956 Reset the interaction handler if it hasn't been recreated.
Bug: 73356768
Change-Id: Ie3236c95cdb8d9ce809bf8651e02d1d803f0b802
2018-02-14 13:06:14 -08:00
Winson Chung ff02cd54d4 Skip updating displacement if handler is already invalidated.
Bug: 73338391
Change-Id: I091e8a682f95631e15b3f2cbe3e281c4f18003b9
2018-02-14 09:16:26 -08:00
TreeHugger Robot f6c65d7e54 Merge "Fixing ANR when using quickscrub from homescreen" into ub-launcher3-master 2018-02-14 01:29:50 +00:00
Sunny Goyal bf6dfc5fa7 Fixing ANR when using quickscrub from homescreen
Change-Id: Id355726f7ec72dc2fd28a3e757355d1143464001
2018-02-13 17:17:48 -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 a0693d6366 Merge "Defer starting the recents animation when swiping over back button" into ub-launcher3-master 2018-02-14 00:56:32 +00:00
TreeHugger Robot 450d821f48 Merge changes I2130e01c,I3f864ff4 into ub-launcher3-master
* changes:
  Re-enable input consumer to catch touches over window
  Cancel the animation when cleaning up the touch tracking
2018-02-14 00:43:14 +00:00
Winson Chung d56ac2a881 Defer starting the recents animation when swiping over back button
Bug: 73242451
Test: Swipe up over back with suitable launcher build and ensure that we
      don't start the recents animation on touch down

Change-Id: I98314611eaeeabfaa47280157300ea20f0571a61
2018-02-13 16:41:32 -08:00
Winson Chung cc394cdc75 Re-enable input consumer to catch touches over window
- No handler at the moment, it just ignores touches

Change-Id: I2130e01c0515298433b5fbde835dfe97864038c9
2018-02-13 16:31:36 -08:00
Winson Chung c2ef02ee15 Cancel the animation when cleaning up the touch tracking
Bug: 72953248
Test: Add artificial delay and launch home from home button
Change-Id: I3f864ff4e0a90a4c62dbf5fe123bb3e2257c06fa
2018-02-13 16:31:31 -08:00
Tony Wickham d766aadae7 Fix scrolling to first task on swipe up for RTL
Change-Id: I4f316bd6da7e7d370928accb41e1b44a689094af
2018-02-13 12:03:37 -08:00
Tony Wickham d91c3f47c1 Merge "Allow quick scrub/switch from minus one" into ub-launcher3-master 2018-02-13 17:51:20 +00:00
Tony Wickham 618a5044cf Allow quick scrub/switch from minus one
Launcher's window doesn't have focus when on minus one. In this case, we
tell the minus one overlay to hide and add a window focused callback to
start quick scrub/switch after launcher regains focus. Since the
transition from minus one takes longer than for launcher to get window
focus, we also defer until the overlay is completely hidden before
starting the quick scrub transition.

Bug: 70180755
Change-Id: Ifcf85aaf1942b51394e68e209b89807fa4007afe
2018-02-13 08:18:57 -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
Tony Wickham aefd062125 Merge "Re-enable quick scrub/switch from launcher" into ub-launcher3-master 2018-02-12 23:58:25 +00:00
Bill Yi 2fd04c2def Import translations. DO NOT MERGE
Change-Id: Ibfab0e5e1709f527c4fa4fcae33522bf47826b25
Auto-generated-cl: translation import
2018-02-12 12:18:27 -08:00
Tony Wickham a066e4434b Re-enable quick scrub/switch from launcher
When we get the onQuickScrubStart() or onQuickSwitch() callbacks, we go
to the overview state with a quicker duration (the same used from apps).
Then we follow the same logic as starting quick scrub/switch from apps
except that we allow you to scrub back to the workspace card.

Bug: 70180755
Change-Id: Iebcdcc4c4ad1e1210e2d1c11e5007c27d3c1eef3
2018-02-12 11:46:40 -08:00
Tony Wickham 62388becd0 Merge "Move window to align with first task during quick scrub" into ub-launcher3-master 2018-02-10 02:02:54 +00:00
Tony Wickham 8cb3002619 Move window to align with first task during quick scrub
Bug: 70180755
Change-Id: I5932462bd1af08ec141518a344c60605b8730d9d
2018-02-09 17:27:40 -08:00
Sunny Goyal 72289860ee Fixing workspace card shifted when going to home.
When animating the wrospace, we skip the properties if for start and end are same.
But after creating the animation, if the property changes, the final property is
never applied.

Bug: 72257542
Change-Id: Id408c7820476273958e835ae99a3a934ad5a4700
2018-02-09 16:04:44 -08:00
Winson Chung 05a31ede4f Defer launching the quickscrub task until after the page settles
- Tweak the durations to be less laggy
- Add some state logging

Bug: 67957962
Bug: 70180755
Change-Id: Ia0caa5178b3ed976705eb2d973bc00d8f1b9e3ca
2018-02-09 12:43:36 -08:00
Winson Chung 006239bab9 Fix blocking issues re. window transitions and quick scrub
- Clean up the consumer when starting quickscrub/switch in addition to
  motion up
- Defer invalidating the handler until after quickscrub ends
- Ensure that we always finish the remote animation

Bug: 67957962
Bug: 70180755

Change-Id: Id5af5dc9917638f1dfb8e4a04c358aadb19fd67a
2018-02-09 12:42:13 -08: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
Sunny Goyal 168ca694f9 Merge "Adding callback to notify LauncherCallbacks when quickstep starts" into ub-launcher3-master 2018-02-07 23:14:58 +00:00
Winson Chung 2fda6ced2a Handle transition from multi-window
- Make use of app/home insets and minimized home size to calculate the
  proper clipping and target bounds for the task view in home.

Test: Swipe up when in multiwindow

Change-Id: Ibef7a6dc319ded7867ee559dd31c5e87fd76cadb
2018-02-07 14:56:24 -08:00
Sunny Goyal 3bac2c2b91 Adding callback to notify LauncherCallbacks when quickstep starts
Bug: 73081875
Change-Id: Ieccba6ecb16553ed5211f277b49e9f2ed2d7c745
2018-02-07 14:50:08 -08:00
Tony Wickham 03c8e3ffad Add quickstep onboarding text and send to sysui
Bug: 72999860
Change-Id: I3b67f197e16fdf7d646a81210baa6fd24ead61ed
2018-02-06 16:19:01 -08:00
Sunny Goyal 103ef2747a Merge "Only initialize the animation control when gesture starts" into ub-launcher3-master 2018-02-06 22:27:08 +00:00
Sunny Goyal ef3ae11014 Only initialize the animation control when gesture starts
Change-Id: Ic7fe373b826d3a11348f84671bf7bda618820546
2018-02-06 14:03:49 -08:00
TreeHugger Robot 48565484a6 Merge "Fix label is not badged + failed to start "App Info" in correct user" into ub-launcher3-master 2018-02-06 21:38:19 +00:00
Tony Mak 23d627fef8 Fix label is not badged + failed to start "App Info" in correct user
FIX: 72805206
FIX: 72808690
FIX: 72808798

Change-Id: I0df4ba9424c4002ac496e932d4f9d410de5630cd
2018-02-06 20:41:52 +00:00
TreeHugger Robot 5a090a7242 Merge "Preserving the last state when going to overview." into ub-launcher3-master 2018-02-06 18:15:30 +00:00
Sunny Goyal af161fd20c Preserving the last state when going to overview.
> Resetting the state to NORMAL on every onStop so that the user
  never starts on the overview screen

Change-Id: If3c17693b7125a3969809e60891a2ab978fe83bc
2018-02-06 10:06:53 -08:00
Sunny Goyal c4341e8a1b Using state property for animating hotseat
Bug: 72664334
Change-Id: Ib9f9b94380e04a9ea43ae164cc2ff587d3d3a9a8
2018-02-06 09:56:08 -08:00
TreeHugger Robot bd0beb9933 Merge "Cancel launcher app transition when changing states" into ub-launcher3-master 2018-02-06 02:59:03 +00: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
Winson Chung 24bd85a848 Fix issue with reseting touch handler
- Cleaning up/removing some extraneous code

Change-Id: I770383b7c3a4efb75e890dfb48196265636a2c44
2018-02-05 12:27:53 -08:00
Sunny Goyal 8b264568a1 Waiting for a small timeout for launcher draw, before performing the swipe gesture.
This allow for a better synchronized motion, in case launcher draw was fast enough

Change-Id: Ie59aa1e8a2ffa94f3640b4ea08a0c23eeabafb54
2018-02-05 10:39:29 -08:00
Sunny Goyal 0ecca76f7c Refactoring the touch handling into a different class.
This makes it easier to maintain states for a single touch session (from down to up/cancel)

Change-Id: I27da239376337cd02c104fea54e39b2e30b53fab
2018-02-02 15:41:55 -08:00
Tony Wickham 973fa5350e Merge "Entering overview from home focuses on first task" into ub-launcher3-master 2018-02-02 22:25:17 +00:00
Tony 6f292aedb2 Entering overview from home focuses on first task
This is behind a settings flag.

Change-Id: I7a118187dac9ab4b024f041faafa9e7d47a571d7
2018-02-02 15:11:20 -06:00
Sunny Goyal 85a7fe086b Some fixes for quickstep when configuration changes
> Creating the launcher animation after first draw, so that the UI is in correct state
> Using correct workspace size, when layout is not valid
> Snapping pagedView to correct page when page size changes
> Resoting to correct workspace page on rebind

Change-Id: I74e61a05aae3a3c4912d4c5c8eb4d5d036d9005a
2018-02-02 11:02:51 -08:00
Tony aed78b7636 Use sysui lib to determine if screen pinning is enabled
Bug: 70294936
Change-Id: Ie71984a1693ad2ffbb308a1830486511cb2c3577
2018-02-02 12:02:16 -06:00
Tony 9c70e7e220 Update task menu
- Remove widgets option
- Add Split screen
- Add Pin
- Tap as well as long press icon to show menu

Bug: 72320614
Bug: 70294936
Change-Id: I231160286426ac3d2a23524b2f4a0170f963190e
2018-02-02 10:54:09 -06: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
Sunny Goyal e75d9f1ec3 Preloading the LauncherModel in case launcher dies
Change-Id: Ibe529f31e96c645d45d51b9f3bf6c21b76b41254
2018-01-31 12:01:59 -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
TreeHugger Robot 1470e6bb33 Merge "Fix app closing transition in multi-window" into ub-launcher3-master 2018-01-31 17:19:15 +00:00
Winson Chung 7dde1c3b9b Start the recents window animation on touch down.
Change-Id: Ib95f0c41e2dc0e9274268e70da63b63e3092fc94
2018-01-31 09:09:15 -08:00
Winson Chung 7d7783b618 Only keep running task id.
Change-Id: I5a1488aacd4e3ec8d2131ddbd953db6409d737fd
2018-01-31 09:06:53 -08:00
Sunny Goyal 87eca2b9f8 Merge "Fixing Launcher UI jump if the fling animation is completed before launcehr first frame" into ub-launcher3-master 2018-01-31 16:58:57 +00: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
Tony Wickham d5e5109e6f Merge "Fix some visual bugs" into ub-launcher3-master 2018-01-31 16:36:15 +00:00
Sunny Goyal 7718fdc178 Fixing Launcher UI jump if the fling animation is completed before launcehr first frame
Also temporarily removing input consumer, as that might be causing event to getmissed
(similar to b/72715390)

Change-Id: I82918133d334fae5d3da267b0d03ff2af8f02e67
2018-01-30 19:01:09 -08:00
Sunny Goyal 8317b6935a Using a background thread for controlling window animation
Animate the task window on the background thread, until the launcher UI is ready.
After the first frame of launcher is drawn, we switch the input handling to UI thread
and fade in the launcher UI.

Change-Id: Ia3d04b697530af3db441b14ad34827208b923137
2018-01-30 13:42:27 -08:00
Winson Chung 1a341002fc Add code path for the recents animation using window transitions.
Test: Enable in settings, swipe up

Change-Id: I1053f9e519c2f612bd3db0b66cd16ad9a30bfeb4
2018-01-29 14:14:07 -08:00
Jorim Jaggi d30e74b58c Fix parameter order
Test: Close app
Change-Id: Id476852a83e353d7651c011fcf9e532cfddc9112
Fixes: 72627528
2018-01-29 14:19:37 +01:00
Tony 12e9f34bd5 Fix some visual bugs
- Workspace was translating while swiping from overview to all apps
- VerticalSwipeController progress jumped a bit backwards when
  flinging because sign wasn't taken into account for velocity

Change-Id: Ife5e9d87ca9f0b3429dd9045c6569868a65eb0af
2018-01-26 20:59:16 -08:00
Sunny Goyal 7e2e67fd47 Adding isSeascape method to have a common place to orientation check
Change-Id: Ia61792b29ab0d1d74f76a8dfa53bbf968874dfaa
2018-01-26 13:47:32 -08:00
Jonathan Miranda 3c24060b62 Merge "Refactor LauncherAppTransitionManager & polish for new app transitions." into ub-launcher3-master 2018-01-26 00:49:04 +00: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
Sunny Goyal 0ea5006cba Adding TaskOverlayFactory to extend the TaskView behavior
Change-Id: I52e1a8b55174055268c8b0ef8c4336609d4d2a79
2018-01-25 13:45:19 -08:00
Sunny Goyal 82d010f0d2 Fixing insets not getting scaled properly in thumbnail
Bug: 72329990
Change-Id: I575c0a29cfbcf2849679eae3b7797a291ec8c72a
2018-01-24 18:55:48 -08:00
Tony Wickham 5378b9ab01 Set sQuickScrubEnabled = false in onDestroy()
When the touch interaction service is disconnected, let's make sure
we cleanup so we don't get in a state where all touches are ignored.

Bug: 72444652
Change-Id: I089ad63f9f855651f305c4650c99743d3bde3a94
2018-01-24 14:48:23 -08:00
Tony Wickham eb1c9ea018 Merge "Simplifying/fixing logic for ignoring touches in quick scrub" into ub-launcher3-master 2018-01-24 21:52:29 +00:00
Tony Wickham b4175d89ed Simplifying/fixing logic for ignoring touches in quick scrub
Now we directly set a static boolean as soon as we get the
onQuickScrubStart and end binder callbacks, instead of having
a member variable in QuickScrubController. Notably, QSC was
getting onQuickScrubStart() when doing quick switch, but not
onQuickScrubEnd(). This is a byproduct of some other unrelated
logic, which the new approach circumvents.

Bug: 72444652
Change-Id: I0a3d1ae2e9970cfffc38a25df0b8f04f26cb4cfa
2018-01-24 13:06:23 -08:00
TreeHugger Robot aa6b1117b2 Merge "Check for permission before registering remote animations to prevent crash." into ub-launcher3-master 2018-01-23 22:30:08 +00:00
Jon Miranda 184b6444c3 Check for permission before registering remote animations to prevent crash.
Bug: 70220260

Change-Id: I2591fe05991f4d944a199acf82666df2cd7196ff
2018-01-23 14:18:12 -08:00
Jonathan Miranda 5bce66195b Merge "Use AllAppsTransitionController to animate the hotseat & scrim." into ub-launcher3-master 2018-01-23 22:15:43 +00:00
Jon Miranda 701b0f528e Use AllAppsTransitionController to animate the hotseat & scrim.
Bug: 70220260
Change-Id: I69bff4234c2fd0c76cb43cdd89342dcc04f2db40
2018-01-23 14:05:13 -08:00
Tony Wickham d17862c441 Merge "Ignore touches on launcher while quick scrub is enabled" into ub-launcher3-master 2018-01-23 18:23:10 +00:00
Sunny Goyal 7bebef40e3 Merge "Reusing the existing handler when quickscrub starts" into ub-launcher3-master 2018-01-23 18:01:03 +00:00
Jon Miranda 7853bdb8b5 Launcher app close transition.
Bug: 70220260

Change-Id: I0a3a6153dc1cba53546f792bf3ec037b1a5f6d90
2018-01-22 17:43:04 -08:00
Sunny Goyal 2c80b0f4f9 Reusing the existing handler when quickscrub starts
Bug: 72173796
Change-Id: I0517a09c10238f15e012f7edcab957aacef22444
2018-01-22 16:24:16 -08:00
Jon Miranda 6586b54ded Fix crash for apps launched through non-BubbleTextView views.
* Same transition/animation, except we don't create a visual copy of the View.

Bug: 72314029
Bug: 70220260
Change-Id: I79898be1cae7160b5dc35cc1ea8ba3dc5b2db05c
2018-01-22 13:55:58 -08:00
Jon Miranda 2c896767e2 Fix opening app transitions in RTL.
Bug: 70220260
Change-Id: If7eed80fc94c30ccc11c11c6976a61ec02187eb1
2018-01-22 12:33:44 -08:00
Jorim Jaggi f86de6141b Merge "Make app-controlled animations more robust" into ub-launcher3-master 2018-01-22 20:09:37 +00:00
Tony Wickham 339d1957ba Ignore touches on launcher while quick scrub is enabled
Bug: 72189689
Change-Id: Ic4564719a35442670226a021ae2c8799a884b201
2018-01-22 11:59:57 -08:00
Jorim Jaggi 4ed2c9db82 Make app-controlled animations more robust
- Sometimes the system decides to destroy our surface before we
have finished animating. While this is a bug in the system, we
need to protect ourselves against any crashes in this case by
checking getNextFrameNumber() != -1 with the new SystemUI lib.
- Apply position of animation target for multi-window open
animation.

Test: Open Drive multiple times, observe no crash
Fixes: 72301120

Change-Id: I47520cea0d11cab109bf6190ea0cc828efc62275
2018-01-22 20:16:53 +01:00
Sunny Goyal 08af6b7984 Using state controller for moving the hotseat.
Using state controller ensures that when the state changes the UI is
properly updated based on the state properties.
This would prevent user getting stuck in an inconsistent UI

Bug: 72173796
Change-Id: I7690a94eed7c8a620479e4247d2b681a7374ce45
2018-01-22 10:13:41 -08:00
TreeHugger Robot 50def21a4b Merge "Fix position of task menu in RTL" into ub-launcher3-master 2018-01-20 00:34:14 +00:00
Tony Wickham 0d00e52bd8 Fix position of task menu in RTL
Bug: 71902072
Change-Id: I03659171a41448347dd6d13e8915125ee5ad4aaa
2018-01-19 16:22:41 -08:00
Tony Wickham 180f777029 Merge "Don't crash when invoking quickscrub with no recent tasks" into ub-launcher3-master 2018-01-20 00:17:08 +00:00
Tony Wickham 0b170d86e5 Don't crash when invoking quickscrub with no recent tasks
Bug: 72222355
Change-Id: I6410507062392f1e91eb4fca01da1f646f550259
2018-01-19 15:54:48 -08:00
Sunny Goyal 41b36e0f22 Merge "Removing multi-state apha control for hotseat" into ub-launcher3-master 2018-01-19 23:25:42 +00:00
Sunny Goyal cd77ba0cdd Merge "Adding a horizontal popup when when workspace is longPressed" into ub-launcher3-master 2018-01-19 23:22:21 +00:00
Sunny Goyal 02424b20f3 Adding a horizontal popup when when workspace is longPressed
Change-Id: I5b3c48262c246bfe53e0010ca89c820f42503eef
2018-01-19 15:11:10 -08:00
Sunny Goyal 19d32b76dd Removing multi-state apha control for hotseat
Change-Id: I68ccbe96caa70921aefd18fc8ec9ad0638c3fab1
2018-01-19 14:26:44 -08:00
Jonathan Miranda 23608f7c9f Merge "Fallback to default launch options for users with old version of platform." into ub-launcher3-master 2018-01-19 22:19:30 +00:00
Jon Miranda 3e6fb6c080 Fallback to default launch options for users with old version of platform.
Bug: 70220260
Change-Id: I12aa1ecbc5823770b2b43384f3e3b0645394d714
2018-01-19 13:44:26 -08:00
Sunny Goyal f59d0e47f3 Fading edges in landscape UI
Bug: 70179916
Change-Id: I62421d872fd788fbf3fcd6d4fca37d60b0b98a79
2018-01-19 11:28:24 -08:00
Jon Miranda b3335da9ab Only move AllAppsContainerView when opening apps from All Apps.
Instead of moving the entire DragLayer, we only move
AllAppsContainerView. This prevents the hard white line caused
by the AllApps background translating downwards.

Bug: 70220260
Change-Id: I8249e8bbeea616e728d5502a35c95cbae401efdc
2018-01-18 17:20:30 -08:00
Sunny Goyal 234b92d4ec Merge "Reapplying state UI when the insets change" into ub-launcher3-master 2018-01-18 23:05:51 +00:00
TreeHugger Robot dbcd632214 Merge "Move scrim from DragLayer to LauncherRootView." into ub-launcher3-master 2018-01-18 22:26:37 +00:00
Jon Miranda de43a71b06 Move scrim from DragLayer to LauncherRootView.
This change will make opening/closing animations a lot cleaner.

Change-Id: I7f8ae301a9a126023833e282d6654bebd09bb306
2018-01-18 14:15:45 -08:00
Sunny Goyal ce8809a588 Reapplying state UI when the insets change
Change-Id: Ief9588400f332b2c5b084a8a11c3102b2c20c4ea
2018-01-18 14:03:19 -08:00
TreeHugger Robot f12cfaa156 Merge "Fading the edges of the thumbnail if the size is different than the view size" into ub-launcher3-master 2018-01-18 20:06:08 +00:00
Sunny Goyal bac7f64fcc Fading the edges of the thumbnail if the size is different than the view size
Change-Id: I7bfb9d55ccbf4fa0338bc962632cfeac37cd69be
2018-01-18 11:48:40 -08:00
Jon Miranda 69057173a7 Synchronized opening app transition animations.
Bug: 70220260
Change-Id: I3c8e1c477266fb3bd7a39f74e3e1191e82ce58e9
2018-01-18 09:44:54 -08:00
Sunny Goyal 690f249843 Updating the workspace card in recents UI
> Removing the widgets button from the card
> Making the height of the card same as that of the second card
> Using the same swipe rage for going between Normal and Overview state

Change-Id: Ib8bd050c52294bb01522fbcd0236f2221e6fe62d
2018-01-17 16:38:50 -08:00
Sunny Goyal 8d9384e27b Using a default bitmap if we fail to take a screenshot
Change-Id: I7fbde49ee01732795618c2e664c406043ba7831b
2018-01-17 14:30:06 -08:00
Sunny Goyal 000e0a1480 Removing packageName from home intent to avoid duplicate launcher activity
Change-Id: I9a693f04aed2d40b95088e7a939390de5281ce31
2018-01-16 12:16:15 -08:00
Sunny Goyal 75c59acf5c Ensuring that Recents view is always loaded when going to Overview state
Change-Id: If2337a0be66f4ca68dd54954b7368f38d70a40d4
2018-01-16 12:01:57 -08:00
Sunny Goyal 05a3bbdef8 Adding swipe gestures in overview screen
> When on home time, swiping up goes to all_apps, and swiping down goes to normal
> When on a recents tile, swiping up the tile dismisses it, swiping down launches it
> When on a recents tile, swiping up on the hotseat opens allApps.

Change-Id: I59f8c02f5c5d9cb88c0585a083fbc33d33b1c806
2018-01-16 10:31:36 -08:00
TreeHugger Robot dfa46e1d62 Merge "Adding a back stack to go to overview from all-apps" into ub-launcher3-master 2018-01-12 23:27:52 +00:00
Adam Cohen f4fce2943e Don't reload the Recents model if it's already loaded
-> This was causing a race condition which would lead to many black
   thumbnails when invoking overview from home

Change-Id: I24221fd42a18a339c1b8bbdc63e63513561be9b9
2018-01-12 13:02:58 -08:00
Tony 6d6fe041c7 Implement quick scrub and quick switch callbacks
Bug: 70180755
Change-Id: I011dd5b0435cea7ba493e83b973ce5be7d18c1f0
2018-01-11 17:20:35 -08:00
Sunny Goyal 1a52ef57c7 Removing some dependency on Launcher UI
Change-Id: Ic1c84880cfe4daa9398b8eb27c3afc0837c5a8ca
2018-01-11 15:33:23 -08:00
Sunny Goyal 49bcf34e81 Adding a back stack to go to overview from all-apps
Change-Id: I94e7c27aa505123ddbe40ffa29b1bbc9b2748293
2018-01-11 14:45:11 -08:00
Sunny Goyal 9bb0d72640 Adding feature to support two different swipe targets from all-apps and overview
Change-Id: I7e7b4abbcebcbd6de43805c57ee40b0edd5ba5aa
2018-01-11 14:13:44 -08:00
TreeHugger Robot b5d047ca14 Merge "Removing layout handling in DeviceProfile and moving it to individual views" into ub-launcher3-master 2018-01-10 23:25:26 +00:00
Sunny Goyal 07b6929cd9 Removing layout handling in DeviceProfile and moving it to
individual views

Bug: 71709920
Change-Id: I8300fa7a84b31898bdb135d774cca576d2928525
2018-01-10 15:13:25 -08:00
Tony Wickham 5cf0fbcfc5 Merge "Add onWidgetsBound() callback to TaskMenuView" into ub-launcher3-master 2018-01-09 02:07:33 +00:00
Sunny Goyal 228153d92a Updating landscape layout for launcher/quickstep
> Hotseat is tied to navbar (on left in seascape)
> Search box shows up in Overview (clicking it would crash for now)
> All-apps is no longer fullscreen in landscape
> Recents cards are appropriately scaled down
> Hotseat is visible in Overview

Bug: 70179916
Change-Id: I53149eaeac9557e8a01021b7e2d139f3d6ceef37
2018-01-08 13:53:44 -08:00
Tony Wickham 07b1d670f2 Animate to the workspace card when transitioning from overview to home
Change-Id: Ib2c2288fd935f678a5c7a354be09c6d852d86b41
2018-01-05 14:15:10 -08:00
TreeHugger Robot a92638ab7d Merge "Two state swipe interaction fixes" into ub-launcher3-master 2018-01-03 23:20:28 +00:00
Sunny Goyal 2a0659b223 Two state swipe interaction fixes
> Loading the recents plan before showing recents and always starting with page 0
> Fixing thumbnail not getting drawn when layout happens after task plan is loaded
> Disabling two state swipe when touch service is not connected
> When using swite gesture, once user triggers the overview mode, he cannot land
  in NORMAL state in that gesture

Change-Id: I7a2e83318af6e98dcc64849690fcba6dc8f71f77
2018-01-03 15:11:27 -08:00
Tony Wickham 0c52b56db9 Add onWidgetsBound() callback to TaskMenuView
This lets us handle the edge cases where widgets are added or
removed after popuplating the menu, and updating it accordingly.

Change-Id: I5d8fff8714caa718f87aeac3b15a346b80aed7a8
2018-01-02 16:56:49 -08:00
Tony Wickham 2fae2a0e9c Add system shortcuts when long pressing recent icon
We add a floating view for the menu that aligns with the task icon.

If available, the following shortcuts are present:
- Widgets
- App info
- Install (for instant apps)

It is designed to be straightforward to add to this list.

Bug: 70294936

Change-Id: I56c1098353d09fc564e0e92e59e4fcf692e486ba
2018-01-02 15:44:34 -08:00
Sunny Goyal 9328a51271 Adding translationX to workspace card to that it is slightly visible
behind the first card

Change-Id: Idc0c169fb92510e74b983160778bd9dbacf29943
2017-12-22 11:21:18 -08:00
Sunny Goyal e15e2a8267 Adding an empty page in Recents view corresponding to workspace
The page is aligned to the workspace card and shows a widgets button
in the empty region

Change-Id: I479c47a2fbac4b3ef1aaf833d9fe82b5d7e10ddc
2017-12-19 10:06:15 -08:00
Winson Chung 50f85e04f0 Temporarily disable HW bitmaps
- Causes crash due to sampling bitmap for badge color.

Change-Id: I5c9186fb22769c5b7dcf88d9820aabae5ce486f5
2017-12-15 11:43:29 -08:00
TreeHugger Robot e7794795a0 Merge "First pass at using hardware bitmaps" into ub-launcher3-master 2017-12-14 00:46:25 +00:00
Tony Wickham 5f7335741d Merge "Swipe from nav bar to enter overview in landscape" into ub-launcher3-master 2017-12-13 21:46:19 +00:00
Sunny Goyal 9d32323cac First pass at using hardware bitmaps
Bug: 35428783
Change-Id: Ife67b85f6e7e268826597ed9bccd9659841f67de
2017-12-13 13:36:36 -08:00
Tony Wickham 30d276cb92 Merge "Animate recent app icon in after activity transition" into ub-launcher3-master 2017-12-13 17:45:16 +00:00
Tony Wickham b744a67785 Swipe from nav bar to enter overview in landscape
Previously there was hard coded logic for portrait mode, such as
always assuming Y velocity and the upward swipe direction.

Bug: 70179916
Change-Id: Id08ae849632d766b01d67da1c6c67d4e24c697d7
2017-12-13 09:40:36 -08:00
Tony Wickham 0349b6c01c Animate recent app icon in after activity transition
This prevents the icon from being eclipsed by the drag view
as it scales down.

Change-Id: I6d06414bf58ddbc95e51827358e8845897ee554d
2017-12-12 17:23:26 -08:00
TreeHugger Robot 3526729354 Merge "Restricting the overview state trigger logic to a limited swipe range" into ub-launcher3-master 2017-12-13 00:15:00 +00:00
TreeHugger Robot 4aa4c5a911 Merge "Hide hotseat in landscape overview" into ub-launcher3-master 2017-12-12 23:10:56 +00:00
Tony Wickham a447bd884b Hide hotseat in landscape overview
Bug: 70179916
Change-Id: Ib277a054cf16233ab9156a4448c41952e3295fae
2017-12-12 14:58:50 -08:00
Sunny Goyal 0c723353a6 Enabling swipe up from overview to all-apps
> Fixing wrong alpha interpolator when swiping down from all-apps

Change-Id: I7d4200c89797e5609fd7c4aa8681dea2ffd00bf7
2017-12-12 12:20:23 -08:00
Sunny Goyal f5f6fc3898 Restricting the overview state trigger logic to a limited swipe range
Change-Id: I68714b064dcc62e1837005e0d25b48ac48aa62ca
2017-12-12 10:25:11 -08:00
Sunny Goyal de5535a1ec Initial interaction for two state swipe to overview
> Currently swipe only works from NORMAL and ALL_APPS state
> All interpolation is spread linearly

On pausing the drag for some time, the workspace moves to overview state,
and all other transitions interpolate linearly from there over the
remaining swipe range

Change-Id: Ic79f9d0f446c9bfff11e4af4d31ddc1c86c45ab2
2017-12-11 09:56:17 -08:00
Tony Wickham fcb1dd183c Merge "Implement swipe to dismiss recent tasks" into ub-launcher3-master 2017-12-08 19:12:42 +00:00
Sunny Goyal a3e0350329 Creating a copy of vertical swipe detector for quickstep
Change-Id: Ie38e0c11e8ea9aa476e450f074295358623c6942
2017-12-07 16:28:21 -08:00
Tony Wickham 8643cd4ef4 Implement swipe to dismiss recent tasks
Bug: 69166452
Change-Id: I6ccb77dbc6e55c5076ecb9808ee8283e0c72eea7
2017-12-07 15:36:56 -08:00
Sunny Goyal 3c585ddbf7 Removing view layer support during state animation.
View layer was only being used when fading in/out hotseat in overview.
From API 21+, android automatically create layers when animating alpha

The current support for view layers does not work properly when cancelling
animations and controlling partial animations

Change-Id: I2d5785471af9819575beefe65f1f2bdd28c76bd5
2017-12-07 14:18:16 -08:00
Sunny Goyal e3c6d58b71 Adding support for tagging animations per controller, so that they can be controlled independently
Change-Id: I6f360362aa16f7e02fe5fe84976b23663f228030
2017-12-07 12:46:26 -08:00
Sunny Goyal bc683e9d06 Separating various UI properties into state variables
> Using workspace scale and translation for all-apps
> Without quickstep, workspace has the parallex effect as before
> With quickstep, workspace scales down to match the recents card width
> Using a single animator for recents views in case of state transtion and
  controlled transition to prevent going into inconsistant state.

Change-Id: I1864de6892052ca771f4d0062e3d60c28840a72d
2017-12-06 14:29:33 -08:00
Tony Wickham 53370678ce Allow hotseat items to be clicked in overview
Bug: 70179573
Change-Id: Ib2cbd7b12e5e1287d652d703e95c15ca6ea12a4e
2017-12-05 11:40:21 -08:00
Sunny Goyal e6af6318cf Merge "Forwarding touch events from TouchInteractionService to Launcher when launcher window is visible" into ub-launcher3-master 2017-12-04 19:23:09 +00:00
Tony Wickham 7df64b3dbf Dim non-forefront recent pages
Also move updateCurveProperties to computeScroll instead of scrollTo.

Change-Id: Ibb380f0122185b7fe93541daf58d5bda916c89c0
2017-12-01 16:00:59 -08:00
TreeHugger Robot 413e7d44fd Merge "Subtracting the touchSlop when dragging the window, to prevent initial jump" into ub-launcher3-master 2017-11-30 07:55:56 +00:00
TreeHugger Robot 0c2d9b0f3e Merge "Fix bug where long press menu text is white on gray for dark backgrounds." into ub-launcher3-master 2017-11-27 22:45:21 +00:00
Jon Miranda b1b2b45a69 Fix bug where long press menu text is white on gray for dark backgrounds.
Bug: 69723025
Change-Id: Iba9704b3f07b2156d449734b8fd750f4238da8e7
2017-11-27 14:23:32 -08:00
Sunny Goyal 0607cf03ea Forwarding touch events from TouchInteractionService to Launcher
when launcher window is visible

Change-Id: I418994c2e2a5559c28c36875ac7aff589a15fac5
2017-11-20 18:03:57 -08:00
Tony Wickham 635329a5ab Merge "Add carousel curve effect to RecentsView." into ub-launcher3-master 2017-11-17 18:43:12 +00:00
Tony Wickham 1c9bf6a19c Add carousel curve effect to RecentsView.
Pages scale down and tuck underneath the centermost page.

Change-Id: I12686cd72634f758ef71828033eb4e22339ef185
2017-11-17 10:25:27 -08:00
Sunny Goyal 27887b2c64 Adding some tracing for touch interaction
Change-Id: Ibbd54b5a0d397312e8f83bdcc2b7d93f309f8f7a
2017-11-16 17:02:40 -08:00
Sunny Goyal 1c22aa1370 Subtracting the touchSlop when dragging the window, to prevent initial jump
Change-Id: I26a79076312d4641693a9610c17cf925d5d104ea
2017-11-16 16:11:18 -08:00
Sunny Goyal 1dc8a1f3ca Batching MotionEvents and processing them on the UI thread
Change-Id: I2dc972af8360e719db743740074893bac0213ded
2017-11-16 15:12:42 -08:00
Winson Chung 047dea9e66 Merge changes Iaeeca788,I305b659d into ub-launcher3-master
* changes:
  Fetching graphic buffer instead of bitmap for current screenshot.
  Add option to not preload titles.
2017-11-16 20:41:17 +00:00
TreeHugger Robot af3a327779 Merge "Temorarily changing the long press action on the homescreen to show a popup menu" into ub-launcher3-master 2017-11-16 18:26:20 +00:00
Winson Chung 0485e357db Fetching graphic buffer instead of bitmap for current screenshot.
Bug: 69166452
Change-Id: Iaeeca788c9afadb1ce6f7ee3056dddf9b2e339b2
2017-11-16 09:46:16 -08:00
Winson Chung 117386c9b7 Add option to not preload titles.
Bug: 3236757

Change-Id: I305b659d8ce35ee9c269b25b88558fd29de79ba0
2017-11-15 18:14:42 -08:00
Sunny Goyal a5ace71d91 Temorarily changing the long press action on the homescreen to show a popup menu
Change-Id: If160a2e4d0f73e2e1ecb424a0625d642b8775ada
2017-11-15 17:13:14 -08:00
Sunny Goyal 0874079c0e Various swipe up animation optimizations
> Tracking the touch from the start of the interaction, instead of when launcher is visible
> Animating the snapshot to the final posion after first draw
> Scheduling frame only when there are pending touch events
> Starting launcher before loading recents

Change-Id: Id9c3642ea235a1d35d31dbf28024c99dd4f47daa
2017-11-15 16:39:17 -08:00
TreeHugger Robot 3e4d95d33d Merge "Fixing wrong velocity being used for fling" into ub-launcher3-master 2017-11-15 18:41:37 +00:00
Sunny Goyal d3864fa630 Fixing double state changes when using an InternalStateHandler
> Removing duplicate state handling on onCreate and onNewInetnt when InternalStateHandler is active
> Changing PinItemDragListener to use IntenalStateHandler

Change-Id: I42dcf82d1180c49430c6cf0b85d47072c4498ecc
2017-11-15 10:24:10 -08:00
Sunny Goyal 6fc380def6 Fixing wrong velocity being used for fling
Change-Id: I0e8a9563d4148ed9f6035a441ab045c7f4f8a736
2017-11-15 10:02:16 -08:00
TreeHugger Robot 77f7b66822 Merge "Simplifying workspace layout" into ub-launcher3-master 2017-11-15 01:12:30 +00:00
Winson Chung ee849a5199 Minor optimization when starting quickstep.
Change-Id: I339c414d500a14407041189828838f35d2e63cf4
2017-11-14 14:33:34 -08:00
TreeHugger Robot f405f507b7 Merge "Load some recent tasks" into ub-launcher3-master 2017-11-14 18:13:08 +00:00
Winson Chung b63b44c3d5 Load some recent tasks
Bug: 69166452
Test: Build quickstep
Change-Id: Id4b0172256d6920616a6b9529d61abd1fe0c1a36
2017-11-13 18:02:44 -08:00
Sunny Goyal ac00cba35c Simplifying workspace layout
Instead of creating workspace view larger than the screen size (so that it can be
zoomed out), restricting the size to the parent size and bypassing the drag events
directly to Workspace (since the workspace is smaller when zoomed out, it might not
qualify for all events otherwise).

Change-Id: I45e213dd6d16bec5feb6e7cf90bc6f7de4c6d305
2017-11-13 16:00:06 -08:00
Sunny Goyal 6c2b3ef0f3 Adding volatile to various variables used on multple threads.
Change-Id: I143de4981461e6f07688a7ffda906fabbcc97948
2017-11-13 09:56:31 -08:00
Sunny Goyal f8088eecf1 Initial changes for handling touch events.
When the touch passes a threashold, we take a snapshot and start the launcher
activity. The launcher displays the snapshot on top of its UI.
As we get further touch events, we move this snapshot and the hotseat in reponse.

Change-Id: I4623676227000afd52805a414a4de499081feced
2017-11-10 18:06:33 -08:00
Sunny Goyal 3a052d413d Merge "Adding some task views." into ub-launcher3-master 2017-11-10 21:13:14 +00:00
Winson Chung 8ae4198a44 Adding some task views.
Bug: 69166452
Test: Build quickstep
Change-Id: Iee4cb0b9ac32716f588082a197a90ec1b2655047
2017-11-10 12:03:43 -08:00
Sunny Goyal c4fa8c312b Changing the state UI logic for normal build and quickStep build
> Creating ShareHandlers for managing UI
> In normal build, hotseat is hidden in overview, while in QuickStepBuild, it is visible

Change-Id: I5f8d35c75b861d912d93fce186b5dd74106184c3
2017-11-07 12:24:47 -08:00
Sunny Goyal 16764588c9 Separing the overview states for normal and quickstep builds
In QuickStep, adding a placeholder ScrollView and changing the state logic
appropriately to handle that

Change-Id: I10223c0692788d6e5dbf8c408c01cafb4e39bd2c
2017-11-07 09:46:20 -08:00
Sunny Goyal 85525173ce Rearranging the code structure to allow replacing state logic.
Change-Id: I6f83d0f77045ba189f02dd465bf70ffc2a239aa1
2017-11-06 14:57:50 -08:00
Sunny Goyal 416fc0b328 Updating the systemUI lib
Change-Id: Ie945325ea5c436188c79a8f79082d5098357de6d
2017-11-03 14:04:17 -07:00
Sunny Goyal 73133391e5 Adding a placeholder recents activity
Change-Id: Idde86b4008559cde8bcf13fba90a8c72c3f1f591
2017-11-02 11:23:31 -07:00
Sunny Goyal 9d341964a0 Setting up build rules and placeholder code for QuickStep
Change-Id: Ib4ad5c6082b293fc9f9455d70e2b21462b4ab76d
2017-10-30 10:04:24 -07:00