Commit Graph

19676 Commits

Author SHA1 Message Date
Ats Jenk
f2eb1152a2 Merge "Create accessibility menu for bubble bar" into main 2024-07-19 23:40:47 +00:00
Ats Jenk
7f3b6c030b Create accessibility menu for bubble bar
Bug: 344670180
Test: open accessibility action menu on bubble bar. use menu to
  - expand bubble bar
  - dismiss bubble bar
Test: when bubble bar is on the right, the action menu has an option to
  move bubble bar to the left only, use menu to move bar to the left
Test: when bubble bar is on the left, the action menu has an option to
  move bubble bar to the right only, use menu to move bar to the right
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id875a43927bc3410a83d1342b9456330c9521085
2024-07-19 13:59:35 -07:00
Hongwei Wang
7c0fe2d17f Merge "Disable gesture nav while PiP anim is running" into main 2024-07-19 19:38:52 +00:00
Treehugger Robot
8bba516ca4 Merge "Align color resources in launcher projects." into main 2024-07-19 16:15:25 +00:00
Shamali Patwa
6babde40e3 Merge "Move out picker related methods from widgets model" into main 2024-07-19 15:46:00 +00:00
Ikram Gabiyev
d890a9e3e2 Merge "Pass empty srcRectHint if overlay is present" into main 2024-07-19 15:04:02 +00:00
Marcelo Arteiro
f38d98d1a6 Align color resources in launcher projects.
This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
2024-07-19 14:22:21 +00:00
Jordan Silva
426f74369a Introducing Manual DI for Overview
This CL adds the RecentsDependencyContainer to maintain singletons and dependencies related to RecentsView. RecentsDependencies is a singleton that requires the application context to be initialized. Unlike regular singletons, this class has an initialize function where it gets initialized and can be retrieved with getInstance without providing the appContext each time.

- We've updated the refactored classes behind the -enable_refactor_task_thumbnail flag to use this DI solution rather than relying on .parent or recreating dependencies.

- To inject dependencies, you can use RecentsDependencies.inject for lazy initialization or RecentsDependencies.get for eager initialization.

- At the moment, we don't have a singleton or factory definition. All dependencies created by RecentsDependencies will be stored in a specific scope, making the instance a singleton within that scope.

- You can create or retrieve a dependency in a particular scope by calling RecentsDependencies.inject(scopeId).

- If you don't need the dependency to be stored in RecentsDependencies, you can create it manually in your code and inject the necessary parameters from RecentsDependencies (see the viewModel in TaskOverlayHelper).

- Handling the cleaning/resetting of dependencies will be addressed in b/353917593. RecentsView lifecycle is more complex and doesn't get recreated every time. We need to determine which dependencies or scopes can be destroyed and recreated.

Fix: 349055024
Test: NONE
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I27b92e3038f1cce0fd53b637dba5054c05b40283
2024-07-19 11:54:20 +00:00
Treehugger Robot
2495e980ed Merge "Throw exception from SystemUiProxy.getRecentTasks for invalid result" into main 2024-07-19 11:01:40 +00:00
Alex Chau
3210f73125 Throw exception from SystemUiProxy.getRecentTasks for invalid result
- The reason Recents is empty after a force-stop is when RecentsTasksList.getTasks is called first time after restart, the result is always invalid but we cached the invalid result with a chagneId(=1). The next time we call getTasks again, we think the cached result is valid, and returend an empty list.
- The fix is to mark such result as invalid to avoid caching the wrong result

Fix: 353926204
Test: RecentTasksListTest
Flag: EXEMPT bugfix
Change-Id: If15ab8fd7454db8a08c22b17eaac73f0c78aa75f
2024-07-19 09:21:40 +00:00
Liam Lee Pong Lam
0002e9cfc9 Merge "Add unit tests for SettingsChangeLogger" into main 2024-07-19 01:53:21 +00:00
Jon Miranda
6d5ab854d1 Merge "Synchronize the app launch and taskbar stash animations." into main 2024-07-19 00:26:33 +00:00
Jon Miranda
cde962dcb7 Synchronize the app launch and taskbar stash animations.
Introduce FLAG_IGNORE_IN_APP to prevent taskbar from stashing prematurely
due to HomeTransitionListener signal.

