Commit Graph

1049 Commits

Author SHA1 Message Date
Saumya Prakash
194403681b Only run search edu when enabled, also make code more generic.
We only need to run the Search edu if it is enabled on devices. The code
itself is also made more generic in terms of method and variable names.

Fix: 330401405
Test: Enable and disable the search function and check whether the edu tooltip shows
up for each specific use case.
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning NEXTFOOD

Change-Id: I1cea3ee56922c0b47ae7e8379aad4b36570daa17
Merged-In: I1cea3ee56922c0b47ae7e8379aad4b36570daa17
2024-04-25 18:37:02 +00:00
Jeremy Sim
00bf2488d1 Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types.

Bug: 315731527
Fixes: 326664798
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, unit tests to follow
Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
Merged-In: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
2024-04-10 18:44:12 +00:00
Song Chun Fan
ca79c70816 [Launcher/Archive] remove all checks for the archiving system property
No longer needed

Change-Id: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
Merged-In: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
BUG: 331165939
Test: builds
2024-04-09 22:05:26 +00:00
Jeremy Sim
fcbef122e6 Refactor how app pair icons draw
This changes (and cleans up) the way app pair icons are composed. Previously, the background and 2 icons were drawn individually and separately onto the canvas. Now, they are composed into a combined drawable first. This also allows the full icon drawable to be requested by external functions (which will be needed for display app pairs in folder previews).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Visually confirmed that app pairs loooks the same in all scenarios: rotation, disabled, themed, taskbar, pinned taskbar. Screenshot test to follow.
Change-Id: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
(cherry picked from commit b37faec287)
Merged-In: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
2024-04-02 23:38:47 +00:00
Rohit Goyal
877da31569 Bugfix: Remove widgets and deep shortcuts of app which gets archived.
* Once app is archived, remove widgets and deep shortcuts corresponding to the app from the home screen.
* However during backup & restore, widgets should not be removed if they are being restored.

Test: verified bugfix locally.
Bug: 326567866
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bef2930f5a29655f6c403f2d5eefd4e99a733b04)
Merged-In: Ib3a112aadc7bd901fd6a0ba86f472ec6acf8d626
Change-Id: Ib3a112aadc7bd901fd6a0ba86f472ec6acf8d626
2024-03-06 14:48:09 +00:00
Treehugger Robot
bdd76bed63 Merge "Add toString() dump for Launcher SplitBounds" into main 2024-02-29 00:43:17 +00:00
Vinit Nayak
75306186e0 Add toString() dump for Launcher SplitBounds
Bug: 286509643
Change-Id: I57e04c571678dbb553c7d35128d8e63700a2f382
2024-02-27 17:07:44 -08:00
Jeremy Sim
70b3131393 Merge "Improve app pairs disabled state" into main 2024-02-27 06:49:52 +00:00
Jeremy Sim
3c1ee0dad4 Improve app pairs disabled state
This CL fixes 2 issues with app pairs:
- When an app pair is incompatible with the screen size due to a non-resizeable app (e.g. Camera), the app pair will now be properly disabled and display an error message. If the user is on a foldable, it will prompt the user to unfold their phone.
- The app pair icon will now properly redraw with lower opacity when it is disabled.

Fixes: 323088270
Test: Manually paused and unpaused apps, created Camera app pairs and tested with foldable
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I66514c96bc19f480c9788661e4dffaa5b1cdc2ca
2024-02-26 14:29:57 -08:00
Vadim Tryshev
0b32b7a9cb Merge "Add tracing for a bug where current RecentsActivity is null" into main 2024-02-26 18:33:31 +00:00
Vadim Tryshev
c94b2a7045 Add tracing for a bug where current RecentsActivity is null
Bug: 321775748
Test: presubmit
Flag: N/A
Change-Id: I46fde7a73a3bfe02ed6276b4ac5f3e6c33bda387
2024-02-22 16:19:16 -08:00
Treehugger Robot
8b9bb8ed0b Merge "In 3-button landscape/seascape, override nav insets to always present" into main 2024-02-22 23:47:03 +00:00
Sunny Goyal
72a74669e7 Adding support for async view inflation
Bug: 318539160
Test: atest AsyncBindingTest; atest ItemInflaterTest
Flag: aconfig enable_workspace_inflation DEVELOPMENT
Change-Id: I77a373db7a5805f68f4b8cbfa9b586b5674252de
2024-02-22 10:58:48 -08:00
Alex Chau
acf37d29db In 3-button landscape/seascape, override nav insets to always present
- In 3-button landscape/seascape, Launcher should always have nav insets regardless if it's initiated from fullscreen apps
- This avoid inset to change mid-way during app->overview transition via recents button
- This bug doesn't happen in portrait because bottomNav is always overriden in WindowManagerProxy, we're now applying the same fix in landscape/seascape

