Commit Graph

29457 Commits

Author SHA1 Message Date
Sunny Goyal 16e165defe 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
(cherry picked from commit ff4b142789)
2020-07-27 17:55:47 +00:00
TreeHugger Robot 8527620201 Merge "Fixing touches getting ignored just after swipe-up" into ub-launcher3-rvc-qpr-dev 2020-07-27 17:36:41 +00:00
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
TreeHugger Robot 5484fd3e7a Merge "Minimal Phone Mode (part-1)" into ub-launcher3-rvc-qpr-dev 2020-07-24 18:16:16 +00:00
TreeHugger Robot 6039c70261 Merge "Fixing oav text overlap." into ub-launcher3-rvc-qpr-dev 2020-07-23 22:26:16 +00:00
TreeHugger Robot 6e1861104c Merge "Handle uiMode changes" into ub-launcher3-rvc-qpr-dev 2020-07-23 21:17:35 +00:00
Winson Chung 0ad7b172e6 Handle uiMode changes
- Launcher already dedupes if there are no theme changes

Bug: 148988542
Test: adb shell cmd uimode car yes/no, adb shell cmd uimode night yes/no
Change-Id: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
Merged-In: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
2020-07-23 21:05:31 +00:00
TreeHugger Robot 9da3ccf611 Merge "Use TouchDelegate to listen for icon view taps on RecentsView" into ub-launcher3-rvc-qpr-dev 2020-07-23 20:55:55 +00:00
Vinit Nayak ccf92c6587 Use TouchDelegate to listen for icon view taps on RecentsView
Using a negative margin to move the icon view to stick out above
the task prevents that part sticking out from receiving touches.
They go directly through to RecentsView, which interprets it as a
touch to home.
Now we use a touch delegate that recents view passes touches to
before processing it directly.

Note we can't override should steal touches from children in
LauncherRecentsView because the icon view isn't actually seen
as a child of RecentsView if it's outside of the task view area.

Fixes: 159820339
Test: Touching anywhere on the icon works.
Scrolled to previous/next tasks and in different
rotations and verified tap registers correctly.

Change-Id: I4559c34b20079e06aac401e2c93ac36a74b653ea
2020-07-23 13:20:21 -07:00
TreeHugger Robot 1a32f951f7 Merge "Pass through touches in FolderIcon padding area" into ub-launcher3-rvc-qpr-dev 2020-07-23 18:47:26 +00:00
Samuel Fufa 3c3116826b Pass through touches in FolderIcon padding area
Pass touch events happening in padding of folder icon to workspace. BubbleTextView already does this.

Bug: 161014416
Test: Manual
Change-Id: Ibfa24adb2d84efbfab36f02a2240837f03858e43
2020-07-23 11:09:20 -07:00
Hyunyoung Song 36b568cbb1 Merge "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853" into rvc-qpr-dev am: aae7f2b638
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12190253

Change-Id: I5cd2a869a0d943d33c2fff554f8616dfacf7c8bc
2020-07-23 04:06:06 +00:00
Hyunyoung Song aae7f2b638 Merge "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853" into rvc-qpr-dev 2020-07-23 03:47:22 +00: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
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
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 3344b8ce3d Fixes missing field mappings from launcher_atom.ItemInfo to Statslog.
Bug: 161284668
Change-Id: I70b247e896bfcad5f6dbb6ce3ec5ed7aa57b8a61
2020-07-21 21:04:50 +00:00
Jonathan Miranda 20d3187d88 Merge "Fix folder crash where view is added when it already has a parent." into ub-launcher3-rvc-qpr-dev 2020-07-21 20:13:06 +00:00
Pinyao Ting b446d1069b Fix launcher crash after restore with some specific widgets. am: 8dae83ee9b am: 12ef632d00
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12196250

