Commit Graph

1960 Commits

Author SHA1 Message Date
Winson Chung 18b76be7f2 Merge changes from topic "ub-one-handed-rebase" into ub-launcher3-master
* changes:
  Guard swipe to notification gesture with system settings preference
  Update state and touch region after one handed overlay changed
  Hook one-handed gesture to expand notification panel by default
  Enable one-handed mode gestural in QuickStep
2020-07-23 02:37:54 +00:00
thiruram efa41c1c52 Limit launcher snapshot logging once per day.
This change will make sure launcher snapshot is logged only once in 24hrs interval using sharedpreference.

Bug: 161375303
Change-Id: Iab6b25d931b2e91ae5647e266bd68ead86c99bc6
2020-07-22 14:07:44 -07:00
TreeHugger Robot c6962d9ad1 Merge "Use display of activity to get rotation for recents" into ub-launcher3-rvc-qpr-dev am: 7416a9097a am: 35f5abc54d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12193289

Change-Id: I4d0a7f28ac14d1d9a8c65d2ce27061a94734fdfc
2020-07-22 18:10:28 +00:00
TreeHugger Robot 7416a9097a Merge "Use display of activity to get rotation for recents" into ub-launcher3-rvc-qpr-dev 2020-07-22 17:35:32 +00:00
thiruram f668ec0beb Fixes missing field mappings from launcher_atom.ItemInfo to Statslog. am: 3344b8ce3d am: 23331ead95
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12160060

Change-Id: I66321bee8c2470c7eb73f30033a19e2d348b5289
2020-07-21 21:43:20 +00:00
thiruram 3344b8ce3d Fixes missing field mappings from launcher_atom.ItemInfo to Statslog.
Bug: 161284668
Change-Id: I70b247e896bfcad5f6dbb6ce3ec5ed7aa57b8a61
2020-07-21 21:04:50 +00:00
Sunny Goyal b9a0a99ade Adding home animation support for non-system Launcher am: 30ac97d938 am: c60023449c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12150115

Change-Id: Idbd4c1ab36928420023987e0e4bdb06edd9e3268
2020-07-21 20:07:31 +00:00
Sunny Goyal 30ac97d938 Adding home animation support for non-system Launcher
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
2020-07-21 11:43:21 -07:00
Winson Chung fbb8c69a56 Guard swipe to notification gesture with system settings preference
Bug: 154080211
Test: make and install, check the gesture works as expectedly

Change-Id: Ibd6bbd595d2fba5d68e66eb54e4a7fec160b9bf8
(cherry picked from commit 779efaca91)
2020-07-21 09:59:44 -07:00
Winson Chung fc6c42107d Update state and touch region after one handed overlay changed
The matrix for overall modes x state changes:
-----------------------------------------------------
   Mode     |      State changed     | *Before|*After
-----------------------------------------------------
  OneHanded |  Portrait->Landscape   |  80dp  |  32dp
  OneHanded |  Landscape->Portrait   |  32dp  |  80dp
-----------------------------------------------------
  OneHanded |  Disable->Enable       |  32dp  |  32dp
 (Landscape)|  Enable->Disable       |  32dp  |  32dp
-----------------------------------------------------
  OneHanded |  Disable->Enable       |  32dp  |  80dp
 (Portrait) |  Enable->Disable       |  80dp  |  32dp
-----------------------------------------------------
  NO_BUTTON |  Portrait->Landscape   |  32dp  |  32dp
  NO_BUTTON |  Landscape->Portrait   |  32dp  |  32dp
  2 BUTTON  |  Portrait->Landscape   |  48dp  |  48dp
  2 BUTTON  |  Landscape->Portrait   |  48dp  |  48dp
  3 BUTTON  |  Portrait->Landscape   |  48dp  |  48dp
  3 BUTTON  |  Landscape->Portrait   |  48dp  |  48dp
-----------------------------------------------------
* dimen : navigation_bar_gesture_height

Test: adb bugrepot | grep mOneHandedModeRegion
Test: manually triger one handed
Test: atest WindowInsetsBehaviorTests
Test: atest com.android.launcher3.memory.MemoryTests
Test: flake -once
Test: rnlot -t com.android.launcher3.memory.MemoryTests
Bug: 157958539
Bug: 159183864

Change-Id: I19755938c3c93eb59a9f621af5722f5679c1da14
(cherry picked from commit 70b5ca2505)
2020-07-21 09:59:44 -07:00
Winson Chung 1c1f5d9aef Hook one-handed gesture to expand notification panel by default
Notify to expand notification panel through SystemUiProxy when
one-handed mode disabled and one-handed gesture detected.

