Commit Graph

15454 Commits

Author SHA1 Message Date
Shamali Patwa
b5c0044a82 Merge "Fix issue that sometimes the widget list table occupies more space." into main 2024-02-27 16:43:02 +00:00
Himanshu Gupta
dcf394535a Merge "Making Settings Cog open PS Settings page." into main 2024-02-27 15:46:34 +00:00
Shamali P
64340ea0ee Fix issue that sometimes the widget list table occupies more space.
Since the widget cells are is recycled, some times, the cell occupies
more space based on the previous cell that it was recycled from. So,
we request layout to update it.

The issue is easily reproducible by first expanding app that has
single item but with large spanY. Then, expanding app with one item
but with smaller spanY (e.g. settings or sheets apps).

* Before: http://screencast/cast/NDkwOTMwOTcyMzkzNDcyMHxjMDdmZDE1Yi05Yg
* After: http://screencast/cast/NTA0NzU3Nzc5MDY0NDIyNHw1NzhkZmM0MS04OA

Bug: 289147379
Flag: N/A
Test: Manual
Change-Id: I4d003024e1db437a50de759f9390190b038a114a
2024-02-27 14:17:03 +00:00
Helen Cheuk
96fd73ed84 Merge "Stash taskbar when software keyboard is docked" into main 2024-02-27 10:40:07 +00: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
Vinit Nayak
6e9070a4a9 Merge "Request high res icons for app pairs after all workspace items processed" into main 2024-02-26 15:06:09 +00:00
Vinit Nayak
ef5159e8df Request high res icons for app pairs after all workspace items processed
* TL;DR Loading workspace icons only requests high res icons for apps
on workspace or in hotseat, not for folders or app pairs. They need to
request that separately
* See notes on bug for root cause

Test: Created many app pairs, empty icons does not repro.
If I remove my change issue consistently repros, not a race condition
Fixes: 323106492

Change-Id: I05ba5e8e8b0eddd4041642f89d06deff85511e40
2024-02-23 16:47:50 -08:00
Treehugger Robot
d7161bf6ff Merge "Enforce parent outline for widgets" into main 2024-02-23 21:56:06 +00:00
Jeremy Sim
4e22c4463d Merge "Fix app pair launches with certain apps" into main 2024-02-23 21:56:05 +00:00
Sihua Ma
a5ac9107b8 Enforce parent outline for widgets
This bounds the widget view inside BaseLauncherAppWidgetHostView
to reduce the overlap

Bug: 322919716
Flag: N/A
Test: Manual
Change-Id: I270d94e3fff96724e95f9a38ab41f83beebd1271
2024-02-23 10:22:56 -08:00
Priyanka Advani
d0a1c2c023 Merge "Revert "Remove Unused parts of LauncherPrefs causing cyclical dependency."" into main 2024-02-23 18:11:50 +00:00
Priyanka Advani
a80997d9eb Revert "Remove Unused parts of LauncherPrefs causing cyclical dependency."
This reverts commit 21ab3b979b.

Reason for revert: Culprit for b/326611479. Will be verifying through ABTD for confirmation and before submitting the revert.

Change-Id: Ib71791d159b3ac65ca332f58500341a1a0fe36e1
2024-02-23 18:05:39 +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
Jeremy Sim
1a98a9d874 Fix app pair launches with certain apps
This CL changes the way app pairs are saved. Previously, we saved the app pair using WorkspaceItemInfos directly from Recents, which caused certain apps to fail on launch because they weren't being launched with the correct Intent.

Now, we look up a proper launchable WorkspaceItemInfo from the AllAppsStore and save that to the app pair, which should fix the launch issues.

Bug: 323112914
Bug: 323110399
Test: Can launch Slides, Play Store, and Calendar when part of an app pair.
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I475afa1a237c50ffb0ffaf85af43912a803b8011
2024-02-22 22:58:44 +00:00
Sunny Goyal
1d6f76f811 Merge "Adding support for async view inflation" into main 2024-02-22 22:38:41 +00:00
Anushree Ganjam
cc971f67f5 Merge "Remove Unused parts of LauncherPrefs causing cyclical dependency." into main 2024-02-22 21:53:21 +00:00
Charlie Anderson
ca261fda97 Merge "Do not set click listener for CellLayout during accessible drag, to prevent double tap to activate message." into main 2024-02-22 20:26:14 +00:00
Charlie Anderson
a88605df5e Merge "Add additional debug logging for when Launcher cannot find a valid activity to launch an app with." into main 2024-02-22 19:20:47 +00:00
Vinit Nayak
56392d2f65 Merge "Move updating layoutParams outside of dispatchDraw()" into main 2024-02-22 19:02:32 +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
Jagrut Desai
08a4e68bae Merge "Handle SystemGestureRegion in TaskbarDragLayer" into main 2024-02-22 17:55:28 +00:00
Rohit Goyal
de66327e47 Merge "Bugfix: Ensure archived app icons persist when app main activity name changes post unarchival." into main 2024-02-22 17:52:02 +00: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
Charlie Anderson
79b8ed0b9e Do not set click listener for CellLayout during accessible drag, to prevent double tap to activate message.
This is because there is no click action for CellLayout during accessible drag, as only the individual cells need to be clickable.

