Commit Graph

2078 Commits

Author SHA1 Message Date
Suphon Thanakornpakapong
6cac30f326 Keep blur applied if drawer is not solid 2021-09-04 16:19:37 +07:00
Suphon Thanakornpakapong
c61da71a7f Add fallback navigation mode 2021-08-22 10:07:53 +07:00
Suphon Thanakornpakapong
a841c94c99 Defer loading custom window radius until first unlock 2021-08-19 14:14:46 +07:00
Suphon Thanakornpakapong
115bd857d3 Allow overriding window corner radius 2021-06-10 23:20:24 +07:00
Suphon Thanakornpakapong
b48e538aa2 Move preferences package 2021-06-06 14:56:10 +07:00
Suphon Thanakornpakapong
f0b46c9199 Fix crashes below Q 2021-06-03 11:13:09 +07:00
Suphon Thanakornpakapong
61d2358ba1 Fix more crashes below Android 10 2021-05-31 10:47:43 +07:00
Suphon Thanakornpakapong
7c26603f33 Fix depth controller crash below 11 2021-05-31 10:15:19 +07:00
Suphon Thanakornpakapong
397d4aa243 Major preference refactor
- Migrate all preference logic to PreferenceManager
- Make preference UI directly hook to PreferenceManager
2021-04-28 21:07:32 +07:00
Patryk Michalik
f6c6bb25d2 Optimise code, indicate changes in copyright headers 2021-04-28 11:37:18 +02:00
Suphon Thanakornpakapong
7235a78603 Use existing StatusBarTouchController to handle swipe down 2021-04-28 10:34:14 +07:00
Patryk Michalik
aab6b80fa0 Relicense to and fix compliance with Apache 2.0
[skip ci]
2021-04-24 09:48:35 +02:00
Patryk Michalik
ec28554021 Fix opacity resetting on restart, temporarily limit range to 70–100% 2021-03-26 11:07:45 +01:00
Kshitij Gupta
4e92178045 Lawnchair: Drawer Opacity 2021-03-26 02:16:13 +05:30
Kshitij Gupta
aa7512c273 Merge tag 'android-11.0.0_r33' of https://android.googlesource.com/platform/packages/apps/Launcher3 into HEAD
Android 11.0.0 Release 33 (RQ2A.210305.007)
2021-03-18 23:07:37 +05:30
Kshitij Gupta
87a0000d52 DeviceConfig: Check for permission before bailing 2021-02-28 03:08:42 +05:30
Kshitij Gupta
16275e5c04 Launcher3: Standalone studio build 2021-02-28 02:57:05 +05:30
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
vadimt
01a51f5bb9 Merging from ub-launcher3-rvc-qpr-dev @ build 6809704
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-qpr-dev_rvc-qpr-dev_6809704.html

Change-Id: I870f8ec233dfae0c9c857ebb050217879f83ba65
Merged-In: Ib9d52ba333f2982d2420cab42a0935e8e8a303b3
2020-09-03 02:59:35 +00:00
TreeHugger Robot
01a5b52b42 Merge "Fix a couple issues with overview to home transition" into ub-launcher3-rvc-qpr-dev 2020-08-26 21:54:08 +00:00
Tony Wickham
5c460a4663 Fix a couple issues with overview to home transition
- In fake portrait, fade out instead of translating offscreen, as
  the orientation doesn't map to where RecentsView actually lives
