Commit Graph

10426 Commits

Author SHA1 Message Date
Bill Yi 85e48c8295 Merge RQ2A.210405.006 to stage-aosp-master - DO NOT MERGE
Merged-In: I31f76112edeb770bc3b9c017f6205392dbe3f5a8
Change-Id: Ic4c3cfbde42e2318988c073662c95863bb13f27d
2021-04-12 09:28:12 -07:00
Tracy Zhou 1283f546de Fix missing grid for devices that upgrade from R
Fixes: 178435615
Test: TODO
Change-Id: I9894b88485daf5b641b4674a5abff05e0f53138b
(cherry picked from commit a62e49b365)
2021-02-09 20:19:29 +00:00
Sunny Goyal 05d2ab3f68 [DO NOT MERGE] Keeping Launcher in overview UI if activity is restarting am: 980c089d2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13192821

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id2a3c6c21c3c00464fa0384d5f78943cbbbe8e97
2020-12-10 03:35:50 +00:00
Sunny Goyal 980c089d2f [DO NOT MERGE] Keeping Launcher in overview UI if activity is restarting
due to UI mode changes

Test: Verified Launcher behavior locally
Bug: 148988542
Change-Id: Id83e5e0892666af1420e8f8c711b83f1ea355188
(cherry picked from commit 6c0c61acd8)
2020-12-09 23:40:46 +00:00
Samuel Fufa 3a1286108c [DO NOT MERGE] Encode launch location for hotseat items am: ec5e095430
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13112292

Change-Id: Ib1204c9794548cc1c1ba45957686b14cc755565c
2020-11-30 23:29:25 +00:00
Samuel Fufa ec5e095430 [DO NOT MERGE] Encode launch location for hotseat items
Bug: 162003157
Test: Manual
Change-Id: I18f8f3f431dbabb3d22898d27d70c8730ad0150f
(cherry picked from commit 9b947993be)
2020-11-23 19:39:00 +00:00
Winson Chung 4bfad584c5 DO NOT MERGE Revert "Handle uiMode changes" am: 4b4341d3a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12932788

Change-Id: I090572abd8046a30ed8353cac0e5730f90c74b2e
2020-11-10 22:35:52 +00:00
Winson Chung a18b9f3e42 Merge changes from topic "revert_ui_mode_changes" into rvc-qpr-dev
* changes:
  DO NOT MERGE Revert "Handle uiMode changes"
  DO NOT MERGE Revert "Defer recreation until resumed"
2020-11-10 22:17:52 +00:00
Hyunyoung Song 08e8c6b189 [DO NOT MERGE] Add WW log for noti shade swipe down from home. am: 64340cca97
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12993888

Change-Id: Ie326c286c72998b05ac438d5ea76df31fbc368a6
2020-11-05 20:15:42 +00:00
Hyunyoung Song 64340cca97 [DO NOT MERGE] Add WW log for noti shade swipe down from home.
Bug: 171973663
Change-Id: I1e8ff20c62d4f91a05cb1cfc0337e351f2bc8885
(cherry picked from commit a87f99a35a)
2020-11-05 08:55:40 +00:00
Winson Chung 272f4541f9 DO NOT MERGE Revert "Defer recreation until resumed"
Bug: 171707437
Test: Repro steps in bug

This reverts commit 3f8d868110.

Change-Id: I909ab701c674fe975982a7de06dc9e89dcd03aea
2020-10-28 19:17:51 -07:00
Hyunyoung Song 7bd6d79e1f [DO NOT MERGE] Add component name to launcher home and overview gestures am: 743fe26951
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12745956

Change-Id: I11603a2880e96d6af8dedc0a4177d2bfdba90a8f
2020-10-08 10:24:18 +00:00
Hyunyoung Song 743fe26951 [DO NOT MERGE] Add component name to launcher home and overview gestures
Bug: 168805198

Change-Id: Idcc7d00b0f23c2a0f9be6f0ab2600278e18cc1a3
(cherry picked from commit e6477328aa)
2020-10-01 16:56:35 +00:00
Tony Wickham 3676989b75 [DO NOT MERGE] Remove CurveProperties#pageParentScale am: a5dae88b71
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12687026