Bug: 154080211
Test: make and install
Test: manual disable one handed mode and swipe down to trigger
Test: verified the gesture works even outside of home page

Change-Id: Iacc0e506ccd04dd81f6182759c8af7d686a7b77b
(cherry picked from commit dd3eb7d075)
2020-07-21 09:59:43 -07:00
Tony Huang a0dfbff96a Enable one-handed mode gestural in QuickStep
Handling swipe-down/swipe-up gestural in device bottom area
for one-handed mode

1) The regsion is larger than gesture navigationbar view
2) One handed gestural in quickstep only active on NO_BUTTON, TWO_BUTTONS mode
3) One handed gestural only support on portrait mode

Bug: 150747547
Bug: 154189137
Bug: 156988988

Test: make and install
Test: manual enable one handed mode and swipe down to trigger
Test: manual start one handed and rotate device

Change-Id: I7b2447bfb2fe4082c95176b62934b98077b84920
(cherry picked from commit 7d375e31fe)
2020-07-21 09:59:43 -07:00
Riddle Hsu 354b8fc081 Use display of activity to get rotation for recents
The rotation of WindowConfiguration in Configuration is non-public
field. There is no guarantee that the information will be updated.
E.g. a 180 degree rotation change won't make difference to the
public configurations, so the Resources will keep the old one.

The display rotation of activity is accurate to use for its content
because even the activity is transformed to different rotation than
the physical display, there is FixedRotationAdjustments to adjust
the information which will be consistent as how the activity is
laid out.

Bug: 159877752
Test: 1. Enable auto rotation.
      2. Launch some portrait activities.
      3. Put device in reverse portrait (upside down).
      4. Launch a landscape activity.
      5. Swipe to another activity with full-sensor orientation.
      6. Return to home and enter recents to check the task views
         of step 2 don't show upside down.

Change-Id: I5e16e71d43b8892a394c06de9e76fb3d4ad55919
2020-07-21 06:15:35 +00:00
Winson Chung 5b7bf9147b Create a new instance of rotation touch helper per device state
Change-Id: I4e4288eaf37aab5bf0b8115f5e06e64459c20f00
(cherry picked from commit 00850fb588)
2020-07-20 22:05:46 +00:00
Winson Chung 00850fb588 Create a new instance of rotation touch helper per device state
Change-Id: I4e4288eaf37aab5bf0b8115f5e06e64459c20f00
2020-07-20 13:57:56 -07:00
TreeHugger Robot 12dc76e76c Merge "Move rotation logic to RotationTouchHelper" into ub-launcher3-rvc-qpr-dev am: eb2eb38cc2 am: eb682915f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12155343

Change-Id: Idd86a05c6b3d4a1765d53ccea81b509d7b779acb
2020-07-17 23:05:48 +00:00
Sunny Goyal 12f46d521a Fixing recents orientation (when home rotation is allowed) during swipe-up
Bug: 158781568
Bug: 160149607
Change-Id: I27be09febcdb6f19687469db34b002ce682aa0cb
Merged-In: I27be09febcdb6f19687469db34b002ce682aa0cb
(cherry picked from commit 141c231d2f)
2020-07-17 18:53:01 +00:00
TreeHugger Robot 30d771860e Merge "Updating gesture tutorial home animation" into ub-launcher3-rvc-qpr-dev am: 24ddf21cea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12117946

Change-Id: I6a86fd320482d9f3b894b8ff8eb5c7f0d5bdc9ca
2020-07-17 01:47:52 +00:00
Sunny Goyal 852537fd98 Using StatsLog for notifyingAppPredictor
> Adding a listener in StartsLogManager for listening to events.
  This allows events to be directored to the predictor only if
  it is already running, instead of creating it.
> Unifying the event format to be same as hotseat predictor

Bug: 160748731
Change-Id: Ib00e6249ff642c030f00bcad5b748255e704d16a
2020-07-16 14:12:15 -07:00
Tony Wickham 94be66acd6 Fix tracking window being slightly off when swiping from an app
Test: swipe up from an app in landscape, seascape, and portrait,
and verify the window tracks with the finger 1:1 until pullback

Bug: 149934536
Change-Id: Ia469877e7152c8135e0b9153f69c191ba86cbd14
(cherry picked from commit f0a1b2ccd8)
2020-07-16 20:03:36 +00:00
TreeHugger Robot eb2eb38cc2 Merge "Move rotation logic to RotationTouchHelper" into ub-launcher3-rvc-qpr-dev 2020-07-16 05:14:25 +00:00
Vinit Nayak 0affd89031 Move rotation logic to RotationTouchHelper
No functional changes.

