Commit Graph

34630 Commits

Author SHA1 Message Date
Bill Lin a1221bcd53 2/ Notify adjust touch slop when one handed mode activated
When one handed mode activated, user swipe-up to exit usually
cross over the NavBar region, and then invoke TouchController
intercept touch event to trigger All Apps drawer on Home.

To enhanced the UX of gesture conflict of exit OHM & All Apps,
notify TouchController throught LauncherActivityInterface,
and Launcher dispatch onOneHandedModeStateChanged() event to
all mTouchControllers in DragLayer that touchController can
adjust the touch slop by it's SingleAxisSwipeDetector.

Test: manual trigger One handed mode and swipe-up to exit
Test: monitor minDisplacement of SingleAxisSwipeDetector
      OHM activated : touchSlop x multiplier
      OHM deactivated : touchSlop x 1
Test: check All Apps doesn't mis-trigger when exit one handed mode
Bug: 186235522
Change-Id: I7b9e6e7fa898231697d1866186a5f9b1717a9aa3
2021-06-04 01:44:51 +08:00
Bill Lin 945bb34b5e 1/ Provides feasibility to adjust touch slop in TouchController
There is a case when one handed mode triggered(Activated), all apps
drawer is very easy to trigger while user swipe up around NavBar
region to exit one handed mode. Since System Gesture monitor regsion
is small on screen bottom, swipe-up gesture usually cross over NavBar
monitor region and invoke launcher touch controller intercept touch
event and introduce unexpectedly trigger all apps drawer.

Adding onOneHandedModeStateChanged(boolean activated) for controller
be able to adjust the touch slop by multiplier, we can set a larger
multiplier when the visible window size translate become smaller
and make swipe gesture not too sensitive.

Test: manual swipe up to swich "home <-> all apps" and monitor
      minDisplacement of SingleAxisSwipeDetector
Test: Trigger one handed mode and swipe up to exit one handed mode
      check the minDisplacement of SingleAxisSwipeDetector
Bug: 186235522
Change-Id: I9729cd408d85b2b22582bf800e28d1471fc06980
2021-06-04 01:44:50 +08:00
Zak Cohen 3ec119cbf3 Merge "RecentsView - reduce work in color tint animator" into sc-dev am: d7129fc919
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14803765

Change-Id: Ie7dd16e9beae174ab9967eccc79d50267298be7e
2021-06-03 17:26:58 +00:00
Zak Cohen d7129fc919 Merge "RecentsView - reduce work in color tint animator" into sc-dev 2021-06-03 17:09:45 +00:00
Alex Chau 822acf4d25 Make quick switch track finger 1:1
- When calculating motion delta, it should consider the scale of pagedView
- Adjust significant threshold of tablet quick switch to 15% of page width (roughly 100dp)

Fixes: 188786242
Test: manual on quick switch
Change-Id: Idaa6c5b721decb573e97158c5fbcd67fa224f9d1
2021-06-03 18:07:52 +01:00
Jon Miranda 4981118478 Only inset widgets if workspaceTopPadding is greater than the widget padding.
This prevents widget from becoming too close to status bar.

Bug: 189724771
Test: manual
Change-Id: I86f83b6a35bd2802bdbdf175340a379b498f481d
2021-06-03 09:54:45 -07:00
Stevie Kideckel d7dc5702f6 Use scrollToPositionWithOffset in widget list and account for padding
Also, scroll after collapsing as well to preserve the header position.
LinearLayoutManager seems to not count/double count the top padding of
the RecyclerView when scrolling to the position. Scrolling with the
offset and deducting the top padding works around the issue.

There's still some occasional weirdness that needs to be investigated,
but this works well...most of the time.

Bug: 183378651
Test: locally
Change-Id: I0ba85fb65411991ef781f08a69faaa993a7d7fd0
2021-06-03 16:18:32 +00:00
Stevie Kideckel f94a93ad2c Merge "Scroll to the selected widget picker row after headers are clicked" into sc-dev am: f15214597e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14800533

