Commit Graph

14747 Commits

Author SHA1 Message Date
Fengjiang Li 6bb8d79549 Predictive back: widget to all apps
This CL adds a layer of OnBackPressedHanlderRouter to Launcher:
1. 4 OnBackPressedHandler(s) are added in such order: auto cancel action mode handler, drag handler, view handler and state handler
2. first handler who can handle back will handle the entire back gesture
3. Let WidgetsFullSheet to handle widget to all apps transition

Bug: b/260956481
Test: manual
Change-Id: Idbce3dcec746226dd68aaabaddc8fe01334e9673
2023-01-24 15:51:46 -08:00
Stefan Andonian 74471716ca Merge "Fix crash in LauncherPreviewRenderer." into tm-qpr-dev 2023-01-24 17:35:27 +00:00
Alex Chau d2e4906230 Merge "Revert "Add logs to track app grid changes"" into tm-qpr-dev 2023-01-24 17:01:56 +00:00
Alex Chau b415beed17 Revert "Add logs to track app grid changes"
This reverts commit d2706823cb.

Reason for revert: b/258560494

Change-Id: Idb13ff4963ebf364c4b144a69621a13daa376a39
2023-01-24 11:26:06 +00:00
Sunny Goyal e1daf91dfd Merge "Moving all intent receiver register calls to a single place" into tm-qpr-dev 2023-01-24 00:10:08 +00:00
Stefan Andonian dbff8cda6c Fix crash in LauncherPreviewRenderer.
The LauncherPrefs INSTANCE variable needs to be registered with the
sandbox context used by the LauncherPreview. This will stop the crash
from occuring.

Bug: 266164372
Test: Verified that crash no longer occurs.
Change-Id: I12ef12d082b7afdb08b38321527d13c637e84f2f
2023-01-23 18:11:49 +00:00
Sunny Goyal a992ac9e8d Moving all intent receiver register calls to a single place
This is eventually allow us to move all register to background thread
Also creating a single ScreenOn tracked which is used at multiple places

Bug: 264465756
Test: Verified on device
Change-Id: Ibadf9ca43218e578954420d97a733adfa0a94fc7
Merged-In: Ib410e5bf02773cefde5bf0a0a1f2f1c108718d24
2023-01-22 05:24:48 +00:00
TreeHugger Robot 654f714718 Merge "Implement initial transient Taskbar EDU tooltips." into tm-qpr-dev 2023-01-21 07:28:30 +00:00
Brian Isganitis b21ad2da8c Implement initial transient Taskbar EDU tooltips.
Since this tooltip looks and behaves differently than the existing EDU
sheet, it has its own view and controller implementations (I also may
have wanted to write some Kotlin).

To keep transient taskbar open while on the second EDU step, another
autohide suspend flag is defined. Additionally, special casing is added
to avoid hiding transient taskbar if autohiding is currently suspended.

Tooltips use the same assets as the bottom sheet for now, and are scaled
down to fit the tooltip dimensions.

Reset `Taskbar Education` in Developer Options to try EDU again.

[Demos]
- First: https://screenshot.googleplex.com/ASBeGvrb2EA5wEF.png
- Second: https://screenshot.googleplex.com/7fnfcTh9bMYezDc.png

Test: Manual
Test: Open app, see swipe-up tooltip.
Test: Swipe up to show transient taskbar, see features tooltip.
Bug: 263157739
Fix: 258460203
Change-Id: I473f5fccbae279db0614763b640da0a120b6b7f7
2023-01-20 15:16:12 -08:00
Alex Chau 7e1144ee99 Merge "Fix IllegalStateException caused by trying to snap to destination before initalizing page scrolls." into tm-qpr-dev 2023-01-20 15:07:10 +00:00
Nick Chameyev effbe5aa48 Merge "Calculate StatusBar height locally in Launcher" into tm-qpr-dev 2023-01-20 11:42:19 +00:00
Jagrut Desai b207102b98 Merge "Adding a debug feature flag for taskbar pinning." into tm-qpr-dev 2023-01-19 21:50:05 +00:00
Nicolò Mazzucato 1207e773e2 Merge changes I2c1e440b,I805d56d4 into tm-qpr-dev
* changes:
  Add OPTIMIZE_MEASURE flag to QuickSteplauncher window
  Log device profile changes in perfetto traces
2023-01-19 19:42:26 +00:00
Jagrut Desai ffe8cc01d5 Adding a debug feature flag for taskbar pinning.
Bug: 265307333
Test: cl

Change-Id: I95cea392924fb9dc2acff99cd97a5fb4ddc32fbc
2023-01-19 19:16:23 +00:00
TreeHugger Robot bc7efd06a7 Merge "Fixing while navication bar in all-apps in 3-button mode." into tm-qpr-dev 2023-01-19 02:06:30 +00:00
Sunny Goyal 7450874e28 Fixing while navication bar in all-apps in 3-button mode.
Launcher was not accounting for all-apps-nav-bar-scrim when
computing sysui-flags

