Commit Graph

24447 Commits

Author SHA1 Message Date
Tony Wickham 5af9c3537d Allow swipe up to go home from overivew during task dismiss animation
Test: go to overview, dismiss a task, swipe up to go home during the
transition (easier to try with animation duraation scaled up)

Bug: 144170434
Change-Id: I28b846b43260179aeac877351a7069743f66f3ea
2020-08-19 18:34:13 -07:00
Sunny Goyal 104c9d1206 Using persisted item storage for install queue.
Shared prefs are loaded during startup and should avoid large objects

Change-Id: Ibb5c8307dbccb9414b42454825e6c3c2a972efa6
2020-08-19 17:38:58 -07:00
Sunny Goyal 63d327442c Disabling notification dots for Launcher3Go
Bug: 164457095
Change-Id: If751719a698785957d37b4656a0132d2b56b64f9
2020-08-19 17:04:38 -07:00
Pinyao Ting 96186aff87 Minimal Phone Mode (part-3)
Introduces a separate database for minimal device mode.

When minimal device mode is enabled/disabled:
1. WellbeingModel receives onChange event from ContentObserver
2. WellbeingModel called DWB's ContentProvider for latest state in
minimal device mode
3. Based on the state, WellbeingModel calls LauncherProvider to put
launcher into normal/minimal mode.
4. When going from normal -> minimal, Launcher switches to a different
database, namely minimal.db, then proceed to database initialization.
5. If the database hasn't been initialized yet, Launcher will call
ContentResolver#openInputStream with following uri:
content://com.google.android.apps.wellbeing.api/launcher_layout
to get the default layout xml.
6. The default layout is then saved in database, and the database is
considered initialized and doesn't need to go through step 5 again in
the future.
7. In case of minimal -> normal, Launcher switches back to its original
database (e.g. launcher.db if the grid size is 5x5), then reload launcher.

Bug: 161462256
Change-Id: I6bafa66440da23281f63454b698ea56b15960022
2020-08-19 14:58:20 -07:00
Tracy Zhou c5eedfb387 Merge "[Live Tile] Tapping home in Overview does not take user back to app" into ub-launcher3-master 2020-08-19 21:55:26 +00:00
Samuel Fufa dc4545ec29 Merge "Introduce support for play results in launcher" into ub-launcher3-master 2020-08-19 16:44:29 +00:00
Hyunyoung Song b9f9d69f67 Hide IME when scrolling happens on all apps screen/scroller
Bug: 161594550

TL;DR;;
- draging an item closes the IME
- clearing a searchbox to empty string has no effect on IME

Change-Id: Ic3a91d1b22434dcb78347dd8b12b5ceab14eb928
2020-08-19 01:20:06 -07:00
TreeHugger Robot a92c26b161 Merge "Update worksace page indicator during HINT_STATE transition" into ub-launcher3-master 2020-08-18 23:35:09 +00:00
Tony Wickham 1fbab3ad2c Update worksace page indicator during HINT_STATE transition
Test: Scroll to workspace page 2, then swipe up from the nav bar;
ensure that the page indicator fades in and scrolls to page 1

Change-Id: Ie0157c8e67b94509d3817f7e160d26f505185bbb
2020-08-18 15:12:56 -07:00
TreeHugger Robot 217dbfea01 Merge "Removing static state management from the install shortcut queue" into ub-launcher3-master 2020-08-18 22:00:23 +00:00
Samuel Fufa 114de69c98 Introduce support for play results in launcher
Introduces PluginSearchPipeline class, a plugin listener for AllAppsSearchPlugin. Coverts from List<Bundle> results from callback to AdapterItems to be rendered in SearchController.
- Moves AdapterItem to AllAppsGridAdapter

Bug: 164699827
Test: Manual
Change-Id: I20ec147e6b3f4707cf69d62b4b4ac70a90196345
2020-08-18 11:34:09 -07:00
Tracy Zhou f9abe7bcbd Update rect in LiveTileOverlay via copying
Probably a recent change updates the rect when reaching overview, which wasn't happening before. Regardless, we shouldn't have copied the rect by reference since the referenced copy can be changed.