Change-Id: Id7c4f91b9f3972b3175feb5442a1309ba4503f4e
2020-07-21 19:23:37 +00:00
Pinyao Ting 1b31a72388 Fix launcher crash after restore with some specific widgets. am: 8dae83ee9b am: 5134643c00
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12196250

Change-Id: Id83fb3212b04b8fc7990f37dbd5caa161e31cba7
2020-07-21 19:23:14 +00:00
Pinyao Ting 12ef632d00 Fix launcher crash after restore with some specific widgets. am: 8dae83ee9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12196250

Change-Id: Ifa1fca7af87cc2d0169793281c05a96925c48fc5
2020-07-21 19:05:55 +00:00
Pinyao Ting 5134643c00 Fix launcher crash after restore with some specific widgets. am: 8dae83ee9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12196250

Change-Id: Id8d1b89b92f6d50614911adb90195140737ce924
2020-07-21 19:05:31 +00:00
Pinyao Ting 422015cb9f Minimal Phone Mode (part-1)
Include feature flag for minimal phone mode

Bug: 161462256
Test: manual
Change-Id: I4ddbe7fd2fd73b4cfaa27ab18c210f38133dd3c2
2020-07-21 11:45:36 -07: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
TreeHugger Robot 664020146f Merge "Fix launcher crash after restore with some specific widgets." into ub-launcher3-rvc-qpr-dev 2020-07-21 18:30:11 +00:00
Samuel Fufa 7dc81afc4d Merge "Fix hotseat file log name formatting" into ub-launcher3-rvc-qpr-dev 2020-07-21 16:22:57 +00: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
Pinyao Ting 8dae83ee9b Fix launcher crash after restore with some specific widgets.
The internal implementation of PendingAppWidgetHostView#getDefaultViews
uses the same view across updates which causes the exception in
AppWidgetHostView#applyContent when it tries to call addView() because
the view has already been added to its parent view in previous iteration.

Bug: 151901506
Test: manual
Change-Id: Ieccec814ac514e592d0d4f196b60ba89aec0d661
2020-07-21 00:57:17 +00:00
Pinyao Ting f1af0171b7 Fix launcher crash after restore with some specific widgets.
The internal implementation of PendingAppWidgetHostView#getDefaultViews
uses the same view across updates which causes the exception in
AppWidgetHostView#applyContent when it tries to call addView() because
the view has already been added to its parent view in previous iteration.

Bug: 151901506
Test: manual
Change-Id: Ieccec814ac514e592d0d4f196b60ba89aec0d661
2020-07-20 17:55:14 -07:00
Jon Miranda 447ea429cd Fix folder crash where view is added when it already has a parent.
The fix is to prevent re-arrangement if the views are already unbound.

This is caused when:
- Folder is open
- Item has deep shortcuts
- Long press on deep shortcut to create DragView that could land in the
  folder if the folder did not auto close. This is important because it
  starts a drag within the folder

The folder unbinds all views as part of the Folder close complete callback.
And then the folder exit alarm gets triggered (because we drag DragView
outside of the folder) which causes the folder items to get
rearranged and added back to the folder's CellLayout.