Change-Id: I1107db2070a28d7de9ae2450760c9ac38108ee59
2021-06-03 14:30:05 +00:00
Stevie Kideckel f15214597e Merge "Scroll to the selected widget picker row after headers are clicked" into sc-dev 2021-06-03 14:15:00 +00:00
Shawn Lin b762b23227 Merge "Detach the nav once the endTarget is determined as HOME" into sc-dev am: cd0fe7b057
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14811742

Change-Id: I557e183ffd2b0fcc8d9893465e5e7c680b7c5818
2021-06-03 12:04:36 +00:00
Shawn Lin cd0fe7b057 Merge "Detach the nav once the endTarget is determined as HOME" into sc-dev 2021-06-03 11:47:50 +00:00
Stevie Kideckel 3256647b03 Merge "Use the LayoutManager as the source of truth for visible positions" into sc-dev am: 5cc44eb73e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14800536

Change-Id: Ic11f1bc2afc3a7430967b103faf7af56257f5dcd
2021-06-03 11:08:22 +00:00
Alina Zaidi e57ae67013 Merge "Update scrim in widget pickers." into sc-dev am: c599c90eaa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14776603

Change-Id: Idbdeab5c1af6a57b8779ed6a1ac7b8ab70b077ed
2021-06-03 11:08:18 +00:00
Stevie Kideckel 5cc44eb73e Merge "Use the LayoutManager as the source of truth for visible positions" into sc-dev 2021-06-03 11:00:32 +00:00
Pat Manning de40c75730 Merge "Prevent clearing home between display size changes." into sc-v2-dev 2021-06-03 10:47:57 +00:00
Alina Zaidi c599c90eaa Merge "Update scrim in widget pickers." into sc-dev 2021-06-03 10:42:29 +00:00
Stevie Kideckel eb367e471b Scroll to the selected widget picker row after headers are clicked
This keeps the row in view. Currently, this will scroll the row to the
centre-bottom of the screen due to the top padding being double counted,
but that will remedied in a future CL.

This also resolves the issue where the last row's widgets aren't visible
by handling that case specially

Fix: 188665456
Bug: 183378651
Test: verified locally
Change-Id: I9acb9087a8cdaf130ac5955c810c96462b368f36
2021-06-03 09:48:21 +00:00
Stevie Kideckel abd33b38e2 Use the LayoutManager as the source of truth for visible positions
During animations, the view group child may not correspond to the
visible views that appear at the top.

The previous logic is kept in the case that the layout manager returns
null for any reason, which can happen before layout has occurred for the
position.

Fix: 189588014
Test: verified locally
Change-Id: Ie8b5dcef50287e9e90a21f86e30a1ebcbbcba30f
2021-06-03 09:36:22 +00:00
Jon Spivack 05e828c896 Merge "TaskOverlayFactoryGo: Keep persistent instance of AssistContentRequester" into sc-dev am: b7cecf8a90
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14803962

Change-Id: I9ad397ba4d51955f6bbac27e1435180e9175df67
2021-06-03 07:37:52 +00:00
Weilun Du fcec6c6b15 Merge "Revert "Update preferences to Material Next styling"" into sc-dev am: 971d7fddcc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14805276

Change-Id: I2e11130c883782dfc4e9edc755c7ea05bee9ea02
2021-06-03 07:34:00 +00:00
TreeHugger Robot f40d4452d8 Merge "AssistContentRequester move binder call to background thread." into sc-dev am: 8c46bba98e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14801431

Change-Id: I1198b2ee9548ead52dbe1915c8fc6eeb7bac96ab
2021-06-03 07:30:53 +00:00
Pat Manning 668d10d6c4 End drag touch event when crossing task drag threshold, and only when task is going up (drag to dismiss) am: 49cb49b1f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14800534