Change-Id: Ic5c2cbbe95d374ea1b3d2824389b8edc457b22d9
2020-09-24 20:26:47 +00:00
Tony Wickham a5dae88b71 [DO NOT MERGE] Remove CurveProperties#pageParentScale
Test: Set TaskView#EDGE_SCALE_DOWN_FACTOR = 0.2f, then swipe
down on the centermost TaskView; ensure it fills the screen.
Alternatively, touch and hold the nav bar and ensure there is
no jump in scale on the app window.

Fixes: 169259407
Change-Id: Ib3cfba6ebafbcb90de9c6b1ab79f53605d995321
(cherry picked from commit 82ff64530e)
2020-09-24 17:31:31 +00:00
Treehugger Robot 44150f8da4 Merge "optimization of searching apps in Chinese" am: a0357329e0 am: f655c6e433 am: b634086d6c am: 27ae39420e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1425241

Change-Id: Ic0b8025774c0c62e039ea9edd6f8f0e545107488
2020-09-17 14:12:18 +00:00
Treehugger Robot 27ae39420e Merge "optimization of searching apps in Chinese" am: a0357329e0 am: f655c6e433 am: b634086d6c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1425241

Change-Id: I6313842f62b050eb70b61a452bd5c0409757ec80
2020-09-17 09:18:46 +00:00
Treehugger Robot b634086d6c Merge "optimization of searching apps in Chinese" am: a0357329e0 am: f655c6e433
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1425241

Change-Id: I0631b58f00dc0c39222e538a31e570206cf546f3
2020-09-17 07:09:42 +00:00
zhaoguomanong 97cc6df21d optimization of searching apps in Chinese
Signed-off-by: zhaoguomanong <zhaoguomanong@gmail.com>
Change-Id: Id322eb8b5249d6163da8a5d3476a6cf9500ad6bb
2020-09-10 22:58:15 -04:00
Tracy Zhou e209b03a7f Only load the first page in grid preview
Bug: 160662425
Test: manual (verified correctness)
Merged-In: I9dc3b7d7b84924ffb588470d4b6b20431a62b6cd
Change-Id: I9dc3b7d7b84924ffb588470d4b6b20431a62b6cd
(cherry picked from commit 312cf43863)
2020-09-10 23:53:21 +00:00
TreeHugger Robot 3cdba9d5b5 Merge "Refrain from overwriting shortcut icon with default icon" into rvc-qpr-dev 2020-09-08 22:52:36 +00:00
Pinyao Ting 52dede83f1 Refrain from overwriting shortcut icon with default icon
Invert the condition check in IconCache so that, if a shortcut is
already using a non-default icon, do not replace it with default icon
again.

Bug: 162783875
Test: add weather shortcut, backup, restore, verify its icon is not
replaced by default droid icon

Change-Id: Idaf4ce4afa84d21f7192a2f4ce41a6f8daa8d3f2
(cherry picked from commit 61e8ae1d9d)
2020-09-03 23:37:55 +00:00
Xin Li 05bfabfc02 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I88f54d5cf388aeacbf1da48e3e5f1e89f37ba836
Change-Id: I2e4012ae6bf1cf4e5e5cb76790cd2451e313febc
2020-08-28 13:11:13 -07:00
Hyunyoung Song c6890f8869 Fix Robolectric test breakage am: 77e29775a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12442805

Change-Id: Ib8711dce31cc2bbb54776939a402440521b09c5f
2020-08-25 18:19:20 +00:00
Hyunyoung Song 77e29775a9 Fix Robolectric test breakage
Bug: 166204002

Change-Id: I9c54c6230756dbb5fe8bdcb37ba51165d20bb815
2020-08-25 00:53:48 -07:00
TreeHugger Robot 93f595fd5a Merge "Set new scrimMultiplier instead of scrimProgress for overview -> home" into ub-launcher3-rvc-qpr-dev 2020-08-20 02:59:26 +00:00
Tony Wickham 375c602fc0 Set new scrimMultiplier instead of scrimProgress for overview -> home
Animating this new property allows us to adjust the scrim without
competing with other state animations that could be setting the
scrim progress. Also reset scrimMultipler = 1 for state transitions.

Test: Swipe from home to overview, then during that transition swipe
from overview to home; when the former transition ends while the
second is still in progress, ensure scrim value doesn't jump