Fixes: 159764370
Change-Id: Ie7739a62242377bda69c86bd46e24d2f847f17e0
2020-07-15 22:03:14 -07:00
TreeHugger Robot add69c70c4 Merge "Fix velocity in StaggeredWorkspaceAnimation." into ub-launcher3-rvc-qpr-dev 2020-07-13 22:20:33 +00:00
TreeHugger Robot 054280dba4 Merge "Using original taskInfo to create the taskKey instead of fake data" into ub-launcher3-rvc-qpr-dev 2020-07-13 22:06:13 +00:00
Jon Miranda aee792403d Fix velocity in StaggeredWorkspaceAnimation.
* Velocity should match the direction of the spring values.
  (Swipe direction is upwards, but icons move downwards on screen).
* Remove additional conversion to pxPerS since getDimension already does that.

Bug: 160003774
Change-Id: I12912edb2354c4a30c538da6ca3789c46d82b94d
(cherry picked from commit 54003963d8)
2020-07-13 21:48:19 +00:00
Sunny Goyal 55a9b544c9 Using original taskInfo to create the taskKey instead of fake data
Change-Id: Ie4e35b35484e0f6cb939febe6357b37381d81682
(cherry picked from commit fabfb3ae90)
2020-07-13 21:47:16 +00:00
Pinyao Ting 9d51e49cec Fixes the issue Launcher state propagation is slower than onDeferredResume.
There's currently a bug prevents Launcher release drag lock for two step
widgets. Supposedly, onDeferredResume should release the drag lock; However,
in 3-button navigation mode, the transition from Overview -> Normal is
triggered in Launcher#onNewIntent, which happens after onDeferredResume.

This issue is not reproducible with gesture navigation because its
transition from Overview -> Normal is handled in NavBarToHomeTouchController

Test: manual verified with following steps
1. Enable 3-button navigation
2. Long press in WorkSpace -> Widgets
3. Drag Settings Widget to WorkSpace
4. When the config activity is shown, press "recents" button to see Overview
5. press "home" button to go back to workspace
6. repeat 2 and 3, verify the widget can be dragged
Bug: 149659788

Change-Id: I396ffa8a7db44bf3872a10de4208340a99a7efe8
(cherry picked from commit 3bf889a02f)
2020-07-13 21:46:05 +00:00
TreeHugger Robot 5491b2e2e0 Merge "Fix shelf tracking distance for landscape app over portrait launcher" into ub-launcher3-rvc-qpr-dev 2020-07-13 20:44:30 +00:00
Tony Wickham 452db0db0c Fix shelf tracking distance for landscape app over portrait launcher
Bug: 149934536
Change-Id: I14fa62fa9f51356613f4a3827446b00af774dbf5
2020-07-13 13:21:02 -07: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
Sunny Goyal 9a0e18015b Removing separate overview prediction client
Bug: 160748731
Change-Id: Ia9ab089bc016bbaa6a19cedaee3bf12719db9da0
2020-07-07 22:04:14 -07:00
TreeHugger Robot 4c40be975c Merge "Fixes the issue Launcher state propagation is slower than onDeferredResume." into ub-launcher3-master 2020-07-08 00:27:35 +00:00
Sunny Goyal 0d213ebb79 Fixing recents orientation (when home rotation is allowed) during swipe-up
Bug: 158781568
Bug: 160149607
Change-Id: I27be09febcdb6f19687469db34b002ce682aa0cb
2020-07-06 17:17:12 +00:00
Pinyao Ting 3bf889a02f Fixes the issue Launcher state propagation is slower than onDeferredResume.
There's currently a bug prevents Launcher release drag lock for two step
widgets. Supposedly, onDeferredResume should release the drag lock; However,
in 3-button navigation mode, the transition from Overview -> Normal is
triggered in Launcher#onNewIntent, which happens after onDeferredResume.

This issue is not reproducible with gesture navigation because its
transition from Overview -> Normal is handled in NavBarToHomeTouchController

Test: manual verified with following steps
1. Enable 3-button navigation
2. Long press in WorkSpace -> Widgets
3. Drag Settings Widget to WorkSpace
4. When the config activity is shown, press "recents" button to see Overview
5. press "home" button to go back to workspace
6. repeat 2 and 3, verify the widget can be dragged
Bug: 149659788

Change-Id: I396ffa8a7db44bf3872a10de4208340a99a7efe8
2020-06-30 17:00:24 -07:00
TreeHugger Robot c67625411f Merge "Using original taskInfo to create the taskKey instead of fake data" into ub-launcher3-master 2020-06-29 18:06:16 +00:00
Zak Cohen 8063fe0e68 Thumbnail Cache - check canceled status on the right thread. am: a3629bd52c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12029197

