Commit Graph

6667 Commits

Author SHA1 Message Date
Andy Wickham 17f379bf4b Adds haptics to Overview gesture in Sandbox.
Change-Id: I4b8ec88bfc051de287b1b8ac27c4b5ab9ac90bbf
2020-07-24 16:49:15 -07:00
Sunny Goyal ff4b142789 Fixing touches getting ignored just after swipe-up
Moving the input proxy logic outside the recents controller, so that it
is not lied to the controller lifecycle.

> Fixing input consumer not getting registered if recentsController
  was not received until ACTION_UP
> Fixing input events being ignored after finishing recentsAnimation,
  but before handler is invalidated

Bug: 161750900
Change-Id: Ib06617caef77f18a71c5a231e781291c3a4ee57e
2020-07-24 16:48:56 -07:00
Hyunyoung Song 65b16d6db2 Merging from ub-launcher3-rvc-qpr-dev @ build 6690853
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-qpr-dev-rvc-qpr-dev_6690853.html

Change-Id: Ie86b0a2e0d82646a0c3d44a0214cbb985435320d
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-23 03:47:06 +00:00
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 a4661192ff 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
Merged-In: Iab6b25d931b2e91ae5647e266bd68ead86c99bc6
(cherry picked from commit efa41c1c52)
2020-07-22 15:51:03 -07: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
Becky Qiu 928a421b99 Merging from ub-launcher3-master @ build 6682763
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6682763.html

Change-Id: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-15 20:50:57 +00: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 bb84ab3d66 Fixing recents orientation (when home rotation is allowed) during swipe-up am: 52f2392405 am: e58055d79d am: a63a7a0471 am: f2d234834c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12102312

Change-Id: I077a4f24565d8c4dfb989171b34a96f89b16a32a
2020-07-08 05:57:38 +00: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 52f2392405 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-08 00:24:29 +00:00
TreeHugger Robot 289aca6a0e Merge "Guard swipe to notification gesture with system settings preference" 2020-07-07 02:02:11 +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
Jerry Chang 779efaca91 Guard swipe to notification gesture with system settings preference
Bug: 154080211
Test: make and install, check the gesture works as expectedly
Change-Id: Ibd6bbd595d2fba5d68e66eb54e4a7fec160b9bf8
2020-07-01 11:44:02 +08: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
Zak Cohen 1562c3de18 Thumbnail Cache - check canceled status on the right thread. am: 19797b419b am: 987ba0261f am: 4163325b9c am: c01ab27bce
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12029198

Change-Id: Ib5e004cae554832050f1a3efff5276bf3399d126
2020-06-29 22:59:17 +00: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 19797b419b 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-29 04:11:04 +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
TreeHugger Robot 879ba9803d Merge "Add NPE check for prediction controller" into rvc-dev am: f8e12b78bf am: 53c7ddd7fd am: 39e1af9a27 am: 4585f9f3c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12001481

Change-Id: I18caa4806f4933059fb1bdc5165e5aa80b5bd605
2020-06-26 20:45:18 +00:00