Bug: 144170434
Change-Id: I44b57ced1c6902e558fe1818bcbf11ceb4ff2f6f
Merged-In: I44b57ced1c6902e558fe1818bcbf11ceb4ff2f6f
2020-08-20 02:49:30 +00: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
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
Zak Cohen 1e414d5005 Overview Actions - enable proactive actions flag.
Bug: 162623012
Test: local
Change-Id: I343ae83601ebdab4dacc9f4611b069f87b5542eb
2020-08-12 16:32:45 -07:00
Tony Wickham 03a4a0cd53 Update overview from home transitions
For both NoButtonNavbarToOverviewTouchController and
NavBarToHomeTouchController:
- Have consistent resistance applied such that RecentsView scales
  down and translates up slightly (but not as much as from an app)
- Have consistent animation to home if you fling to that state
  rather than stay in overview. This is handled by a new class,
  OverviewToHomeAnim, which consolidates logic from NBTHTC and
  overrides some interpolators such that RecentsView doesn't fade
  out or translate downwards during the animation (it just slides
  off the screen while the home animation plays).

Also make overview actions not clickable when alpha == 0, so that
you can tap the hotseat/qsb during the transition from home to
overview.

Bug: 144170434
Change-Id: Ic291f285ff2f63c477633c48d4fadb23cf70c28a
2020-08-10 13:15:23 -07:00
Becky Qiu 14e03d1c4d [Overview Actions] Add a logging event for tapping images in select mode.
Event IDs were generated by command line on my workstation by uieventscli.
Manually added to StatsLogManager.

Test: local
Bug: 161273376
Change-Id: Iee36c450ddb207f87653a8da2355c720369caa34
2020-08-07 15:07:04 -07:00
Tony Wickham ce8b2b5180 Add translation component to swipe up resistance
Now recents view follows your finger all the way to the top of the
screen. Specifically, your finger tracks the bottom of the window
until resistance starts (when RecentsView is at 75% scale), then
we add translation to compensate for the slower rate of scaling
down, such that your finger slips to the top of the window by the
time it reaches the top of the screen.

Also reset this translation back to 0 in the state handlers.

Bug: 149934536
Fixes: 158701272
Change-Id: Iaee58da758d422f0173c29d002f5c451ce0c1809
2020-08-07 12:32:50 -07:00
TreeHugger Robot 3f20e33af6 Merge "Fix adjacent page offset in landscape orientation" into ub-launcher3-rvc-qpr-dev 2020-08-06 23:52:04 +00:00
Tony Wickham 3b9d5843c9 Fix adjacent page offset in landscape orientation
Before, the adjacent tasks were coming in from the top and bottom
of the screen rather than the sides.

Bug: 149934536
Change-Id: Id6e57dcbc1967d70869df06068d25717de116934
2020-08-06 15:04:51 -07:00
Raman Tenneti d0a660cf22 AOSP/Launcher3 - Update language to comply with Android's inclusive language guidance. DO NOT MERGE
Fixed check-style errors.

These files are AOSP specific files and they don't exist in the internal code.

See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: m and Launcher3Tests
$ find out -name "Launcher*.apk" -print -exec ls -l {} \;
  out/target/product/bonito/testcases/Launcher3Tests/arm64/Launcher3Tests.apk
  -rw-r----- 1 rtenneti primarygroup 947525 Aug  4 16:22 out/target/product/bonito/testcases/Launcher3Tests/arm64/Launcher3Tests.apk

  out/target/product/bonito/system_ext/priv-app/Launcher3QuickStep/Launcher3QuickStep.apk
  -rw-r----- 1 rtenneti primarygroup 9249956 Aug  4 16:20 out/target/product/bonito/system_ext/priv-app/Launcher3QuickStep/Launcher3QuickStep.apk

Change-Id: I428eaa50ada96567a3b583eca1aa8ee2d8b85e6b
2020-08-05 17:17:35 +00:00
Winson Chung 3f8d868110 Defer recreation until resumed
- Temporarily work around issue with activity recreation while started
  but not resumed by deferring recreating the activity on theme
  change until after launcher has resumed.

Bug: 162812884
Test: Switch dark mode via QuickSettings, Settings
Test: Change system theme
Change-Id: Ifbc0d538907a30d6b23176cd67353a81b6f8c617
2020-08-04 14:03:42 -07:00
TreeHugger Robot ffc06198ff Merge "Rewrite long swipe resistance ("pullback") logic" into ub-launcher3-rvc-qpr-dev 2020-08-03 22:11:30 +00:00
Tony Wickham 354a436f4e Rewrite long swipe resistance ("pullback") logic
- Rename "pullback" to "resistance" to reduce confusion.
- Remove mDragLengthFactorStartPullback & mDragLengthFactorMaxPullback
- Add AnimatorControllerWithResistance, which has 2 controllers, one
  for the normal shift to overview, then one to apply the resistance
  when swiping beyond that.