Bug: 318312177
Test: locally
Flag: N/A
Change-Id: I26f18a948b77a0ee889dfafa626b9176d8481aeb
2024-02-22 12:27:52 -05:00
Charlie Anderson
d11c24e750 Add additional debug logging for when Launcher cannot find a valid activity to launch an app with.
Test: local
Flag: N/A
Bug: 298342929
Change-Id: I90582de2dd52a82648f31f894fffce71c146376a
2024-02-22 10:09:24 -05:00
Stefan Andonian
21ab3b979b Remove Unused parts of LauncherPrefs causing cyclical dependency.
This "migration" feature was planned as an effort to reduce latency upon
startup. That being said, now that there is a loading screen being added
to pixel startup time, it doesn't make sense to perform a risky data
migration just to save a 100ms or so of startup time. Therefore, I am
removing this code as a clean up effort to make LauncherPrefs simpler.
Also, there was a cyclical dependency introduced in b/324670265 that
makes this cleanup effort especially worthwhile, as it resolves a bug
for other developers.

Bug: 324670265
Test: Installed this on a device and tested that nothing was broken.
Flag: NA
Change-Id: I81df710057d80fbd071bc26a53cb191d453e7dee
2024-02-22 05:50:15 +00:00
Treehugger Robot
a5e8751f0d Merge "Merging multiple implementations of CancellableTask" into main 2024-02-22 02:54:30 +00:00
Vinit Nayak
3a8d4f518d Move updating layoutParams outside of dispatchDraw()
* LayoutParams are more single states and don't need to
be updated on each cycle of drawing
* Curious if this might also fix b/323128163

Fixes: 323128163
Test: Used logging, no more infinite calls to dispatchDraw()
Flag: None
Change-Id: Ic7211b26a7365e3fbbeef3768e4d6d9254e14ee7
2024-02-21 17:01:28 -08:00
helencheuk
00ddb5e3a9 Stash taskbar when software keyboard is docked
Stash taskbar when
1) Software keybaord is docked
2) Input toolbar is placed at the taskbar area (stash so toolbar and taskbar would not overlap)

Testing result:
https://drive.google.com/file/d/1NMDexHl0FgyHFaOUh_GSEEUU2k08STJH/view?usp=sharing

Bug: 317251202
Test: TaplTestsQuickstep#testQuickSwitchToPreviousAppForTablet
Flag: N/A

Change-Id: I90662bc6e68f644e919f5c702059476b02519ed6
2024-02-21 23:03:03 +00:00
Sebastián Franco
1c6c7346db Merge "Make sure to make WidgetResizeFrame is not accessible" into main 2024-02-21 21:03:02 +00:00
Andrew Cole
ee8d92a943 Merge "Folder Previews Show Grey Pending Icon" into main 2024-02-21 20:37:17 +00:00
Jagrut Desai
c8a5176bfc Handle SystemGestureRegion in TaskbarDragLayer
- Currently user can tap on taskbar icons when in persitent mode when a popup is visible on screen.
we are making it so that touch event is not performed at view level and get dismissed before at drag layer.

Test: Presubmit, Manual
Bug: 320229858
Flag: NONE
Change-Id: I9a76faa0e282317d808ba0f55b49741dc7b750a3
2024-02-21 11:35:29 -08:00
Brandon Dayauon
0fa9113028 Merge "Add home settings toggle featureflag for enablingTwoLineText" into main 2024-02-21 18:14:21 +00:00
Rohit Goyal
b6b27a497e Bugfix: Ensure archived app icons persist when app main activity name changes post unarchival.
* In case app main activity changes, archived app icon should not disappear.
* We need to make sure the corresponding new intent is applied correctly to the app icon on activity name change.

Test: verified bugfix locally.
Bug: 324545643
Bug: 325458020
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: I0134e57e3536d05fc96c8cfcf5f57fd8f4df5f1f
2024-02-21 13:12:02 +00:00
Shamali P
ef4b102a08 Pause page scrolls while new recommendation are being applied
http://screencast/cast/NDg4NzU2MjI3NDQ3MTkzNnw5MTU1NTc4Yy1lYw
http://screencast/cast/NDk5Nzg4MzQ5MjMwMjg0OHxmZGM0MGZlYS0wMg

This cl is NO-OP for anything else using it already. Just renamed it.