Bug: 345768019
Fixes: 319162553
Test: Launch an app, note the two animations are synced
      Verified by locally introducing a startDelay (since otherwise it is hard to tell)
Flag: com.android.launcher3.enable_scaling_reveal_home_animation
Change-Id: Ibb64e0321f33cf81e337fc7c1b2c3edfb23e6ba4
2024-07-19 00:26:13 +00:00
Mykola Podolian
e80618db64 Merge "Prepare BubbleBarViewController to support persistent task bar." into main 2024-07-18 23:16:47 +00:00
Charlie Anderson
c22b0ea47b Merge "[Test Week] unit tests for LauncherRestoreEventLoggerImpl" into main 2024-07-18 18:44:15 +00:00
Liran Binyamin
a2aa555faf Merge "Update bubble notification dot drawing" into main 2024-07-18 18:42:01 +00:00
Shamali P
54bd36ef81 Move out picker related methods from widgets model
* The WidgetsBaseEntry and related types are specific to picker UI.
So, moved them to a entry builder class.

Bug: 353347512
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: I42b3083b42ee03dc8d548e7464689ea270a36f22
2024-07-18 18:35:19 +00:00
Liam, Lee Pong Lam
c56711c669 Add unit tests for SettingsChangeLogger
Bug: 353584526
Flag: EXEMPT bugfix
Test: Unit tests
Change-Id: Ib1bac2471d9cc467b8b6697ae4d79f561eea75e4
2024-07-18 18:32:36 +00:00
mpodolian
f667c3bc3b Prepare BubbleBarViewController to support persistent task bar.
Added required resources for the transient taskbar. Unified
BubbleBarViewController logic for the persistent taskbar.

Bug: 350065038
Flag: com.android.wm.shell.enable_bubble_bar
Test: atest
Change-Id: I24e6d2d43bf8145cdcc71c75da0cb6f6e84373da
2024-07-18 19:17:12 +01:00
Alex Chau
1c1547f5f9 Merge "Enable RecentsModel cache preloading for TTV refactoring" into main 2024-07-18 16:45:43 +00:00
Alex Chau
7e26ff8063 Enable RecentsModel cache preloading for TTV refactoring
- Enabled preloading so thumbnails are loaded faster after Launcher restarts

Fix: 353927953
Test: Manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I8710495dee672eb0449c01522451578f30ad84aa
2024-07-18 16:44:35 +00:00
Jorge Gil
e2c2302aef Merge "Re-enable FREEFORM task shortcut when DW is unsupported" into main 2024-07-18 16:30:20 +00:00
Alex Chau
33d0b14384 Merge "Update bug id of a TODO" into main 2024-07-18 16:21:31 +00:00
Charlie Anderson
ee3cc97fd3 [Test Week] unit tests for LauncherRestoreEventLoggerImpl
5 public methods tested
No previous testing class

Flag: TEST_ONLY
Test: unit test
Bug: 353303621
Change-Id: I97273e7eebebfa4aac1e7c3db8bf089f3e49f150
2024-07-18 15:38:08 +00:00
Liran Binyamin
5013028596 Update bubble notification dot drawing
The notification dot drawing state depends on changes in the bubble
bar, so the bubble bar now directly requests updates to the dot at
specific states.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 351904597
Fixes: 350782375
Test: atest BubbleViewTest
Test: manual basically just hammering on it trying to break it
       1. Dot appears for new bubble in all states of the bar
       2. Expand bubble bar
          - Dot is removed for selected and shows for others
            that have a dot
       3. After removing bubble while expanded
          - Dot is removed from newly selected bubble
       4. Collapse bubble bar
          - Dot is hidden for all bubbles
       5. Dot removed after tapping on a bubble when expanded

Change-Id: I4a940d38a8c77bddaf058b7ef882bab06886bcf4
2024-07-18 10:38:29 -04:00
Shamali Patwa
1407aeca8d Merge changes from topic "ls-picker-filter" into main
* changes:
  Consider the widget option menu choice in search results
  Show only filtered / default widgets in standalone activity by default
  Add a 3 dot vertical menu and styles (child cl makes it functional)
  Set default widgets and all widgets separately from standalone activity
  Update the widget picker activity theme for popup menus styling