Test: Recents button from fullscreen app in 3-button landscape/seascape, and launch adjacent fullscreen app in Overview
Test: Homescreen and widget picker in 3-button landscape/seascape
Fix: 316085856
Flag: None
Change-Id: Ia4ae7948fe794b71c49f89c43dd2d1d14031abb9
2024-02-22 17:35:22 +00:00
Treehugger Robot
a5e8751f0d Merge "Merging multiple implementations of CancellableTask" into main 2024-02-22 02:54:30 +00:00
Jakob Schneider
6ad28a568e Merge "Fix two flag usages that I missed the last time around when I refactored it into the utilities class." into main 2024-02-16 17:47:34 +00:00
Jakob Schneider
f45d7f3450 Fix two flag usages that I missed the last time around when I refactored
it into the utilities class.

Test: N/A
Flag: NA
Change-Id: If2c0824d7dd076bda68ee7d9c4f48889f4c8f4e1
2024-02-16 13:03:59 +00:00
Sunny Goyal
cc1dad0cae Merging multiple implementations of CancellableTask
Bug: 318539160
Flag: None
Test: Manual
Change-Id: Ie855427c2676e0ce76655e4dd67472c0b5e435d8
2024-02-15 13:01:10 -08:00
Sunny Goyal
e337a80ef2 Cleaning up some no-op calls during workspace binding
Bug: 318539160
Flag: None
Test: Manual
Change-Id: Ida21d849a06ed9c0ebf5671214dd9ee8525288d3
2024-02-14 15:10:54 -08:00
Sunny Goyal
dc7cdd8b0c Sending original motion events to launcher overlay along with inferred values
Bug: 273828110
Flag: aconfig use_activity_overlay disabled
Test: Manual
Change-Id: I23cd72a964a647a0fd830befa096f3328e12ff8a
2024-02-13 16:26:37 -08:00
Fengjiang Li
90ebc96e34 Merge "Override Launcher's window bottom inset to 0 on large screen (tablet + unfolded phone) if all display cutouts are at bottom left/right corners" into main 2024-02-11 08:48:58 +00:00
Fengjiang Li
1707575da3 Override Launcher's window bottom inset to 0 on large screen (tablet + unfolded phone) if all display cutouts are at bottom left/right corners
Bug: 321917681
Flag: NONE
Test: manual
Change-Id: I3c41d42e11413c73146c7ef59fc712971e96db19
2024-02-11 04:05:55 +00:00
Piyush Mehrotra
b2decf8046 Fix widget restore for pre-archived apps
Widgets which were expected to be restored, were missing for apps which were pre-archived.
The fix adds checks for archived apps when processing widgets and ensures that icon with cloud overlay is present on the widget.

Test: Flashed device with build containing this fix.
    Screenshot right after SuW- http://shortn/_LoLudMXEaT
