Commit Graph

11276 Commits

Author SHA1 Message Date
Kshitij Gupta
f9fd430d68 Lawnchair: Fix serveral imports, fix QuickstepCompat* compilation
- Note: Currently, there is no real Q compat. Current Q Compat is the
  new R Compat. Yikes.
2021-02-05 22:24:09 +05:30
Patryk Michalik
64f16600ea Merge pull request #3 from ‘intermediate-merging’
This resolves a part of the build errors.
2021-02-05 15:01:26 +01:00
narko
14a78161e2 Fixing imports 2021-02-04 19:02:43 +01:00
Manuel Lorenzo
60a5570bba fix class 2021-02-03 22:54:36 +01:00
Manuel Lorenzo
36c566c2d5 get Bitmap 2021-02-03 22:50:19 +01:00
Manuel Lorenzo
4c7e97a8e9 fix duplicated case 2021-02-03 22:49:34 +01:00
Manuel Lorenzo
b5e22f4eb2 fix class 2021-02-03 22:48:29 +01:00
Manuel Lorenzo
8b5d974cca add annotation 2021-02-03 22:42:36 +01:00
Manuel Lorenzo
32f3f6c2dc Merge remote-tracking branch 'origin/intermediate-merging' into intermediate-merging 2021-02-03 22:41:50 +01:00
Manuel Lorenzo
2755beae2e fix class 2021-02-03 22:41:38 +01:00
Manuel Lorenzo
8d568c47bf fix more class compilation problems 2021-02-03 22:38:21 +01:00
Manuel Lorenzo
45512ee1f4 fix class compilation problems 2021-02-03 22:35:08 +01:00
narko
ef34670e7c DynamicIconProvider: import fix 2021-02-03 21:57:25 +01:00
Manuel Lorenzo
79509f0947 fix compilation error related to Bitmap 2021-02-03 21:23:10 +01:00
Manuel Lorenzo
112f284175 organize imports 2021-02-03 20:51:48 +01:00
Manuel Lorenzo
8170158bba commit current status 2021-02-03 17:44:24 +01:00
Kshitij Gupta
f4634bc7f8 ItemInfo: Fix more LauncherAtom imports 2021-02-01 17:33:25 +05:30
Kshitij Gupta
343e1530c5 Merge tag 'android-11.0.0_r28' of https://android.googlesource.com/platform/packages/apps/Launcher3 into r-staging
Android 11.0.0 release 28
2021-01-28 01:46:13 +05:30
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
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
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
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
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
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
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