Fixes: 165143463
Test: manual
Change-Id: I9315a20226f0a4b3440ce5ee6cc1f4ed1ddca487
2020-08-17 22:27:55 -07:00
Sunny Goyal 0fc3d1275a Moving hotseat predictions to ModelDelegate
Bug: 160748731

Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-17 08:43:07 -07:00
Tracy Zhou 66f3ffe39f [Live Tile] Tapping home in Overview does not take user back to app
Fixes: 162340084
Test: Manual
Change-Id: I8e2caa4ec0d3203d70d35fc409e8053cae51e21e
2020-08-15 00:53:02 -07:00
Tony Wickham 532b962a03 resolve merge conflicts of 107fe60f6e to ub-launcher3-master
Change-Id: I9a1c52e66edd627fd54cc3cb423fa28a6175f8ac
2020-08-15 00:20:44 +00:00
TreeHugger Robot 87be28a67b Merge "Remove ENABLE_OVERVIEW_ACTIONS flag, defaulting to true" into ub-launcher3-master 2020-08-14 23:47:44 +00:00
TreeHugger Robot 4fedc4e583 [automerger skipped] Merge "Track OverviewToHomeAnim with StateManager" into ub-launcher3-rvc-qpr-dev am: 6c1a88f172 -s ours
am skip reason: Change-Id I5348565b9e705d8ffba39818dde9efe82b16bb7a with SHA-1 4fb5f74bb4 is in history

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

Change-Id: I2a164ac97082a33bd8e859d6fb3f40d338996304
2020-08-14 23:00:09 +00:00
Tony Wickham d844fe758c Remove ENABLE_OVERVIEW_ACTIONS flag, defaulting to true
We no longer support the "peeking" model where the shelf would
peek on motion pause from an app and overview would peek on motion
pause from home. Thus, removed/inlined the following:
- FlingAndHoldTouchController (merged into its sole subclass
  NoButtonNavbarToOverviewTouchController)
- ShelfPeekAnim
- OverviewPeekState

Change-Id: I066a3ad2636fde4786089c922b896bf1e03361fd
2020-08-14 15:58:29 -07:00
Tony Wickham 107fe60f6e Ensure we clearState() when going to Overview from home
We need to do this before potentially starting another
interaction during the animation, or we could end up in
an inconsistent state.

Fixes: 160759508
Change-Id: Ia28dceddcc258679fc0b968f5a83fae5ef3f5acb
2020-08-14 22:49:18 +00:00
TreeHugger Robot 6c1a88f172 Merge "Track OverviewToHomeAnim with StateManager" into ub-launcher3-rvc-qpr-dev 2020-08-14 22:45:17 +00:00
Tony Wickham 9dfcc316c1 Track OverviewToHomeAnim with StateManager
This way we mark the the current state as NORMAL at the start of
the animation, and cancel it as part of other state transitions.
This allows us to interact with launcher (e.g. to go to all apps
or pull down the notification shade) during the animation.

Also use OverviewToHomeAnim from RecentsView#startHome() to
ensure the animation is consistent, e.g. doesn't fade out
RecentsView, scrolls to page 1, etc.

Bug: 144170434
Change-Id: I5348565b9e705d8ffba39818dde9efe82b16bb7a
Merged-In: I5348565b9e705d8ffba39818dde9efe82b16bb7a
2020-08-14 22:30:33 +00:00
Tony Wickham 4fb5f74bb4 Track OverviewToHomeAnim with StateManager
This way we mark the the current state as NORMAL at the start of
the animation, and cancel it as part of other state transitions.
This allows us to interact with launcher (e.g. to go to all apps
or pull down the notification shade) during the animation.

Also use OverviewToHomeAnim from RecentsView#startHome() to
ensure the animation is consistent, e.g. doesn't fade out
RecentsView, scrolls to page 1, etc.