Change-Id: I93c5b7dc6bd6cabb3560334102fae46553b39506
2021-06-03 07:29:24 +00:00
TreeHugger Robot e14cb20a6c Merge "Remove elevation from the full widgets picker container" into sc-dev am: 23cf59bfd5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14793490

Change-Id: I8cc82526aeadd3489144faa798f65e5f4ec74f39
2021-06-03 07:21:35 +00:00
Wei Sheng Shih e909a01164 Merge "Read the starting surface icon size from framework" into sc-dev am: 630efccd7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14609921

Change-Id: I7e9b8813fea7d2ed9cdef8c163f65875c9f026c1
2021-06-03 06:49:47 +00:00
Brian Isganitis aa6aa7bb69 Merge "Update preferences to Material Next styling" into sc-dev am: b177133e7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14740617

Change-Id: I591b173c7c0bfdb595daea64da2f5e9e7d2c23f1
2021-06-03 06:49:14 +00:00
shawnlin 2b006fb27b Detach the nav once the endTarget is determined as HOME
Bug: 189900722
Test: manual - swipe up to home from an app and observe the nav
Change-Id: I421de17fe4d8413deaf9ebd63166a6d2d00d096e
2021-06-03 13:06:42 +08:00
Jon Spivack b7cecf8a90 Merge "TaskOverlayFactoryGo: Keep persistent instance of AssistContentRequester" into sc-dev 2021-06-03 02:20:26 +00:00
Weilun Du 971d7fddcc Merge "Revert "Update preferences to Material Next styling"" into sc-dev 2021-06-03 00:04:49 +00:00
Jon Spivack 1bd7ccd90b TaskOverlayFactoryGo: Keep persistent instance of AssistContentRequester
Holding a reference to AssistContentRequester prevents it from being deleted by the garbage collector while it is still in use.

Bug: 189985872
Test: Manual (Pixel 3A)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I204aab907175a171c496c3bd146a8b23d2bbcf16
2021-06-02 16:40:09 -07:00
zakcohen da08cb2639 RecentsView - reduce work in color tint animator
Don't allocate animators when there is no animation to do. The work was
not required.

Bug: 189492167
Test: Local build, run and trace analysis
Change-Id: I111768b055ed636aa92d5d9d6b799f316a568380
2021-06-02 15:46:46 -07:00
Weilun Du 19d623d921 Revert "Update preferences to Material Next styling"
Revert "Add dependency for settings activity collapsing toolbar"

Revert submission 14740617-collapse3

Reason for revert: Build breakage
Reverted Changes:
I5ef658979:Add dependency for settings activity collapsing to...
I0ca55eecb:Update preferences to Material Next styling

Bug: 189919452
Change-Id: I4aa0bfc473334266a951d84064b4e8e406fff0a4
2021-06-02 22:04:44 +00:00
vadimt 09f1d8f9b7 Postponing CUJ_QUICK_SWITCH and CUJ_APP_CLOSE_TO_HOME
Now starting at the first drawn frame.

Test: perfetto
Bug: 188645726
Change-Id: I035f225f5afe64cf6eafa9ba40cffffce0a9d8cc
2021-06-02 14:09:08 -07:00
TreeHugger Robot 8c46bba98e Merge "AssistContentRequester move binder call to background thread." into sc-dev 2021-06-02 20:31:53 +00:00
Alina Zaidi 8796707172 Update scrim in widget pickers.
Also adjust padding in pin widget bottom sheet.

Test: Tested manually
Bug: 189802334
Change-Id: Ic25547ab1519139afdbf07aaefeb9168cf3501ff
2021-06-02 20:39:28 +01:00
zakcohen 243fbd3e5d AssistContentRequester move binder call to background thread.
The call into system server is synchronous, so make the call off the main
thread to avoid jank.

