Commit Graph

1736 Commits

Author SHA1 Message Date
Brian Isganitis fdd044e16e Expose IS_RUNNING_IN_TEST_HARNESS as static method.
This variable is now mutable, making the uppercase format misleading.
For instance, users might assume they can use this value in other
immutable properties, when they really should be accessing the latest
value every time they need it.

Context: https://source.android.com/docs/setup/contribute/code-style#follow-field-naming-conventions

Test: Manual
Bug: 271160958
Change-Id: Iaaa51d9153cb8a7d686c72e1210b1948029dcfd5
2023-03-03 00:17:33 +00:00
Schneider Victor-tulias cd17310656 Merge "Add debug logs to debug flaky workspace binding" into tm-qpr-dev 2023-02-24 21:12:41 +00:00
Sunny Goyal 171bb04407 Removing some obsolete features
Bug: 270386012
Test: Presubmit
Change-Id: I9d68b3d17e02d6e79ab726eb7c8da1e5a4d337ef
2023-02-22 23:17:15 +00:00
Schneider Victor-tulias 6b94a960c0 Add debug logs to debug flaky workspace binding
Bug: 270216650
Test: ReorderWidgets
Change-Id: I6fa2eab98c0268000ef4c44980c2917d5ef1bc89
2023-02-22 13:05:13 -08:00
Sunny Goyal 239d6e9b8d Adding support for customizing shortcut pinning logic
> Allowing support for overring shortcut badge
> Updating pendingShortcutInfo so that the
  handler can be easily overridden

Bug: 268253894
Test: Verified on device
Change-Id: I3184cb6494bc98c7eed33798b35b4e6e6a1e7ddc
2023-02-17 18:07:23 +00:00
Charlie Anderson 8ad9144ca2 adding the new Material U App Shortcut Popup design
Bug: 247880037
Test: tested manually
Change-Id: I66c291df54dfc2a76fc974082a19091deb167f73
2023-02-14 16:03:15 -05:00
Sebastián Franco 726e9acea4 Merge "Simulating a split screen CellLayout using one CellLayout" into tm-qpr-dev 2023-02-08 01:04:20 +00:00
Sebastian Franco 09589326db Simulating a split screen CellLayout using one CellLayout
Test: atest ReorderWidget
Fix: 188081026
Change-Id: I8eda5f77c11dc2625ae1f028d07539c28018fb55
2023-02-07 17:03:22 -08:00
Fengjiang Li d080b98b76 [Predictive Back] Revert all apps scale when exiting from search
Bug: b/267522879
Test: manual, see before after videos in bug
Change-Id: I7b14739fee23a22920d71841fc1c3c12b34a3d0c
2023-02-03 10:28:46 -08:00
Sunny Goyal 669b71f5b3 Introducing CellPosMapper which allows mapping between UI position
and model position

Test: atest CellPosMapperTest
Bug: 188081026
Change-Id: If5c6b3df5ad240317bb535c675f6ead94084238e
2023-01-30 12:17:09 -08:00
Sunny Goyal dbc5e56e07 Merge "Merging unnecessary subclass of ActivityAllAppsContainerView" into tm-qpr-dev 2023-01-25 06:37:15 +00:00
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
Sunny Goyal 34c499dc84 Merging unnecessary subclass of ActivityAllAppsContainerView
Bug: 266605714
Test: Presubmit
Change-Id: I87272ee827055f58f91a4ad9fb25d5351d453cdb
2023-01-24 13:01:00 -08: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 a13d5c4b91 Merge "Workspace pagination UI update" into tm-qpr-dev 2023-01-17 23:29:18 +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
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
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
Sihua Ma 04c89fe38e Merge "Add QuickstepWidgetHolder for widget handling" into tm-qpr-dev 2022-12-19 18:22:38 +00:00
Sihua Ma 1db8bc2467 Add QuickstepWidgetHolder for widget handling
Fix: 235358918
Test: Manual
1. Rebooted the device and verified that widgets are still updating properly
2. Changed the theme from dark to daylight, then from daylight back to dark and verified that widgets are working
3. Kept the device on for several days and verified that widgets are still updating
4. Turn on auto-rotate for the launcher, open any app then exit, verified that widgets will not vanish and reappear
5. Add & remove widgets from the screen, added widgets are still updating

Change-Id: I98ee902f7d16b47bd77626201a4fefc897ba17a0
2022-12-16 11:56:36 -08:00
Federico Baron 3f82a06c7f Remove delightful page indicator
Due to design changes, we are no longer going to use the  changes guarded under the flag SHOW_DELIIGHTFUL_PAGINATION, so we remove the flag and the code that was guarded by that flag