Bug: 321297173
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: Ic5fd6b5b2a12f7b2b053ee4ec7c5c7330f0d07e1
2024-02-08 15:50:13 +00:00
Sunny Goyal
a90500d233 Using system API for rotating DisplayCutout instead of rotating it ourselves
Bug: 321913010
Flag: NONE
Test: Manual
Change-Id: Iebbc8c17dc3b92a73866b7e22dfbde18eb3a52ff
2024-02-06 10:26:18 -08:00
Rohit Goyal
c475f22d8b UI Improvement: Persist archived app icon on workspace in case app uninstallation is cancelled.
Test: verified bugfix locally.
Bug: 319213296
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: Id9ba2ea833e8360ac8aa2c765beff402cff12ae2
2024-02-02 00:27:16 +00:00
Anushree Ganjam
43a826c579 Merge "Fix the Int value to reflect shared preferences value in TouchInteractionService." into main 2024-01-29 23:15:56 +00:00
Anushree Ganjam
eb5cb75753 Fix the Int value to reflect shared preferences value in TouchInteractionService.
This cl fixes following things

- When featureFlag is present, always read the value from FeatureFlag.get() instead of preferences.

- Add new function getIntFlagBackedUpByLauncherPrefs to read from sharedPreferences

- Make FlagTogglerPrefUi.java updateMenu() public

- When intFlag is modified in Developer Options, Apply button will show up. So launcher can restart and values get applied.

- Omnient Int flags will read from Featureflag.get() instead of shared preferences directly.

Bug: 320696242
Test: Manual
Flag: NA. Developer Options related

Change-Id: Id916b25d0397505d240ea8444d896c8ace826e57
2024-01-29 14:02:32 -08:00
Andy Wickham
af7ff56792 Merge changes from topics "awickham-api-cleanup", "keyboard-on-back" into main
* changes:
  Cleanup API checks for P, Q, and R.
  Add a WindowInsetsAnimationCallback to listen to IME changes.
  Update minSdk to 30.
2024-01-25 22:06:40 +00:00
Sunny Goyal
dff4231a67 Merge "Moving view inflation in Launcher to a separate class" into main 2024-01-25 01:13:12 +00:00
Sunny Goyal
4e0142328f Moving view inflation in Launcher to a separate class
Bug: 318539160
Test: Presubmit
Flag: None
Change-Id: Iacf9bec39c63cc7a31fae5628bb588ccb765663c
2024-01-24 15:06:31 -08:00
Andy Wickham
b922dccbf5 Cleanup API checks for P, Q, and R.
Test: Build with gradle
Flag: NA
Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
2024-01-24 14:58:08 -08:00
Himanshu Gupta
4b75bca8c9 Merge "Allowing ProxyActivityStarter without result." into main 2024-01-23 11:03:13 +00:00
Himanshu Gupta
70fd052cd9 Allowing ProxyActivityStarter without result.
This is required in some cases, when we do not want
the Launcher (ProxyActivityStarter) Activity to come
in recents.

Bug: 320664417
Flag: ACONFIG com.android.launcher3.private_space_app_installer_button TEAMFOOD
Test: Manual build and flash.
Change-Id: I94d9dfab19f8a2410fa82adc0c0c22a3ac238a0b
2024-01-23 05:17:20 +00:00
Vinit Nayak
40f5f0102d Merge "Remove app pairs when their member apps are uninstalled" into main 2024-01-22 20:28:23 +00:00
Jeremy Sim
48467438da Remove app pairs when their member apps are uninstalled
This patch modifies PackageUpdatedTask.execute() to also remove app pairs when their member apps are uninstalled.

Fixes: 316050282
Test: Install App A, create an app pair containing App A, uninstall App A.
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I8487a2dfcfc6d29bd55e88003d1950078c6e2e31
2024-01-22 17:50:12 +08:00
Sunny Goyal
d24d33925a Using WidgetInflater in loader task
This removes duplicate logic for widget inflation.
Since the widget inflation can now happen during loader,
the restore logging can also be moved completely to the loader

Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: If9f336e7bf49ee7df121d7d9852b674d98124895
2024-01-14 00:56:51 -08:00
Fengjiang Li
ad3915e7dd Merge "Adding support for skipping animation cancel on reapply" into main 2024-01-10 02:28:19 +00:00
Sunny Goyal
98b5e1f077 Adding support for skipping animation cancel on reapply
Bug: 314279319
Test: Verified on device
Flag: None
Change-Id: I0a6e9eef77a1d917c0fce7d4bddd079ceeb10c99
2024-01-09 10:35:43 -08:00
Jordan Silva
dd612687cc Step down icon size when isVerticalBarLayout for responsive grids
Fix the icon step down logic to resize the icons to fit when isVerticalBarLayout and the iconSize does not fit inside the cellHeight.