Bug: 189251291
Test: Local with flag enabled
Change-Id: I1787a0ad68488755bf19e813ecfe9fc079cfaed8
2021-06-02 10:33:31 -07:00
Pat Manning 49cb49b1f5 End drag touch event when crossing task drag threshold, and only when task is going up (drag to dismiss)
Test: manual
Fix: 188618115
Bug: 188618115
Change-Id: I51d157e224eaeee34ed131e4945bb92d6baf18cd
2021-06-02 16:28:25 +00:00
Pat Manning 67094bfdfb Prevent clearing home between display size changes.
Split display support was previously based on the sizes of supported device profiles. If a device supporting split display increased display size too much, it could trigger a grid migration (due to number of hotseat icons displayed vs in the DB changing as it was no longer seen as split display). The migration would not run however, as the grid had not actually changed, but would still have cleard the DB in preparation of the migration.

By counting the number of supported profiles instead, we can estimate the number of screens invariant of display size changes and avoid undesired grid migrations.

Test: manual
Fix: 187689871
Bug: 187689871
Change-Id: If740c501cab0e80ef6144356ec5618ee30134ed7
2021-06-02 16:18:55 +00:00
TreeHugger Robot 23cf59bfd5 Merge "Remove elevation from the full widgets picker container" into sc-dev 2021-06-02 13:57:45 +00:00
Wei Sheng Shih 630efccd7a Merge "Read the starting surface icon size from framework" into sc-dev 2021-06-02 10:00:22 +00:00
TreeHugger Robot 161027dc3e Merge "Initial commit of rotation contextual button." into sc-v2-dev 2021-06-02 02:05:40 +00:00
Brian Isganitis b177133e7b Merge "Update preferences to Material Next styling" into sc-dev 2021-06-02 01:20:58 +00:00
Lucas Dupin c53c5d8599 Merge "Set blur on effect layer during app launch" into sc-dev am: ee4d67c52d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14750658

Change-Id: Ibc67ff5638774294801974e4fe3c6357bf4ee22c
2021-06-02 00:38:36 +00:00
Lucas Dupin ee4d67c52d Merge "Set blur on effect layer during app launch" into sc-dev 2021-06-02 00:32:52 +00:00
TreeHugger Robot 8553d908c2 Merge "Delaying initializing "is launcher3" flag" into sc-dev am: 3941bc65e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14793019

Change-Id: Icccec1b00b5ae2594963dc04f6e67114ff1343b9
2021-06-02 00:15:28 +00:00
TreeHugger Robot 3941bc65e3 Merge "Delaying initializing "is launcher3" flag" into sc-dev 2021-06-02 00:11:47 +00:00
TreeHugger Robot cabb9096f3 Merge "Adjust task menu text size and colors" into sc-dev am: 137323c299
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14792892

Change-Id: Iec85e73cef73116f829d09d28bd06cab1cb2791d
2021-06-02 00:03:20 +00:00
TreeHugger Robot 137323c299 Merge "Adjust task menu text size and colors" into sc-dev 2021-06-01 23:50:40 +00:00
Brian Isganitis 9b8ab05a17 Update preferences to Material Next styling
Styles are forked from SettingsLib to avoid using any private APIs.

Test: Settings root, all apps, and about have new style on S
Bug: 187732263
Fix: 188254205, 188012913
Change-Id: I0ca55eecbc82cfa5d0b8707beb4bb7c82b2aa2b1
2021-06-01 19:44:19 -04:00
TreeHugger Robot da91a85359 Merge "Revert "Add haptic feedback to Launcher recent apps scrolling"" into sc-dev am: f5af5ce11f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14793398

Change-Id: Ic5a7e1fc9f5ac07f84b10496b1f3ece2bf8e8b8f
2021-06-01 23:41:10 +00:00
Tony Wickham 7f1f42ffb0 Merge "Fix duplicate depth animations when swiping from overview to home" into sc-dev am: 3cc2f46ca8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14792890

Change-Id: Ie5ef2aff3414a85e0cd855e0bda04610f5c74c30
2021-06-01 23:41:00 +00:00