Bug: 318410881
Test: Manual (see screencast)
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: I55d599437b2554f58d635d11f2b603516b030f30
2024-02-21 04:15:46 +00:00
Sebastian Franco
8397965d69 Make sure to make WidgetResizeFrame is not accessible
Fix: 317170537
Test: manual testing, making sure to test the widget picker flow
and testing the reorder accessible flow.
Flag: NA

Change-Id: I94be43b8ef5c8cd8574178eec563324fc0dc08ad
2024-02-20 16:59:10 -08:00
Vinit Nayak
2b031727f0 Merge "Log split metrics through individual sessions" into main 2024-02-21 00:20:44 +00:00
Andrew Cole
d462190ef2 Folder Previews Show Grey Pending Icon
When downloading an app previously the pending icon would show the full color icon when it was in a folder preview. To fix, we consolidated the logic for pending icons in PreloadIconDrawable and moved the logic of the pending state to the ItemInfoWithIcon model to represent the state of a pending application inside the model instead of in views.

Bug: b/324629535
Test: ItemInfoWithIconTest.kt
Flag: None
Change-Id: I4ffab44ddead046adcc84911039c87ea7c304e63
2024-02-20 21:15:21 +00:00
Shamali Patwa
b7483c1d37 Merge changes from topic "categories" into main
* changes:
  Initial UI changes for displaying categorized suggestions.
  Use full-width two picker in both orientations in tablets
  Use derived padding instead of static 300dp for large portrait displays
  Align items in the center within each table row within suggestions.
2024-02-20 17:42:31 +00:00
Brandon Dayauon
c2173aac34 Merge "Collapse private space container and animate header." into main 2024-02-19 04:21:56 +00:00
Himanshu Gupta
b2ea96303c Merge "Preventing installed PS apps from moving to home screen" into main 2024-02-17 12:55:33 +00:00
Brandon Dayauon
08b06523a5 Collapse private space container and animate header.
- Just opposite of how it will expand.
- RecyclerView.SmoothScroller is needed to scroll the container.

- Need to separate the lock button because this way I can use animateLayout changes and it itself was its own drawable. Separated into icon and textView in a viewGroup.
- Give the background the 10padding on the left and right so that when in animation, the icon can adjust the padding/margins there.
- Using propertySetter to set animation
- Animates the alpha of the settings alpha

- updated test to account for the nested child views the test needs to inspect

bug: 299294792
test: manual:
Expand + Collapse Video: https://drive.google.com/file/d/1Og66eqmXv3THn0wO4_x6Tfp2AbwFWUwZ/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation TEAMFOOD

Change-Id: I96f1d172a481522d23b4cee996ddec65961fce78
2024-02-16 21:23:51 -08:00
Fengjiang Li
73ece207a2 Merge "Avoid flicker to drop a widget that needs a config activity." into main 2024-02-17 03:16:40 +00:00
Fengjiang Li
8bd66ee82d Avoid flicker to drop a widget that needs a config activity.
When dropping a widget that requires an config activity, drop a
PendingAppWidgetHostView to workspace

Adb command to try the feature:

adb shell device_config put launcher com.android.launcher3.enable_add_app_widget_via_config_activity_v2 true

Fix: 284236964
Test: manual
Flag: aconfig launcher.enable_add_app_widget_via_config_activity_v2 DISABLED
Change-Id: Ifd0be5c607a388cf8a8f6d77b46c03112e3e599f
2024-02-16 17:05:40 -08:00
Anushree Ganjam
9ea1724245 Merge "Add InteractionJankMonitor for backpress from allapps CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK." into main 2024-02-17 00:23:11 +00:00
Anushree Ganjam
06c98fd685 Add InteractionJankMonitor for backpress from allapps CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK.
Jank CUJ's cannot be added in LauncherState since it's aosp code.
Introduced `onBackPressComplete` method so the LauncherState subclasses can override this method to get back press complete call after back press animation is successful. Here we can add necessary jank CUJ's.

Perfetto trace : https://ui.perfetto.dev/#!/?s=3fc6eed848bdd692949ddb3afbdcdf04a7ef0d99cb9a83804ce9e1840492ed66

Test: Perfetto trace. https://screenshot.googleplex.com/5yviY5LxKusnKvF.png
Bug: 319132905
Flag: NA. Adding jank CUJ.

Change-Id: Ia418f06cb76fe4e14c2032c62c2250e9143442f2
2024-02-16 14:35:20 -08:00
Himanshu Gupta
4499fa60f9 Preventing installed PS apps from moving to home screen
During app install in PS, promise app icons and the
installed app icons are added automatically on home screen.
In this change we restrict the same.
Also, checked that enabling `PROMISE_APP_IN_ALL_APPS` still
works for PS apps after this change.

Bug: 325057835
Test: Launcher3 tests
Flag: ACONFIG com.android.launcher3.Flags.private_space_restrict_item_drag TEAMFOOD
Change-Id: Iecff850bcc1cd17a123553a4258943da1ee61fcc
2024-02-16 19:28:58 +00:00