Bug: 144170434
Change-Id: I5348565b9e705d8ffba39818dde9efe82b16bb7a
2020-08-14 14:38:24 -07:00
Hyunyoung Song 1ae2937f75 Merge "Hookup existing AllAppsSearchPlugin interface to SearchBarController Bug: 161801331" into ub-launcher3-master 2020-08-14 19:34:50 +00:00
Sunny Goyal 5fb83a47f2 Removing icon recents version
Change-Id: Ibdc88715e38590cedf8a7b5174061bb2c6ef9533
2020-08-14 10:49:19 -07:00
Hyunyoung Song 8cac927bdb Hookup existing AllAppsSearchPlugin interface to SearchBarController
Bug: 161801331

Change-Id: Ied575f78ad2139c6818ae5a13467b7399b9ab17a
2020-08-14 03:54:04 -07:00
Tracy Zhou 8ad575e1e6 Handle overview actions in Live Tile mode
- Switch to screenshot and finish recents animation when an overview action is selected

Fixes: 162564471
Test: Manual
Change-Id: I3db20619435d079bb39ce4cb37b46ea775416336
2020-08-13 15:23:18 -07:00
Tracy Zhou 9a472fbd7d Merge "[Live Tile] Place the target app back above Launcher when swipe up end target is home" into ub-launcher3-master 2020-08-13 21:29:28 +00:00
Andy Wickham a9f9551732 Merge "Refactors LauncherPreviewRenderer to better support subclassing." into ub-launcher3-master 2020-08-13 19:22:12 +00:00
TreeHugger Robot 895ece297d Merge "[Overview Actions] Reset the modal task view when rotate from select mode." into ub-launcher3-rvc-qpr-dev am: 20983ae1f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12366024

Change-Id: I3fec240a659c5a1c80bf4f78aca1af6ace270e27
2020-08-13 18:57:49 +00:00
TreeHugger Robot 20983ae1f8 Merge "[Overview Actions] Reset the modal task view when rotate from select mode." into ub-launcher3-rvc-qpr-dev 2020-08-13 18:42:46 +00:00
TreeHugger Robot ba9415162c Merge "Use system VelocityTracker instead of forking least squares algorithm" into ub-launcher3-master 2020-08-13 18:17:41 +00:00
TreeHugger Robot 58a1689cef Merge "Overview Actions - enable proactive actions flag." into ub-launcher3-rvc-qpr-dev am: 2ddbe127fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12286410

Change-Id: I54898c6a1a47d271c8d18c17d24a5acb6e67fd1e
2020-08-13 18:05:50 +00:00
Tracy Zhou 81c0cac457 [Live Tile] Place the target app back above Launcher when swipe up end target is home
Test: manual
Bug: 160361464
Change-Id: Ic2b332774fe3f25f36f0bfd2b5e6cf66fb1d09dd
2020-08-13 11:01:15 -07:00
TreeHugger Robot 2ddbe127fb Merge "Overview Actions - enable proactive actions flag." into ub-launcher3-rvc-qpr-dev 2020-08-13 17:50:30 +00:00
Tony Wickham 59d04e6ea6 Use system VelocityTracker instead of forking least squares algorithm
Change-Id: I8e03cdd0942b9037054cd1955bdb6809c89f3ea2
2020-08-13 10:41:49 -07:00
Andy Wickham a310e9c035 Refactors LauncherPreviewRenderer to better support subclassing.
Basically this removes the inner class MainThreadRenderer, which
was only created and used for its populate() method in the parent's
getRenderedView() method. All methods and members of that subclass
are merged into the parent LauncherPreviewRenderer class, and
getRenderedView() simply inlines the previous populate() code.

Other smaller changes:
 - Extracted out shouldShowQsb() and shouldShowRealLauncherPreview()
 - Disables search view and its children to prevent interaction