- From OverviewModalTaskState, start from > 1 scale, and use
  OverviewToHomeAnim (to ensure RecentsView doesn't fade out etc)
  - To keep parameter list sane, added RecentsParams to
    AnimatorControllerWithResistance which has the new startScale
    (set to current scale for modal state) and renames the old
    RecentsParams to RecentsResistanceParams. Sorry if that's
    confusing.

Bug: 144170434
Change-Id: Id36ebde440b398159cef50d95822627fca761527
Merged-In: I437f0d18cad4c94feea25954aed3390acedcaed5
2020-08-24 23:29:14 +00:00
Tony Wickham
0486a03832 Merging from ub-launcher3-rvc-qpr-dev @ build 6777894
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-qpr-dev_rvc-qpr-dev_6777894.html

Change-Id: I4a4a422b2f70c2107c21161c662a4aac3fee7903
Merged-In: I0bb722c8f29e91cb382337f8b11bcf43d711949b
2020-08-21 19:07:27 +00: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
Tony Wickham
fa9675a32e Merging from ub-launcher3-rvc-qpr-dev @ build 6770831
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-qpr-dev_rvc-qpr-dev_6770831.html

Change-Id: Ic07dd8bd495cd0e013a00a29d9d9f11e246dc568
Merged-In: I5e9c73a7ac3033fe82006c4bd72824f56b8988f8
2020-08-18 04:59:10 +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
94dbcefe2a Store mHistoricTimes as longs intead of floats am: 31ef24c934
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12375534

Change-Id: Ie82539f445850e62edc424fe088c41cc28890d6b
2020-08-14 10:46:38 +00:00
Tony Wickham
31ef24c934 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
(cherry picked from commit a145670969)
2020-08-14 06:24:05 +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
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
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
Sunny Goyal
7260bd5869 Fixing wrong velocity state when there are too few samples am: f58a2b9cd9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12317133

Change-Id: I18567bc1678fa00f02c0c89760ab9b1eb356d78f
2020-08-06 22:56:18 +00:00
Sunny Goyal
f58a2b9cd9 Fixing wrong velocity state when there are too few samples
Bug: 160568387
Change-Id: I32b3b7ee1bff5595941fc0c0b37c9f5a28d1a1fa
(cherry picked from commit 48afb6b3b9)
2020-08-06 16:51:08 +00: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
073673e173 Merge "Fixing wrong velocity state when there are too few samples" into ub-launcher3-rvc-qpr-dev 2020-07-31 18:12:40 +00:00
Sunny Goyal
48afb6b3b9 Fixing wrong velocity state when there are too few samples
Bug: 160568387
Change-Id: I32b3b7ee1bff5595941fc0c0b37c9f5a28d1a1fa
2020-07-30 15:44:05 -07:00
Pinyao Ting
553d4dfe7d Minimal Phone Mode (part-2)
Integrate with ContentProvider from Digital Wellbeing

Change-Id: Ie1fbb706e767ac5d760d686af88a9a0adf162418
2020-07-30 22:07:20 +00:00
Hyunyoung Song
45c0918f47 Merging ub-launcher3-rvc-qpr-dev to rvc-qpr-dev
Bug: 162366734
Test: system image builds

Change-Id: I6675431b180976798afacc7a99251ae36764a50a
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-30 00:26:39 -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
Hyunyoung Song
eeb497cf92 Merge "Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"" into rvc-qpr-dev 2020-07-28 23:44:26 +00:00
Hyunyoung Song
0a4a4d920e Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"
Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"

Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"

Revert submission 12190253-merge_ub-launcher3-rvc-qpr-dev_6690853

Reason for revert: Build ID picked from ub-launcher3-master and not ub-launcher3-rvc-qpr-dev

Reverted Changes:
I9e658ece0:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
I2a47fe180:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Ie86b0a2e0:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Id3ca76da6:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Ib6a63da0f:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Bug: 162366734


Change-Id: Ie81853a34c9a48d5b3fd922c65483a9ff639e0ce
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-28 23:43:43 +00:00
Sunny Goyal
0a7049055e Fixing touches getting ignored just after swipe-up am: 16e165defe
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12240766

Change-Id: I3f741e2bd27157e69c84b982df38171041d89e41
2020-07-28 09:47:44 +00:00
Andy Wickham
91fbf6619a Merge "Adds haptics to Overview gesture in Sandbox." into ub-launcher3-rvc-qpr-dev 2020-07-28 01:43:56 +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
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
Andy Wickham
17f379bf4b Adds haptics to Overview gesture in Sandbox.
Change-Id: I4b8ec88bfc051de287b1b8ac27c4b5ab9ac90bbf
2020-07-24 16:49:15 -07:00