Commit Graph

28 Commits

Author SHA1 Message Date
Brian Isganitis
ae80cbfed3 Refactor test dagger graph to stub PerDisplayRepository instances.
These are not being used yet in Taskbar, but they are hardcoding
DEFAULT_DISPLAY for the primary ID. In tests, we want the primary to be
considered the ID of the virtual display tests are running on.

This change also moves dagger classes to its own file for organization.

Flag: TEST_ONLY
Bug: 415326979
Test: Taskbar multivalent tests
Change-Id: Ibd0cdf46bc53dbd7a3dd5f34d7171d9a6cdebb38
2025-05-12 17:10:57 -04:00
Sunny Goyal
57a195b790 Making workspaceData immutable
BgDataModel holds a mutable handle of the data, which ensures that all edits go through this class and there is a single place to keep the repository updated

Bug: 390572144
Test: Updated existing model tests
Flag: EXEMPT refactor
Change-Id: I991b707dd21801d1abd00510f676549947285012
2025-05-07 13:21:21 -07:00
Sunny Goyal
aef6c7932e Moving predicted items to ItemIdMap instead of extraItems
> This allows the whole workspace model to be contained in itemIdMap instead of spread across multiple data containers
> Deprecating extraItems, all non-workspace data should use separate repositories
> Design: http://go/launchermodel-re-arch?#heading=h.5y8n4r164d5s

Bug: 390572144
Test: atest PredictionUpdateTaskTest
Flag: EXEMPT refactor
Change-Id: I886d0a8d5bbbf9f5c2054d4a2442bf03f9c4eab5
2025-05-05 15:52:37 -07:00
Sunny Goyal
036ced4703 Converting BgDataModel to Kotlin
This will allow the use of Flows in BgDataModel

Flag: EXEMPT refactor
Bug: 390572144
Test: Presubmit
Change-Id: I8fdd1635a19ae4d75260fb1ddb9cd7ab00cd0496
2025-04-29 15:37:11 -07:00
Jon Miranda
a19e4e2063 Switch taskbar overflow flag to lse_desktop_experience
Both flags are in Nextfood, so there will be no change to
user experience.

Bug: 368119679
Bug: 375627272
Test: TaskbarOverflowTest
Flag: com.android.window.flags.enable_taskbar_overflow
Change-Id: Ie3ef3bd49e078f5657bd069bc92c5a48a136e7cb
2025-04-23 15:20:04 -07:00
Treehugger Robot
59e208c28e Merge "Moving various launcher binding logic, outside LauncherModel" into main 2025-04-23 12:32:54 -07:00
Treehugger Robot
e7cb23a501 Merge "Fix TaskbarOverflorTest failures with multi-desks on" into main 2025-04-22 16:30:44 -07:00
Sunny Goyal
c078d6554c Moving various launcher binding logic, outside LauncherModel
This brings the BgCallbacks closer to a repository pattern making is easier to switch eventually

Bug: 390572144
Flag: EXEMPT refactor
Test: Updated AsyncBindingTest to use real ModelCalbacks
Change-Id: I9c932b00ea8ac7330473b9c0f5d778453fe7a390
2025-04-22 14:12:17 -07:00
minch
d5d15c493f Fix TaskbarOverflorTest failures with multi-desks on
Bug: 362720309
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Change-Id: I91621d4c71d1ab28fb4b17ab62ba6c8ff43cb7d2
2025-04-22 16:10:57 +00:00
Ajinkya Chalke
c96b9adf79 Add unit tests for KQS CD changes
Bug: 382762871
Bug: 382769617
Test: KeyboardQuickSwitchControllerTest and TaskbarOverflowTest
Flag: EXEMPT adding tests
Change-Id: I053af97774230a9bc3d21ff8e1e328344519f728
2025-04-22 15:07:37 +00:00
Wen-Chien Wang
ed04537faa pin-shortcut: Add tests to verify the behavior
Bug: 375648361
Test: This is the cl for tests
Flag: EXEMPT tests
Change-Id: I7209cebcc7e7c34d5f1362121fea5e062e3170de
2025-04-19 07:34:33 +00:00
Jagrut Desai
64d448a8db Fix Taskbar Flicker with Recents or Running Apps Present
Test: Manual, Presubmit
Bug: 404772481
Flag: EXEMPT bugfix
Change-Id: If3b87474e6e85fabf24a42ac2a3e4ac6a19a4358
2025-03-25 14:16:12 -07:00
minch
68e116e79f Get displayId from DesktopTask for DesktopTaskView
Bug: 401011627
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Test: Added a test in RecentTasksListTest
Change-Id: I21164de812d57b79cd84370bbf0426268c4b645d
2025-03-13 22:24:22 +00:00
Toni Barzic
501562f09a More test for taskbar overflow
Adds tests to TaskbarOverflowTests to verify that:
*   tapping overflow view toggles keyboard quick switch view
*   tasks associated with a hotseat item don't get added to
    recents taskbar section / overflow view
*   keyboard quick switch view shown from taskbar contains
    running tasks, excluding tasks associated with a hotseat item

Bug: 379774843
Flag: com.android.launcher3.taskbar_overflow
Test: atest TaskbarOverflowTest

Change-Id: Iee6316c33cef6322d567e853f9fa358b7af9e172
2025-02-25 04:39:23 +00:00
Jagrut Desai
8b2e5eff9b Desktop Mode Taskbar Recreate Animation
This Cl includes
       - addition of entry/exit callback methods in DesktopVisibilityController.
       - taskbar manager now listens to desktop mode changes.
       - TaskbarBackrgroundRedererer can now individually animation backgrounds for transient and persistent taskbars
       - new channel for taskbar icon alpha added to TaskbarViewController
       - new animated float to handle background alpha while we are recreating taskbar with animation.