Bug: 261904707
Test: verify flag SHOW_DELIGHTFUL_PAGINATION no longer exists and that the regular pagination works without issues after removing all this code
Change-Id: I244b88b98df0357aa99a325a11988e8248a03206
2022-12-08 15:00:02 -08:00
Ats Jenk 8121e0d8b1 Add a flag to not disable back gesture in launcher
Desktop mode prototypes enable freeform tasks on top of launcher.
Launcher is still partially visible in the back which means that
launcher will disable back gesture for the freeform tasks.

When desktop mode prototype 1 or 2 is enabled, skip disabling the back
gesture on launcher.

Bug: 259280363
Test: manual, enable desktop mode and launch an app, try back gesture
  from edge

Change-Id: I1d5eb81c7b28fb452c9566e358d77a5b2c19d450
2022-12-01 14:06:02 -08:00
Stefan Andonian 146701ca3e Move SharedPreferences code to its own class.
Bug: 251502424
Test: Code compiled correctly.
Change-Id: Iea0d6ab2999504117546ee0f7adc0c7b8b45c065
2022-11-17 17:22:47 +00:00
Sihua Ma c6bd4ad21f Merge changes If022ec8d,I34341937 into tm-qpr-dev
* changes:
  Move LauncherWidgetHolder to widget package
  Move most of the functions in LauncherAppWidgetHost to LauncherWidgetHolder
2022-11-17 01:46:55 +00:00
Sihua Ma 8bbfcb6581 Move LauncherWidgetHolder to widget package
Making LauncherAppWidgetHost package-private as well

Bug: 235358918
Test: N/A
Change-Id: If022ec8d429579a972991872b2dc11db76719341
2022-11-16 14:31:14 -08:00
Sihua Ma aa2b872d1c Move most of the functions in LauncherAppWidgetHost to LauncherWidgetHolder
Test: N/A
Bug: 235358918
Change-Id: I343419376491203a195154f2766b12e5def38879
2022-11-16 14:30:08 -08:00
Sunny Goyal 6abdd5c735 Removing unnecessary event dispatching via touch-controller.
Instead using a poll method similar to other touch controllers

Bug: 259447608
Test: Verified on device
Change-Id: I5c29c7c1b87acb668ea93e9f44fb685379de54fb
2022-11-16 13:58:05 -08:00
Luca Zuccarini 81f5cee2cb Fix IME sync flicker with 3-button navigation.
With keyboard sync, the dismissal is handled by the animator. Calling
hideKeyboard() on top of that causes the two signals to conflict with
each other, resulting in the visible flicker and extra delayed hiding
animation.

Fixes: 251185052
Test: manual, see videos in the bug

Change-Id: Ic12ad304ef9e4b6a51279ce18d6c09ba93bd59be
2022-11-08 17:26:46 +00:00
Sunny Goyal 82379187ea Adding support for multiple overlay callbacks
Bug: 193244407
Test: Presubmit
Change-Id: Ic345972056752238e7e46226533fd8f33d664213
2022-11-03 14:37:40 -07:00
Federico Baron 120c99f440 Merge "Tapping on a "folder" on the Homescreen right after returning home results in it starting to open, then canceling." into tm-qpr-dev 2022-11-01 17:56:50 +00:00
Tracy Zhou 0c853991fd Merge "Support split from fullscreen with shortcuts" into tm-qpr-dev 2022-11-01 17:17:33 +00:00
TreeHugger Robot d20e6676b1 Merge "Add dot pagination in workspace" into tm-qpr-dev 2022-11-01 04:33:29 +00:00
Tracy Zhou ba0b5952c8 Support split from fullscreen with shortcuts
Recording: https://recall.googleplex.com/projects/f46cfe9c-8076-4efe-bf8a-b1cc4f1f5e1b/sessions/978a3a55-2982-4026-9726-2a73cb694258

TODO: improve transition animation

Bug: 246661484
Test: manual
Change-Id: Id0d1aec0685bc18f4b273f8e466996efc1d9a3d8
Merged-In: Id0d1aec0685bc18f4b273f8e466996efc1d9a3d8
2022-11-01 04:30:39 +00:00
Federico Baron 8bf1bca59a Tapping on a "folder" on the Homescreen right after returning home results in it starting to open, then canceling.
Fix: 243531200, 253264925
Test: manual
Change-Id: I180300e8333536346ad07ce7bc9956d3b84d82e6
2022-10-31 15:12:17 -07:00
Sihua Ma 17137e8bce Merge "Created LauncherWidgetHolder as a wrapper for LauncherAppWidgetHost" into tm-qpr-dev 2022-10-27 17:53:28 +00:00
Becky Qiu 6a2dd438da Merge "[Toast] Use a BaseSearchConfig for launcher3 to read allapps device config." into tm-qpr-dev 2022-10-26 20:33:05 +00:00
Sihua Ma 0593a0d3ec Created LauncherWidgetHolder as a wrapper for LauncherAppWidgetHost
The wrapper class is created for further changes that will run the wrapped host in the background.