Bug: 316087877
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I3a1fd28b729435eaf2dbbff650e4d13d33d77ff8
2024-01-08 14:09:23 -03:00
Jordan Silva
49374a905d Merge "Reduce the iconSize to fit inside the cellSize when display size largest" into main 2024-01-05 18:33:40 +00:00
Jordan Silva
10ce3f5fe2 Reduce the iconSize to fit inside the cellSize when display size largest
For some cases, even after reducing the iconSize and iconTextSize the content of the cell does not fit inside the cell height. This issue leads the icons or labels of the folders and workspace to crop. To prevent the icons of cropping when the display size or font size is largest (for acessibility) we allow the icons and labels shrink until it fits inside the defined cell height.

Bug: 314285621
Bug: 316087877
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Change-Id: Id8da3ee89658b9fc53a36d8605b9bd56ce168834
2024-01-05 13:24:32 -03:00
Tony Wickham
97e6c9c214 Merge "Fix KI in test and re-enable for postsubmit." into main 2024-01-04 17:50:35 +00:00
Jordan Silva
873d49937c Merge "Add ESCAPE key to dismiss Overview" into main 2024-01-04 14:12:28 +00:00
Jordan Silva
9878a7206e Add ESCAPE key to dismiss Overview
This CL adds the functionality of escape key to Overview. It dismisses Overview when the esc key is pressed.
When Overview is showing a Modal Task, it will return to Overview state instead of the Normal state.

Fix: 315283507
Flag: N/A
Test: TaplTestsQuickstep
Change-Id: I02e02f623d9a4aad1c2d6188fdea4e3fc4f96d64
2024-01-04 09:08:44 -03:00
Tony Wickham
c5d4e4dcf5 Fix KI in test and re-enable for postsubmit.
- The taskbar stashing logic with hardware keyboards was different
  between tests and user experience; aligned the test to be the
  same.
- There is still a previous test failure that only occurred in
  post submit, so also add ScreenRecord to diagnose it
- Once that is resolved, can promote the test to PRESUBMIT.

Test: testQuickSwitchToPreviousAppForTablet
Flag: NA
Fixes: 318544733
Bug: 314873201
Change-Id: Ia813eb0294d759c40d90cec7a8e9a7e0aea2d917
2024-01-03 23:27:18 +00:00
Himanshu Gupta
ce2b013d31 Merge "Adding methods to access LauncherApps APIs." into main 2023-12-19 11:27:09 +00:00
Himanshu Gupta
6c25654e84 Adding methods to access LauncherApps APIs.
These methods are added to ApiWrapper class
so that Launcher can acess these APIs.

Bug: 308054233
Test: Presubmit
Flag: ACONFIG com.android.launcher3.Flags.private_space_sys_apps_separation DEVELOPMENT
Change-Id: Ic2e64b38cc8b0d262d3f6e9614e2b3fceb9d82a0
2023-12-18 19:47:13 +00:00
Fengjiang Li
e228112c33 Merge "Cancel all apps icons preinflation when device profile has changed" into main 2023-12-14 18:16:30 +00:00
Fengjiang Li
939ca48bae Cancel all apps icons preinflation when device profile has changed
Bug: 312816372
Test: perinflate large number of App Icons then rotate screen. Verified 1) preinflation runnable is cancelled and 2) no ViewHolder created from this cancelled runnable is added to RecyclerViewPool
Flag: LEGACY ENABLE_ALL_APPS_RV_PREINFLATION ENABLED
Change-Id: I1a6110278e1af2b32387ab27273106d30513886f
2023-12-13 15:31:30 -08:00
Tracy Zhou
f2643521ec Merge "Introduce taskbar_phone_size" into main 2023-12-13 18:04:04 +00:00