Solution:

we use the callabck we get from DekstopVisibilty for entry/exit to first change logic of when we are considered inDesktopMode. Upon entry/exit we notify display controller for info change.
we also at notify taskbar manager who is now a listener to the desktop mode change and start the recreate process. TaskbarManager first animates existing taskbar out of user view and then follows the original recreate flow.

Test: Presubmit
Bug: 343882478
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ib827564cacd194f499e7d9b1965e2bb13e3548ab
2025-02-24 11:59:53 -08:00
Ahmed Fakhry
dafc2d4c42 Add deskId to DesktopTask.
Now that `GroupedTaskInfo` propagates the `deskId` from
Shell (see ag/31825217), we need to plumb this value in
Launcher through `DesktopTask`.

Future CLs will use this value in Overview.

Bug: 395911284
Test: m, modified existing tests.
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I396250e0cac761c4c5f7e8b2d6cddbe68e646217
2025-02-21 17:50:13 +00:00
Sunny Goyal
c864281f3c Revert "Refactor all uses of DisplayController singleton INSTANCE"
Revert submission 31490053-DisplayControllRefactorForCD

Reason for revert: Leak is displayProvider

Reverted changes: /q/submissionid:31490053-DisplayControllRefactorForCD

Change-Id: Ib65150cdde765be009b5c4ce960f9fe025de9e60
2025-02-12 10:27:18 -08:00
Will Osborn
5f8b6206ce Refactor all uses of DisplayController singleton INSTANCE
And make DisplayController display id aware

Test: locally tested on Tangor
Flag: EXEMPT refactor
Bug: 392858637

Change-Id: I805cd7323c48a2988c95b9fda7f6cfe4c153860c
2025-02-12 10:46:34 +00:00
Anushree Ganjam
d158433769 Move RecentsModel to Dagger.
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: I0d459ee3fc012e8e371035071f1b32eb2483cdc5
2025-02-10 10:07:20 -08:00
Saumya Prakash
26bceb527e Merge "Avoid per task app icons in Taskbar for desktop mode" into main 2025-01-15 14:18:38 -08:00
Saumya Prakash
aabcfa27ae Avoid per task app icons in Taskbar for desktop mode
Until Taskbar multi instance support was in place, Taskbar would show
multiple icons for different instances of the same app in desktop mode.
Now this is no longer needed as taskbar has multi instance support, so
now there is only one icon per instance of an app of the same user.

Fix: 382589460
Test: Started several Chrome windows -> Taskbar has 1 icon for chrome
Flag: com.android.launcher3.enable_multi_instance_menu_taskbar
Change-Id: I2df4327dcdc9d221164055ebc33ff508273e7ef9
2025-01-13 22:37:25 +00:00
Sunny Goyal
ad61173ca2 Converting DesktopVisibilityController to a singleton
This avoids a persistant connection to TouchInteractionService from WMProxy,
which keeps the service alive all the time

Bug: 384896306
Test: Presubmit
Flag: EXEMPT bugfix
Change-Id: Id6fe59471c8c3f9874514f71126631f217ab610c
2024-12-30 12:54:19 -08:00
Sunny Goyal
5df843476c Moving sysproxy to kotlin
Bug: 385171800
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I9db2d4a2f7ff6e739e389ce0e076d5ea88adad5c
2024-12-19 17:22:00 -08:00
Toni Barzic
7bea1821d4 Adapt TaskbarOverflow tests to check items added overflow view
Adds a step to verify that TaskbarOverflowView items get set to the list
of the least recent tasks. Adds test cases for an edge case where
taskbar hits max number of items event without recent tasks
(b/379774843).
Has a fix for a further edge case where taskbar overflow view could be
created with a single item (in which case we can just show that item
directly).

Bug: 379774843
Flag: com.android.launcher3.taskbar_overflow
Test: atest TaskbarOverflowTest

Change-Id: I004676da3e17f26b8110d14d39589c84a9f384d8
2024-12-06 19:39:47 +00:00
Liran Binyamin
495fe1d255 Merge "Animate the bubble bar on dismiss" into main 2024-12-02 14:28:30 +00:00
Liran Binyamin
7e387fa505 Animate the bubble bar on dismiss
When the last remaining bubble is dismissed by drag or from the menu
we now fade out the bubble bar.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 347062801
Test: manual
       - create a single bubble in the bar
       - expand
       - dismiss by drag or from menu
       - observe animation
Change-Id: I86fcaf04c6f5949126744b81e0042b0e58318a13
2024-11-27 16:23:26 -05:00
Artsiom Mitrokhin
7205b24938 Ignore events that occur between app icons on the taskbar
Bug: 297325541
Flag: com.android.launcher3.show_taskbar_pinning_popup_from_anywhere
Test: manual, flip the flag, long-click between taskbar items
Change-Id: If2ee00f31fcd1788bac2c2c0cd78ba1eada86115
2024-11-21 16:38:32 -05:00
Toni Barzic
7a0191e753 Add unit tests for taskbar overflow
The tests verify that number of icons in the task bar does not go beyond
the intended max number, that the taskbar remains centered as it hits
max number of icons, and maintains a minimal margin to the display
edges.
Also, has a test that the max naumber of icons and the taskbar margins
adapt as bubble bar visibility chages.

Adds a TestRule to mock the recents model in the taskbar window sandbox.
The mocked recents model is used to add fake running app icons to the
taskbar.

Bug: 368119679
Test: atest TaskbarOverflowTest
Flag: EXEMPT test only

Change-Id: I8d033c3e95d7c0a4b139502cd7d70882482117c0
2024-11-20 01:48:54 +00:00