Change-Id: I1b99714506e408d145b6d03a49cea621ef290781
2020-06-29 04:52:22 +00:00
Zak Cohen a3629bd52c Thumbnail Cache - check canceled status on the right thread.
The cache was checking the canceled status on the background
thread, but the cancel call was being made on the main thread.
This was leading to canceled requests still delivering this thumbnail
in some cases.

Bug: 159840851
Test: local build and non-repo of bug
Change-Id: I9a3556f6570eee1db39ebec202c115d58010d7f8
2020-06-28 21:10:07 -07:00
Sunny Goyal fabfb3ae90 Using original taskInfo to create the taskKey instead of fake data
Change-Id: Ie4e35b35484e0f6cb939febe6357b37381d81682
2020-06-26 17:14:16 -07:00
Jon Miranda 54003963d8 Fix velocity in StaggeredWorkspaceAnimation.
* Velocity should match the direction of the spring values.
  (Swipe direction is upwards, but icons move downwards on screen).
* Remove additional conversion to pxPerS since getDimension already does that.

Bug: 160003774
Change-Id: I12912edb2354c4a30c538da6ca3789c46d82b94d
2020-06-26 18:16:13 +00:00
TreeHugger Robot fe6d3c6221 Merge "Add NPE check for prediction controller" into ub-launcher3-rvc-dev am: f59922d0d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12000756

Change-Id: I7ecfc4c45bbc60fc29181ac81606e26d06196392
2020-06-26 08:06:49 +00:00
TreeHugger Robot f59922d0d7 Merge "Add NPE check for prediction controller" into ub-launcher3-rvc-dev 2020-06-26 07:42:38 +00:00
Tony Wickham 3d6bfc2905 Merge "Fix tracking window being slightly off when swiping from an app" into ub-launcher3-master 2020-06-25 22:18:32 +00:00
Samuel Fufa 514df92bcf Add NPE check for prediction controller
Bug: 159835714
Test: Manual
Change-Id: I9cc03f6491f4e14462be6c01edf3ed4ca1d82136
2020-06-25 13:08:55 -07:00
Tony Wickham f0a1b2ccd8 Fix tracking window being slightly off when swiping from an app
Test: swipe up from an app in landscape, seascape, and portrait,
and verify the window tracks with the finger 1:1 until pullback

Bug: 149934536
Change-Id: Ia469877e7152c8135e0b9153f69c191ba86cbd14
2020-06-25 11:51:28 -07:00
Andy Wickham fce6be550b Merge "Updates Assistant gesture regions when no longer tracking multiple." into ub-launcher3-rvc-dev 2020-06-24 22:29:45 +00:00
Andy Wickham 4b531b972d Updates Assistant gesture regions when no longer tracking multiple.
This should prevent states where Assistant triggers from
the vertical-center of the screen in portrait (see bug).

Also fleshes out OrientationTouchTransformerTests and
adds some new ones that fail without this change:
 - enableMultipleRegions_assistantTriggersInMostRecent
 - enableMultipleRegions_assistantTriggersInCurrentOrientationAfterDisable

Fixes: 158686674
Change-Id: I6d045a485f62e4010e9e3d00805a50fdd953a2fc
2020-06-24 21:23:35 +00:00
Vinit Nayak f2daafcdf8 Prevent premature resetting of quickswitch mode
Previously, whenever a user returned to the same
rotation that they had started quickswitch in,
we were sending sysui the reset flag(-1) indicating
that quickstep was complete instead of sending
the rotation of the device the user was in.

This was intentional and it worked, however we now
always send the active rotation while the user
is in a quickswitch session because sysui needs
to show the fake home handle for immersive apps,
which can occur in any rotation. This state is
distinct from not being in quickswitch at all, in
which no fake handles are shown.

Fixes: 158677967

Change-Id: I910324abf781b4b30fe981139712bcb5b653c318
2020-06-23 15:07:22 -07:00
thiruram dbd61d4026 Log query_length & parent_container for actions on search results.
Bug: 154717227
Change-Id: I8e7d725014f60a2fd9a7fe13fce705acbc7623ad
2020-06-22 18:14:12 -07:00
TreeHugger Robot ceaad08f06 Merge "Fixing rotation watcher not enabled in landscape" into ub-launcher3-rvc-dev 2020-06-22 21:00:07 +00:00
Hyunyoung Song 5c9a1ef5cd Merge "Log Launcher transitions to WW" into ub-launcher3-rvc-dev 2020-06-22 20:21:10 +00:00