Change-Id: I7d0cce73efbe022c16661a0ad66eefe5cb285641
2020-08-12 20:02:27 -07:00
TreeHugger Robot 9529b95e06 Merge "Store mHistoricTimes as longs intead of floats" into ub-launcher3-rvc-qpr-dev am: f35053ad58
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12365858

Change-Id: I3c21d9d47a525e9c975c6acf38c99a2f1668359c
2020-08-13 02:25:50 +00:00
TreeHugger Robot f35053ad58 Merge "Store mHistoricTimes as longs intead of floats" into ub-launcher3-rvc-qpr-dev 2020-08-13 02:10:20 +00:00
TreeHugger Robot 72385839ed Merge "TaskOverlayFactory - remove static factory." into ub-launcher3-rvc-qpr-dev am: 30fe240f99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12353636

Change-Id: Ic165b6184f4f36b5956493d3880a9d93ad27a0d6
2020-08-13 01:01:07 +00:00
TreeHugger Robot 30fe240f99 Merge "TaskOverlayFactory - remove static factory." into ub-launcher3-rvc-qpr-dev 2020-08-13 00:47:34 +00:00
Becky Qiu ba6fec3eae [Overview Actions] Reset the modal task view when rotate from select mode.
Test: local
Bug: 161901771
Change-Id: I103e59ad68874db7fcb39556764d315983ac047c
2020-08-12 17:17:59 -07:00
Zak Cohen 635c08095a Merge "Overscroll plugin - give the plugin its own factory." into ub-launcher3-rvc-qpr-dev am: cbe1fc063d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12353635

Change-Id: Ia471594443d1b744c5c34f0c9c45e7191bbf7938
2020-08-13 00:12:20 +00:00
Tony Wickham a145670969 Store mHistoricTimes as longs intead of floats
The loss of precision was causing us to miscalculate the age of
events, and thus not detecting any pause due to denominator = 0.

Test: have a device that hasn't been rebooted for a certain
amount of time such that SystemClock#uptimeMillis can't be
accurately converted to a float, then try to swipe up and hold

Fixes: 160568387
Change-Id: Idef112187f34a18feea7e6a0b77258626f9d0ed4
2020-08-12 17:02:53 -07:00
Zak Cohen cbe1fc063d Merge "Overscroll plugin - give the plugin its own factory." into ub-launcher3-rvc-qpr-dev 2020-08-12 23:58:38 +00:00
Becky Qiu 93caa93102 [automerger skipped] [Overview Actions] Set launcher state to Overview when rotate in recents. am: 9367f98348 -s ours
am skip reason: Change-Id I73f498151d7cc6a9db9d352549124c9d550ae6f2 with SHA-1 cb956ff4f5 is in history

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

Change-Id: I02f43e3ee9a7f0f1730b673be220055d72a07d81
2020-08-12 23:43:10 +00:00
TreeHugger Robot 74f218530e Merge "Wrapping display properties in a wrapper class" into ub-launcher3-master 2020-08-12 23:36:27 +00:00
Zak Cohen 1e414d5005 Overview Actions - enable proactive actions flag.
Bug: 162623012
Test: local
Change-Id: I343ae83601ebdab4dacc9f4611b069f87b5542eb
2020-08-12 16:32:45 -07:00
Zak Cohen cf82754384 TaskOverlayFactory - remove static factory.
Make the overlay factory a member of the recents view.
Before the factory was static. The factory has references to activity
objects so was causing leaks.

Bug: 162012217
Tested: local, factory still works
Change-Id: I2283134f3008b630ba2056f07e65ac042957cdbd
2020-08-12 16:32:45 -07:00
Sunny Goyal 60e68c91e9 Removing static state management from the install shortcut queue
Change-Id: I0b74a843b2081ee314e0840d5ea8ab8ddabde32b
2020-08-12 14:37:15 -07:00
Sunny Goyal fd58da6a75 Wrapping display properties in a wrapper class
This would allow us to support gestures on multiple-displays

Change-Id: I8f426bbdf04520f4189cadce2bde6aab4933c8d9
2020-08-12 13:43:56 -07:00