Bug: 194486821
Test: Verified on device
Change-Id: I692977fba5999bbab9737bac4b27c15c2912e6af
2023-01-18 15:36:28 -08:00
Federico Baron a9e5f5a1ef Merge "Set the ENABLE_DOWNLOAD_APP_UX_V2 flag to true" into tm-qpr-dev 2023-01-18 19:36:59 +00:00
Federico Baron da581c38e4 Merge "Change preload icon size to always be 0.7 scale when downloading" into tm-qpr-dev 2023-01-18 19:17:14 +00:00
Nick Chameyev a8037620bd Calculate StatusBar height locally in Launcher
When reading the status bar inset on devices with
multiple displays after switching the displays
the inset is not updated immediately (SystemUI
should update the height of the window first by
reacting to the display switch in it's own process).

Due to this race condition Launcher is very likely
to calculate DeviceProfile with incorrect inset
of the previous display first and update it to
the correct one only after SystemUI finished the
window update.

To avoid this adding calculation of the StatusBar
height to Launcher locally using the same utility
method that is used by SystemUI.

Bug: 264656380
Test: manual test that the statusbar height is calculated
 correctly in Launcher on a device with two displays, both on
 the inner and outer display and different rotations
Change-Id: Ia16ecadd8fcac29082d27ca693ab7740ce6161c4
2023-01-18 16:04:41 +00:00
Alex Chau 6ef0f12286 Merge "Use transient taskbar size/margin to calculate taskbar position for persistent taskbar" into tm-qpr-dev 2023-01-18 15:37:34 +00:00
Federico Baron 3278715fd4 Change preload icon size to always be 0.7 scale when downloading
In order to match upcoming designs. We will keep the icon size when downloading at 0.7 scale

Test: download an app with ENABLE_DOWNLOAD_APP_UX_V2 on
Bug: 254858049
Change-Id: I7f22eb3a5c6f1e75f19e033ff11a70aa4010ea10
2023-01-17 16:42:43 -08:00
TreeHugger Robot a13d5c4b91 Merge "Workspace pagination UI update" into tm-qpr-dev 2023-01-17 23:29:18 +00:00
TreeHugger Robot 196569bb50 Merge "Add finish icon scale animation for downloading apps" into tm-qpr-dev 2023-01-17 19:38:47 +00:00
Stefan Andonian 1eb59d6c6a Merge "Expanded LauncherPrefs APIs to Replace Direct Shared Preference Usage." into tm-qpr-dev 2023-01-17 18:23:10 +00:00
Nicolo' Mazzucato cb7bd50247 Log device profile changes in perfetto traces
This is needed to easily spot unwanted DeviceProfile changes in perfetto traces, as each one causes many new inflation and slows down the ui thread considerably.

Test: recorded trace with this log
Bug: 258214245
Change-Id: I805d56d4dfe1c08d7f28215c0462d01fcaece84e
2023-01-17 14:54:11 +00:00
Alex Chau 85d664efaa Use transient taskbar size/margin to calculate taskbar position for persistent taskbar
- DeviceProfileTest should use persistent taskbar in 3-button mode

Fix: 260596114
Test: DeviceProfileTest
Change-Id: Iadcca218dab2bc2eedc006c86dbbe3f9a0fa5e51
2023-01-16 17:00:46 +00:00
TreeHugger Robot 77a388c79e Merge "Predictive swipe: show extra app icons at bottom of All Apps's RecyclerViews" into tm-qpr-dev 2023-01-14 06:03:52 +00:00
Sebastián Franco 519714449f Merge "Change the access of cellX/Y of CellLayoutLayoutParams to private" into tm-qpr-dev 2023-01-14 00:59:47 +00:00
Stefan Andonian d1b33b311c Expanded LauncherPrefs APIs to Replace Direct Shared Preference Usage.
LauncherPrefs will contain Launcher's shared preference functionality.
It controls optimizations and classifications such as restorable vs
non-restorable data, bootaware vs non-bootaware data, and configurations
such as default values  so the calling code doesn't need to and our code
base can have a single source of truth for items that are used in
multiple places.

The old APIs remain in place, but are deprecated and will be removed
after all Shared Preference usage has been gated by LauncherPrefs in
future CLs.

Bug: 261635315
Test: Manually tested themed icon, Workspace configuration, and app
install functionality.

Change-Id: I29fd516468bc93fda393062e95be26b6d55c816e
2023-01-14 00:54:15 +00:00
Brandon Dayauon 994bed564e Merge "split the scrolling logging into work,personal, and search" into tm-qpr-dev 2023-01-14 00:32:54 +00:00
Fengjiang Li 3774824cea Predictive swipe: show extra app icons at bottom of All Apps's RecyclerViews
The maximum center scale of All Apps to Home is 90%. It means we should add 5% height to All Apps's RecyclerView to render extra app icons.

Test: manual
bug: b/264906511
Change-Id: I2e970580810220e25d7fc3a86c19abaf87ba2c6e
2023-01-13 15:55:17 -08:00
Federico Baron 4eb502ae10 Add finish icon scale animation for downloading apps
We add an animation when we finish downloading an app where the scale of the icon increases to from scale 0.867 to scale 1

Bug: 254858049
Test: Download an app and visualize finish download animation
Change-Id: I67912f86b0e35091a5fe1b39c3463a1ff203bd3b
2023-01-13 15:35:14 -08:00
Lucas Silva 97976bc345 Merge "Display back button on home settings." into tm-qpr-dev 2023-01-13 19:06:27 +00:00
Sebastian Franco 877088e6c3 Change the access of cellX/Y of CellLayoutLayoutParams to private
Bug: 188081026
Test: no op change, should compile
Test: ReorderWidgets
Change-Id: I20367974e5a4cead406e18eb66dafd4d59651b2a
Merged-In: I20367974e5a4cead406e18eb66dafd4d59651b2a
2023-01-13 18:25:10 +00:00
Luca Zuccarini da31c5e3a3 Merge "[Toast] Add a feature flag for result launch animations." into tm-qpr-dev 2023-01-13 15:14:55 +00:00
Federico Baron 3f255eb591 Workspace pagination UI update
Here we improve the pagination visuals to follow the new design specs. We also polish and fix some issues with dot pagination in workspace.

Bug: 262741688
Test: Turn on flag SHOW_DOT_PAGINATION, and test pagination on workspace. Verify that it follows the specs linked in the bug
Change-Id: I626cdcf1f7392bcc88e9b4d6fd1df65246861445
2023-01-12 18:17:42 -08:00
Alex Chau bebeefe993 Merge "Reduce icon/text simultaneously when cellHeight is not enough for largest display size" into tm-qpr-dev 2023-01-13 00:57:04 +00:00
Jeremy Sim 9dfeb03a71 Merge "Fix transition animations for launch-from-staged operation" into tm-qpr-dev 2023-01-12 23:08:37 +00:00
Ats Jenk 1c28f290c1 Merge "Skip depth and scrim if freeform tasks are visible" into tm-qpr-dev 2023-01-12 22:39:57 +00:00
Ats Jenk ca009e4e93 Skip depth and scrim if freeform tasks are visible
If freeform tasks are shown, skip applying depth effect and scrim
changes. These cause the background to flicker while showing freeform
tasks and for example showing the transient taskbar.

Bug: 263264985
Test: swipe up to show transient taskbar, observe launcher background
does not blur or flicker to black

Change-Id: I5b10d0f0c7065e903cb761488367c02d7e31d8b2
2023-01-12 10:15:30 -08:00
TreeHugger Robot 944348a522 Merge "Support predictive back from all apps to home" into tm-qpr-dev 2023-01-12 17:01:02 +00:00
Luca Zuccarini 51c89ca493 Merge "Revert^2 "Update timings for the Home <> All Apps transition."" into tm-qpr-dev 2023-01-12 14:06:07 +00:00
Fengjiang Li e884c2c79f Support predictive back from all apps to home
bug: b/238475505
Test: manual

Change-Id: Ibf4f7f41a26b044a538e2cd566d2297ed88f1b99
2023-01-11 22:55:28 +00:00
Stefan Andonian bf69ef034a Merge "Rename LoaderResults to LauncherBinder." into tm-qpr-dev 2023-01-11 22:47:34 +00:00
Stefan Andonian fb602d4db7 Merge "Refactor the OnUserUnlock code out of RecentsAnimationDeviceState and into its own class." into tm-qpr-dev 2023-01-11 22:46:31 +00:00
Sunny Goyal 96bfea9d32 Merge "Fetching the session info on the background thread when launching pening icon" into tm-qpr-dev 2023-01-11 22:32:01 +00:00
Stefan Andonian e82476ad3b Rename LoaderResults to LauncherBinder.
LoaderResults implies a data object, not binding code specific to
Launcher UX containers. This CL merely renames this class and its
usages. It also adds a comment that explains why the functionality is
split into a base class and an implementing class.

Bug: 251502424
Test: Compilation worked correctly.
Change-Id: I01b5ac2f717e9b20612538d5c1e0ca947beb593f
2023-01-11 20:32:25 +00:00
Stefan Andonian 2a58ddb89f Refactor the OnUserUnlock code out of RecentsAnimationDeviceState and
into its own class.

Bug: 251502424
Test: Compilation threw no errors and user unlock behavior worked
correctly.

Change-Id: Ifa42dc32f90dfa4fda8df0e52811ddfe20cc5a9b
2023-01-11 19:33:32 +00:00
Brandon Dayauon f54e016c82 split the scrolling logging into work,personal, and search
- moved collapse/extend logging with the other scroll logging

bug: 263817965
test: Manual - WW
Change-Id: I9cd57b895c0c2edb7fe39ef98dced574d09a0953
2023-01-11 10:09:27 -08:00
Luca Zuccarini 50ef8004e0 [Toast] Add a feature flag for result launch animations.
Bug: 250588519
Test: manual
Change-Id: I6d605bf8b1008a3b12497e1d04601735ad79c001
2023-01-11 13:16:02 +00:00