Bug: 161559911
Change-Id: I142589b2c541dc21c47a67c20a93e627732107ef
2020-07-20 16:54:17 -07:00
TreeHugger Robot a64362ee73 Merge "Create a new instance of rotation touch helper per device state" into ub-launcher3-rvc-qpr-dev 2020-07-20 23:19:26 +00:00
TreeHugger Robot f55ccf4350 Merge "Fix bug where realtimeReorder is called after views have been unbound." into ub-launcher3-rvc-qpr-dev 2020-07-20 23:01:30 +00:00
Jon Miranda 0f620500b0 Fix bug where realtimeReorder is called after views have been unbound.
Bug: 161498651
Change-Id: I89beaad9a91bfa1763454965bf95ba1a94d29902
2020-07-20 15:28:25 -07:00
Samuel Fufa 93802e2612 Merge "Allow multiple hotseat restorations in single session" into ub-launcher3-rvc-qpr-dev 2020-07-20 22:27:36 +00:00
TreeHugger Robot 6822ae9fae [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into ub-launcher3-rvc-dev am: 78d22259fe -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12195526

Change-Id: Id2840e90f68772eef8e126df22595059c7b73d7a
2020-07-20 22:06:03 +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
TreeHugger Robot 78d22259fe Merge "Import translations. DO NOT MERGE ANYWHERE" into ub-launcher3-rvc-dev 2020-07-20 21:56:52 +00:00
Bill Yi 008c2d17c8 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 25ed0dce25 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12195530

Change-Id: If7dfe29ab40a0cb420e8fe66245d72994295f132
2020-07-20 21:54:36 +00:00
TreeHugger Robot f7dc18b7bd Merge "Import translations. DO NOT MERGE ANYWHERE" into ub-launcher3-rvc-qpr-dev 2020-07-20 21:43:56 +00:00
TreeHugger Robot 612b16a26b Merge "Import translations. DO NOT MERGE ANYWHERE" into ub-launcher3-rvc-qpr-dev 2020-07-20 21:41:06 +00:00
Samuel Fufa bd1f4c6a76 Allow multiple hotseat restorations in single session
restoreBackup uses mBackupRestored to prevent multiple restorations happening at once. This change is required to reset the value of mBackupRestored if a new backup is created.

Bug: 160033826
Test: Manual
Change-Id: I33836b26cf3876955cc14dcc8ec06202f3fe7fac
2020-07-20 14:14:47 -07:00
Bill Yi 19496b916b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4c326e8cf15da316393c3be70f6b1c8dfc559a52
2020-07-20 14:03:37 -07:00
Bill Yi 25ed0dce25 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic9168efed903a1cc61b770bc32d754ca1858b3df
2020-07-20 14:02:54 -07:00
Bill Yi d5821326f8 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I344fea4e320a851f0d04a3308c9f7f2dca4c934e
2020-07-20 14:00:53 -07:00
Bill Yi a92c6bb531 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I2ac85ce81a99d87d613ed1490c591d90323889f2
2020-07-20 14:00:14 -07:00
Samuel Fufa 453475d568 Fix hotseat file log name formatting
Bug: 161001172
Test: Manual
Change-Id: Ia03eeb897003267ce608430c94b3b01876939234
2020-07-20 12:50:21 -07:00
Samuel Fufa e47896cb91 Invalidate stale BgDataModel when predictions are disabled
Launcher stores ItemInfos for cached predictions in list BgDataModel.cachedPredictedItems  on Launcher start (LoaderTask#run). The list reused if launcher has to rebind UI. Hence, the list should be cleared if launcher receives empty predictions.

Bug: 161245294
Test: Manual
Change-Id: I275655d5f52f6a6e5297473dd2f642728c1964a6
2020-07-20 12:41:07 -07:00
Jon Miranda a8c08584a7 Fix bug where double swipe gets us stuck in Hint state while in Overview.
With the second swipe, we never complete the swipe to Overview

NoButtonNavbarToOverviewTouchController#maybeSwipeInteractionToOverviewComplete
- mReachedOverview = true
- mDetector.isSettlingState = false

And then the second swipe starts the state transition to Hint but then
it never gets completed because:
1. The animation starts
2. Gets cancelled
3. Starts again
4. Finishes, but is not marked as success since the cancel in #2 was never
   set back to false

Bug: 160759508
Change-Id: I8c3972e6209c3d5a4a0bdd9f9b7683de18105d57
2020-07-20 10:29:29 -07:00
TreeHugger Robot f9db9d321d Merge "Notify TaskViews of updated orientation state" into ub-launcher3-rvc-qpr-dev am: dbca5a4190 am: 3857d2645f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12142279

Change-Id: I1085f9a8652a38c3daa0fb83b4de2d8d84ba4364
2020-07-18 00:19:58 +00:00