2024-07-18 14:14:42 +00:00
Alex Chau
1d75081a5f Merge "Apply PreviewPositionHelper matrix to TTV and Overlay" into main 2024-07-18 13:56:42 +00:00
Alex Chau
e62ceb9043 Update bug id of a TODO
Change-Id: I0c122f70b2a954ab88b1696c2c3ece48670774ca
Fix: 340437778
Bug: 342635213
Test: None
Flag: EXEMPT refactor
2024-07-18 13:34:23 +00:00
Alex Chau
893f4c6a45 Apply PreviewPositionHelper matrix to TTV and Overlay
- Added GetThumbnailMatrixUseCase to retrieve task using taskId and calcualte Matrix using provided canvas size and isRTL
- TTVM and OverlayVM will uses GetThumbnailMatrixUseCaseTest with runBlocking to obtain the matrix from the loaded thumbnail
- TTV and Overlay listen for size change, and call VM to get the latest Matrix and apply to the view

Fix: 343101424
Test: GetThumbnailMatrixUseCaseTest
Test: TaskThumbnailViewModelTest
Test: TaskOverlayViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: If3f37824bed84d5cbaa54d7a4b12f5f1ef4e2c09
2024-07-18 13:07:14 +01:00
Johannes Gallmann
8c983e8d48 Merge "Fix CUJ_LAUNCHER_APP_CLOSE_TO_HOME Cuj for predictive back to home" into main 2024-07-18 08:29:38 +00:00
Treehugger Robot
ada4e16644 Merge "Replace get/setPendingIntentBackgroundActivityLaunchAllowedByPermission" into main 2024-07-18 06:52:30 +00:00
Tracy Zhou
749ea3115c Merge "Fix missing taskbar scrim in folded state when swiping up from immersive mode" into main 2024-07-18 00:47:41 +00:00
Achim Thesmann
79300ffae0 Replace get/setPendingIntentBackgroundActivityLaunchAllowedByPermission
Replace usages of the old get/setPendingIntentBackgroundActivityLaunchAllowedByPermission
API with the new replacement (passing in mode = ALWAYS).

Test: atest DragAndDropPolicyTest StageCoordinatorTests AlarmManagerServiceTest BackgroundActivityStartControllerExemptionTests BackgroundActivityStartControllerTests ActivityOptionsTest ActivityStarterTests BackgroundActivityLaunchTest
Flag: EXEMPT refactor
Bug: 352182359
Change-Id: I692dbb2122995d5cc3fa87bf5061704987ebddbb
2024-07-18 00:44:04 +00:00
Andy Wickham
e6b43c86ba Merge "Invert the 2 stage LPNH logic to lower false positive triggers." into main 2024-07-17 23:11:51 +00:00
Shamali P
8654ff0116 Set default widgets and all widgets separately from standalone activity
Bug: 347288851
Flag: EXEMPT standalone picker
Test: Manual
Change-Id: I4eaeb7cb44b8b9c4187f7cf8fdc1b80143bb322e
2024-07-17 22:56:30 +00:00
Shamali P
2d7a6b0fee Update the widget picker activity theme for popup menus styling
The earlier version didn't inherit in-built popup styles and launcher
inherits from these too.

Bug: 347288851
Flag: EXEMPT standalone picker
Test: standalone picker will be covered in b/339716822
Change-Id: Ic33afbcea3838a608385e3f94cb864f66cef9e8a
2024-07-17 22:56:22 +00:00
Shamali Patwa
45b5acef28 Merge "Cleanup widgetsModel and add tests" into main 2024-07-17 22:55:01 +00:00
Treehugger Robot
2397ffd437 Merge "Disable model loading in Taskbar unit tests." into main 2024-07-17 21:14:10 +00:00
Tracy Zhou
fe5c3fb5eb Fix missing taskbar scrim in folded state when swiping up from immersive mode
TaskbarTransitions is needed for gesture nav too