- Don't hack animator interpolators/progress; insteaad, allow progress
  to go > 1 (which will run the separate resistance animator).
- Don't start launcher controller separately from window controller;
  instead, both are controlled by mCurrentShift in updateFinalShift().
- The resistance animation logic is shared by both the active window
  and launcher (RecentsView).

Bug: 149934536
Change-Id: Ib0f9da18e10cc9ddf1a2f82ed767f237c89d3a41
Merged-In: Ib0f9da18e10cc9ddf1a2f82ed767f237c89d3a41
2020-08-03 21:01:46 +00:00
Hyunyoung Song 9b98d13022 Disable auto correct/suggest on folder edit text
Bug: 160075575
Bug: 152541144

TL;DR;; displayCompletions still work

Change-Id: I0a7cd06d25ae3976371be0707a2783702b92e8cc
(cherry picked from commit 37bda2bcc9)
2020-08-03 08:27:18 +00:00
TreeHugger Robot bf84725855 Merge "Creating UI tests for overview action buttons." into ub-launcher3-rvc-qpr-dev 2020-07-31 21:03:54 +00:00
Sreyas bf103f16b1 Creating UI tests for overview action buttons.
Change-Id: Ie6298064a068dc978ca33fb64e1856c3ba2a8cb1
2020-07-31 13:20:08 -07:00
TreeHugger Robot d354443535 Merge "Fix adjacent task offset distance" into ub-launcher3-rvc-qpr-dev 2020-07-29 22:26:31 +00:00
Tony Wickham 16eb9226c5 Fix adjacent task offset distance
Instead of calculating an overall distance for tasks to translate
based on RecentsView width, calculate the distance for the tasks
to the left and right of the midpoint based on how far the first
adjacent tasks in those directions are from being offscreen.

Changes made to make "distance to offscreen" calculations possible:
- Update TaskView curve scale to reach final scale as soon as it is
  completely offscreen. Before, it would reach its final scale just
  shy of that point (calculations were off).
- As we update RecentsView scale, calculate how much the new scale
  will push out tasks that are just offscreen.
- With both above, we can calculate the scale and position of a
  TaskView such that it is just offscreen, and interpolate
  between its current position and that position.

Tests:
- Task comes in immediately when quick switching from home, and
  doesn't shift as you swipe directly upwards.
- When swiping far up from an app, tasks come in from all the way
  offscreen, and cover distance appropriately (e.g. if you're
  scrolled a bit to the right when you pause, the left adjacent
  app will move faster to cover the farther distance).
- Task modalness: entering Select mode now animates adjacent tasks
  at the same rate as the scaling up, because they move only the
  distance needed to get offscreen (before they moved way too far
  and thus seemed to be much faster than the rest of the animation).

Bug: 149934536
Change-Id: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
Merged-In: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
2020-07-29 22:17:33 +00:00
TreeHugger Robot a2f9ea5233 Merge "Revert "Fix bug where double swipe gets us stuck in Hint state while in Overview."" into ub-launcher3-rvc-qpr-dev 2020-07-29 19:55:36 +00:00
Jonathan Miranda f496ea4634 Revert "Fix bug where double swipe gets us stuck in Hint state while in Overview."
This reverts commit a8c08584a7.

Reason for revert: "caused a regression with quick switch from home: if you start the gesture then swipe back to the left, it ends up launching the task anyway"

Change-Id: I8e12e2de46b6fc6a3faeb0336762da08080c61d6
2020-07-29 19:03:29 +00:00
Samuel Fufa 0cfcdc2170 Merge "Adding tracing for work profile removal" into ub-launcher3-rvc-qpr-dev 2020-07-28 17:52:21 +00:00
Samuel Fufa cfec6b5151 Adding tracing for work profile removal
Bug: 159671700
Change-Id: I6e1bcdfbf1bbaab989106ce2979575652a3fb404
2020-07-28 17:09:08 +00:00
thiruram b6d0607d8b Logs system navigation details part of launcher snapshot logging.
Bug: 157997545
Change-Id: I18e908dc62bb790c3a77e1aacd0236a7d84e8ce5
Merged-In: I18e908dc62bb790c3a77e1aacd0236a7d84e8ce5
2020-07-27 16:32:21 -07:00