Test: N/A
Bug: 235358918
Change-Id: I9bd6fc2749c5d4a4d3391fb75d0c3ff1e13d17bf
2022-10-26 10:57:13 -07:00
Federico Baron a184511bb4 Add dot pagination in workspace
Here we add dot pagination (the same as the one in folders) to the workspace.

Bug: 254769710
Test: Turn on the flag SHOW_DOT_PAGINATION and check out the workspace
Change-Id: Ia1e9ec78eae661aa5e7c37b2b2f1ded38b138ce8
2022-10-25 15:14:37 -07:00
Sunny Goyal f34811d3a3 Revert "Revert "Updating the scroll calculation from recyclerView to avoid view inflation""
Test: ABTD
https://android-build.googleplex.com/builds/abtd/run/L52600000956969786

This reverts commit cee6ddf3de.

Reason for revert: Fixed in ag/20239136

Change-Id: I0e8446e66d9a86a94b40fcbd6de14da07abe8e5c
2022-10-22 15:37:47 +00:00
Becky Qiu 4ed3dfc28a [Toast] Use a BaseSearchConfig for launcher3 to read allapps device config.
Bug: 251387263
Test: local
Change-Id: I92c52caff377e627305bc7999ae0205fe6269968
2022-10-21 17:11:38 -07:00
Federico Baron 41235d529b Merge changes I03636e28,I6cf6d52e into tm-qpr-dev
* changes:
  Fix page indicator dots height in workspace
  Change delightful pagination flag and use it for workspace
2022-10-19 19:33:18 +00:00
Hui Kang 2a28ae8a3f Merge "Revert "Updating the scroll calculation from recyclerView to avoid view inflation"" into tm-qpr-dev 2022-10-17 21:20:09 +00:00
Hui Kang cee6ddf3de Revert "Updating the scroll calculation from recyclerView to avoid view inflation"
This reverts commit 20bbe95ddb.

Reason for revert: Causing flake in Ironwood test: b/248295569

Test: ABTD
Before: Flaky, 14/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L33900000956890639

Revert: 50/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L49200000956887317

Change-Id: I41f4428c74e581323f90c716a7852b5e553ae27d
2022-10-17 20:37:49 +00:00
TreeHugger Robot 1f7b2f9a7a Merge "Fix repeated empty workspaces after changing the grid size." into tm-qpr-dev 2022-10-10 16:57:59 +00:00
Luca Zuccarini bda972b2c9 [Toast] Switch to using device config to control keyboard sync.
Bug: 234812580
Test: followed the existing pattern and tested by manually setting and
unsetting the flag through command line - `adb shell device_config put
launcher enable_web_suggest_on_default_browser <true|false>`

Change-Id: Idd479e93b628b78fdf55d826c56f69c5cfdaf46e
2022-10-06 10:26:42 +00:00
Federico Baron 7539d7649c Change delightful pagination flag and use it for workspace
Before the flag name would only fit 'delightful pagination' for folders, but now we're adding that feature to workspace also, hence the flag rename.
The flag is now also used in launcher to show the new XML file that uses PageIndicatorDots rather than WorkspacePageIndicator

Bug: 249773534
Test: manual
Change-Id: I6cf6d52e76ad1ec60ecb54c5cca204e9ac35cc39
2022-10-05 09:31:43 -07:00
Sebastian Franco fa37a0ad9b Fix repeated empty workspaces after changing the grid size.
There are specific scenarios when you can force an extra empty
workspace after changing the grid, fortunately there is a
function that removes empty workspaces.

Fix:229349287
Test: Add a widget in a new empty workspace page, change the
grid then remove the widget in the new grid size then return
to the previous grid and it shouldn't have an empty workspace.

Change-Id: I7b73ae2ca058bc84b3b361930e3dc856c045281b
2022-09-27 21:51:17 +00:00
Becky Qiu dd002b87e0 Merge "[Toast] Change toast qpr1 feature flags to all apps device config." into tm-qpr-dev 2022-09-23 21:31:15 +00:00
Becky Qiu 3aec5d59dc [Toast] Change toast qpr1 feature flags to all apps device config.
Bug: 247122218
Test: local
Change-Id: I096f9fe4f8d071ea4b3292c6245da0c0ec509077
2022-09-23 11:59:56 -07:00