Also updated the TaskbarTransitions check so that foldables are included (instead of just phones with the unification for phones flag on

Fixes: 353620747
Test: Scrim shows in Youtube immerisve mode
Flag: EXEMPT bugfix
Change-Id: I9990ef8f793e28b3af2f42b0a5a117fdfbdd4081
2024-07-17 14:04:13 -07:00
Tracy Zhou
ae637b60e0 Merge "Fix double task bar" into main 2024-07-17 20:14:51 +00:00
Ikram Gabiyev
a393f2b678 Pass empty srcRectHint if overlay is present
Launcher should pass an empty srcRectHint to Shell
via stopSwipePipToHome if overlay is present, so
that Shell know that srcRectHint is being "simulated"
for the enter PiP animation with an app icon overlay.

Shell will recalculate the simulated src-rect based on
appBounds and aspect ratio of the destination bounds.

Bug: 352773027
Flag: EXEMPT bugfix
Test: swipe PiP to home from Maps with fixed rotation (90 and 270)
Change-Id: I5f89c5af9d6b8a66725e346d09e7b3d84044bb4c
2024-07-17 12:38:23 -07:00
Jorge Gil
b9a0766dde Re-enable FREEFORM task shortcut when DW is unsupported
The freeform shortcut was previously changed to only show if the desktop
windowing flag was disabled, which is incorrect since it's not a
reliable indicator about whether desktop windowing is supported or not.
When the flag is enabled as the feature progresses, it causes the button
to be hidden on devices that support freeform windows but don't support
desktop windowing, such as phones or tablets when freeform is enabled in
developer options.

To properly check that DW is not enabled, this CL changes the flag check
to DesktopModeStatus#canEnterDesktopMode.

Bug: 353740331
Test: enable freeform in dev options, disable desktop windowing - check
"freeform" button is available through long-press of the app icon in
overview/recents.
Flag: EXEMPT bugfix

Change-Id: I0ea5073e5570838acf49a27f54546fd97e6739cd
2024-07-17 18:37:39 +00:00
Treehugger Robot
fd7499bb82 Merge "Update IME switcher icon in taskbar" into main 2024-07-17 15:37:50 +00:00
Shamali P
3ae39c72de Cleanup widgetsModel and add tests
1. Removes unused method `getAllWidgetComponentsWithoutShortcuts`
2. Exposes widgets either as component map or package item map - to
eliminate the duplicate logic around widget sections.
3. Add tests that validate that each package is unique - to help
cover the redirect issue seen in past.
4. In follow up cls, other methods that deal with picker specific data
types like WidgetsListBaseEntry will also be moved out - leaving the
model to only be responsible for providing all widgets map or widgets
by package.

Bug: 341611976
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: Ife70874d312b51c66025a6ec678480f2b5c41793
2024-07-17 14:29:31 +00:00
Treehugger Robot
4997c14218 Merge "Adding screen record for the bug where com.google.android.apps.nexuslauncher:id/popup_container is not present" into main 2024-07-17 14:10:16 +00:00
Treehugger Robot
c2a36a6fcd Merge "Add Repository for RecentOrientedState and DeviceProfile" into main 2024-07-17 12:25:09 +00:00
Treehugger Robot
f834c2c881 Merge "Adjust scope for TaskOverlayHelper" into main 2024-07-17 11:10:17 +00:00
Alex Chau
5837a4628c Add Repository for RecentOrientedState and DeviceProfile
- DeviceProfile have java fields that cannot be mocked, nor can be freely instantiated, so I've to use FakeInvariantDeviceProfileTest to give me some predefined DeviceProfile for testing

Bug: 343101424
Test: RecentsOrientedStateRepositoryTest
Test: RecentsDeviceProfileRepositoryTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Iaa34ef60a418eb336859d260f5808b263de6b4f7
2024-07-17 11:29:20 +01:00
Uwais Ashraf
7fb7ac21a2 Adjust scope for TaskOverlayHelper
Fix: 335396935
Test: Manual - start stop overlay multiple times
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I615e43eddc896f52f9718ccef3a09f39b1ed7569
2024-07-17 09:09:33 +00:00
Tracy Zhou
100d8b3ec0 Fix double task bar
I was too excited when I finally got the repro on my device. After some debugging, I found it (ag/27947503)

Fixes: 350790048
Test: with the change, double task bar is gone.
Flag: EXEMPT bugfix
Change-Id: I969dbf5e9d2c5cc277dfb366858023e6eeff14e2
2024-07-16 23:43:38 -07:00