Commit Graph

169 Commits

Author SHA1 Message Date
Sukesh Ram 5d8e6bcdee [CD Taskbar] New NavigationBarPanelContext per instance of taskbar
Create a new New NavigationBarPanelContext per instance of taskbar object for each new instance of taskbar.

Test: m
Bug: 394421505
Flag: EXEMPT not adding new behavior
Change-Id: I6c82140fac9e6a00f0462ea1a593c13f49c3deee
2025-02-04 18:08:25 -08:00
Treehugger Robot 5c11f67ca3 Merge "[CD Taskbar] Refactor TaskbarManager - Make Window Contexts also follow map pattern" into main 2025-01-31 18:02:23 -08:00
Sukesh Ram 2f74082b3b [CD Taskbar] Refactor TaskbarManager - Make Window Contexts also follow map pattern
Make Window Contexts also follow map pattern.

Flag: EXEMPT not adding new behavior
Bug: 391706879
Test: Manual
Change-Id: Ib0672e653b9dbfcb3597210ca244f110515cd4dc
2025-01-31 21:53:46 +00:00
Lingyu Feng b06120f793 Merge "Rename onDisplayReady to onDisplayAddSystemDecorations" into main 2025-01-29 17:24:01 -08:00
Sukesh Ram d3d6ed0cb2 Add debugging logs to understand why addView gets IllegalArgumentException
Add debugging logs to understand why addView gets IllegalArgumentException

Flag: EXEMPT not adding new behavior
Bug: 391653300
Test: Manual
Change-Id: Ieeae2333dc52d3eab3a11cecc9f382d1cd73f94c
2025-01-28 14:33:26 -08:00
Lingyu Feng 9d98fb90c0 Merge "Add onDisplayRemoveSystemDecorations to TouchInteractionService" into main 2025-01-26 17:30:49 -08:00
Treehugger Robot 9bc36997c4 Merge "[CD Taskbar] [CD Taskbar] Refactor TaskbarManager dump" into main 2025-01-23 18:37:03 -08:00
Sukesh Ram 28b7077a38 Add debugging logs to understand why taskbar root layout would be null
Add debugging logs to understand why taskbar root layout would be null.

Flag: EXEMPT not adding new behavior
Bug: 382378283
Test: Manual
Change-Id: I1140360274667a6c3766f03e1f5f1592c09e13e1
2025-01-23 16:05:07 -08:00
Sukesh Ram 7d916904de [CD Taskbar] [CD Taskbar] Refactor TaskbarManager dump
Update debugging logs for TaskbarManager to be display specific.

Flag: EXEMPT not adding new behavior
Bug: 390004132
Test: Manual
Change-Id: I0222e3bce94bee410b3572d1bc820cc71a2c1a68
2025-01-23 14:28:00 -08:00
Lingyu Feng 779bd3cd46 Add onDisplayRemoveSystemDecorations to TouchInteractionService
onDisplayRemoveSystemDecorations() is a new method in IOverviewProxy.aidl

Bug: 352461502
Flag: com.android.server.display.feature.flags.enable_display_content_mode_management
Test: manually (adb shell settings put secure mirror_built_in_display
{1|0})

Change-Id: I42d96ef27fd62d35ae1ca6134bd74752de3a2b5d
2025-01-23 01:30:20 -08:00
Lingyu Feng 156c69bd2a Rename onDisplayReady to onDisplayAddSystemDecorations
Bug: 390591772
Flag: com.android.server.display.feature.flags.enable_display_content_mode_management
Test: m
Change-Id: I7fe025275894ed21166be41855ab93f434b1de73
2025-01-23 10:38:15 +09:00
Sukesh Ram 7ad500b716 Merge "[CD Taskbar] Refactor to Listen to Display Ready/Removed Signals" into main 2025-01-16 10:03:34 -08:00
Treehugger Robot 94ebc5400d Merge "Add SysUiProxy method to start transition on desktop task launch." into main 2025-01-16 01:06:22 -08:00
Vania Desmonda 5d50fbb6c9 Add SysUiProxy method to start transition on desktop task launch.
This forces the task to correctly start the TRANSIT_OPEN transiiton in
Desktop mode when launching an intent from the taskbar and prevent it
from opening in full screen.

Fixes: 361366053
Test: manual test
Flag: EXEMPT bugfix
Change-Id: I6d59705aa55745c3425266dacbb012dd4e2b1b03
2025-01-15 18:54:04 -08:00
Sukesh Ram bd82d83358 [CD Taskbar] Refactor to Listen to Display Ready/Removed Signals
Allow for TaskbarManager to listen to the TaskbarDelegate signals for the addition and removal of displays in extended mode.

Flag: EXEMPT not adding new behavior
Bug: 382351718
Test: Manual
Change-Id: I1d78400966755ed462d3d92d9356e40fa61ada32
2025-01-15 23:28:10 +00:00
Sunny Goyal 55dc2d1c31 Moving DisplayController to dagger
Separating various overrides to individual modules so that they can be reused in tests

Removing ContextualEduStatsManager and directly using SysUiProxy as all the usescases
are only in quickstep/
This avoids additional Module definition and delegation

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I096459d638553991ed01766002b874589c6b976e
2025-01-14 11:40:35 -08: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
Treehugger Robot 10d808ffa3 Merge "[CD Taskbar] Set correct window type for TaskbarActivityContext on primary/secondary displays" into main 2024-12-19 16:58:17 -08:00
Treehugger Robot de2e748cc6 Merge "[CD Taskbar] Pass displayId to TouchInteractionService for per-display wallpaper updates" into main 2024-12-19 16:26:54 -08:00
Sukesh Ram bdd44ef1cc [CD Taskbar] Set correct window type for TaskbarActivityContext on primary/secondary displays
Modified TaskbarActivityContext to be aware of the display it's on (primary or secondary). This allows it to set the correct layoutParams.windowType for the Taskbar view, using TYPE_NAVIGATION_BAR for the primary display (the standard Taskbar) and TYPE_NAVIGATION_BAR_PANEL for secondary displays.

Bug: 385202874
Test: Manual
Flag: EXEMPT not adding behavior
Change-Id: I5addf45b6099d3ddcf8315a541b69d2f67bace7d
2024-12-19 14:57:22 -08:00
Sukesh Ram cb5ce3c3ec [CD Taskbar] Pass displayId to TouchInteractionService for per-display wallpaper updates
Modified TouchInteractionService.updateWallpaperVisibility() to accept a displayId parameter. This allows TaskbarManager to apply wallpaper visibility changes (e.g., dimming) on a per-display basis, ensuring correct behavior with multiple connected displays.

This change addresses the issue where wallpaper dimming was not being applied correctly on secondary displays when the Taskbar was visible.

Bug: 385200423
Test: Manual
Flag: EXEMPT not adding behavior
Change-Id: I72ddeb6df29f84c16f91d5c6de446266bee98342
2024-12-19 14:37:36 -08:00
Sukesh Ram fb55f96506 [CD Taskbar] Refactor TaskbarManager - Make mAddedWindow display-specifc
Create SparseBooleanArray to ensure that with connected displays, there is support for multiple RootLayouts, which each a variable tracking whether they have been added to the window or not.

Flag: EXEMPT not adding new behavior
Bug: 384793943
Test: Manual
Change-Id: I18849d033cada181eadf89c86d3c02d87a8ee962
2024-12-18 21:10:57 -08:00
Sukesh Ram 23470e8832 [CD Taskbar] Refactor TaskbarManager to create object creation methods
Every object that needs its own instance for an instance of a new display-specific taskbar needs its own creation method.

Flag: EXEMPT not adding new behavior
Bug: 381105283
Test: Manual
Change-Id: I24794fefbf2a64f38795eca970cf30eb63c51e66
2024-12-05 15:39:10 -08:00
Andy Wickham 28d920ef05 Merge changes from topic "rm-lph-flag" into main
* changes:
  Make ContextualSearchInvoker not a ResourceBasedOverride.
  End live tile when invoking Circle to Search over Overview.
2024-11-27 23:32:29 +00:00
Andy Wickham 2ae01adf71 Make ContextualSearchInvoker not a ResourceBasedOverride.
This was previously only used to honor the INVOKE_OMNI_LPH flag
which has been enabled for a long time. So this is part of that
cleanup.

Bug: 297561673
Test: Manual
Flag: EXEMPT deleting legacy flag
Change-Id: Ife9f14faa2099f579f631da2aadaa6a56cbba51d
2024-11-27 13:03:18 -08:00
Sukesh Ram 7516dd06d5 [CD Taskbar] Refactor TaskbarManager to store TaskbarRootLayouts in a map
Refactor the TaskbarManager's existing usages of TaskbarRootLayouts to use a map, so that there can be a 1:1 relationship between TaskbarRootLayouts and TaskbarActivityContexts.

Flag: EXEMPT not adding new behavior
Bug: 380351840
Test: Manual
Change-Id: Ib4379a9b6d50b8bdd64b70d7b15ce798ebb42731
2024-11-22 14:30:49 -08:00
Sukesh Ram d4fb56f36b Merge "[Taskbar CD] Refactor TaskbarManager for Multiple TaskbarActivityContexts" into main 2024-11-21 18:09:41 +00:00
Sukesh Ram d138ce959b [Taskbar CD] Refactor TaskbarManager for Multiple TaskbarActivityContexts
Refactor the TaskbarManager to support multiple TaskbarActivityContexts.

Flag: EXEMPT not adding new behavior
Bug: 362720616
Test: Manual
Change-Id: I1baa081f6994cb94465f20aa7e0c6b47f5cb7eb8
2024-11-20 18:56:25 -08:00
Brian Isganitis 01eb1e037b Add annotation to simulate RTL in tests.
Flag: TEST_ONLY
Bug: 230027385
Test: go/testedequals
Change-Id: Idc4ca404179359a6dc4fac160b7a865c5709f137
2024-11-15 15:09:37 -05:00
Jagrut Desai 585de4e0e9 Merge "Fix ActivityLeak for RecentsViewContiner in TaskbarManager" into main 2024-11-06 21:15:25 +00:00
Jagrut Desai dbceb92317 Fix ActivityLeak for RecentsViewContiner in TaskbarManager
Test: presubmit
Bug: 376763663
Flag: EXEMPT TEST_ONLY
Change-Id: I9724e9d91e9ab1a414ce2fbcb6a618b5b23f7ab1
2024-11-06 10:15:00 -08:00
Sukesh Ram 29a430fc21 [Connected Displays in Taskbar] Refactor TaskbarDelegate for Display Signals
Refactor the TaskbarDelegate to support multiple pass down displayId specific signals down to the taskbar level.

Flag: EXEMPT not adding new behavior
Bug: 376128251
Test: Manual
Change-Id: I61aef4eb746d671be69eefeb15d876d48dd9a8fa
2024-11-05 00:48:43 +00:00
Tony Wickham 0f954d9d3b Merge "TaskbarManager now sets TaskbarUIController for RecentsWindowManager" into main 2024-10-31 20:17:21 +00:00
Tony Wickham 87455f28fc TaskbarManager now sets TaskbarUIController for RecentsWindowManager
- FallbackTaskbarUIController can take in a generic
  RecentsViewContainer parameter, i.e. RecentsActivity or
  RecentsWindowManager.
- When changing Overview targets to RecentsWindowManager, which is not
  an Activity, we still update the TaskbarUIController

Test: Switch between default Home activities with the flag on and off,
ensure Taskbar works as expected in each case (3P vs 1P launcher).
Flag: com.android.launcher3.enable_fallback_overview_in_window
Fixes: 368030750
Fixes: 365775636

Change-Id: Ife775e8c226f8c73ec9e1f97b4a6f2972f6c905f
2024-10-30 20:21:26 +00:00
Brian Isganitis bab87b1551 Stop suspending Launcher Taskbar in tests.
The Taskbar under test should now be sufficiently isolated from
Launcher, so we no longer have to suspend it.

Flag: TEST_ONLY
Bug: 230027385
Test: go/testedequals
Change-Id: I20cff11c90208b59f1dca3730ec3978913c43a50
2024-10-29 19:15:58 -04:00
Andy Wickham 9605643883 Merge "Migrate Contextual Search code to AOSP" into main 2024-10-15 00:47:02 +00:00
Andy Wickham 0b936727d6 Migrate Contextual Search code to AOSP
- Adds ContextualSearchInvoker
 - Adds ContextualSearchStateManager
 - Adds ContextualSearchHapticManager

Example output from ContextualSearchStateManager
in TouchInteractionService dump:
https://paste.googleplex.com/5536017815961600

Bug: 353715553
Test: go/contextual-search-entrypoints-test-plan
Flag: EXEMPT moving code from vendor to aosp

Change-Id: I8253294d6be427e0fc29d6052994de0c03f05a3e
2024-10-10 21:03:42 +00:00
Brian Isganitis 066f5adcf6 Run Taskbar controller tests on VirtualDisplay.
Flag: TEST_ONLY
Test: go/testedequals
Bug: 369641781
Change-Id: Id53f420e7edc1779da9eb7647644ffffb74e67b3
2024-10-10 19:13:40 +00:00
helencheuk 5012640ab2 [Contextual Edu] Update Edu stats when going to overview and all apps from home
Update education stats when
- go overview and all apps by swiping up at homepage (AbstractStateChangeTouchController)
- go home from all apps by swiping down the all apps panel (AbstractStateChangeTouchController)
- go home from all apps or overview by swiping up from the bottom nav bar (NavBarToHomeTouchController)
- in 3 button navgiation mode (TaskbarNavButtonController)

NavBarToHomeTouchController does not inherit from AbstractStateChangeTouchController so logic are added separately.

Bug: 363480554
Test: TaskbarNavButtonControllerTest
Flag: com.android.systemui.keyboard_touchpad_contextual_education
Change-Id: I0662704a9093b9f5a4d2f086a8297429fbc49881
2024-09-17 16:00:24 +01:00
Treehugger Robot 206e15b286 Merge "Move DesktopVisibilityController to TouchInteractionService" into main 2024-09-12 02:32:00 +00:00
Schneider Victor-Tulias 2b46c945a7 Move DesktopVisibilityController to TouchInteractionService
Moved DesktopVisibilityController to TIS for 3P launcher support.

Flag: EXEMPT bug fix
Fixes: 338063030
Fixes: 357859025
Test: Launched overview and resumed desktop task from desktop mode on 1P and 3P launchers
Change-Id: I64e99a32ed13bcb6e4a81a18c29df2643373dc35
2024-09-11 09:56:35 -07:00
Tracy Zhou 7b30d2d102 Pipe appTransition signal to taskbar to pause region sampling when it's ongoing
Bug: 361593564
Test: https://android-build.corp.google.com/builds/abtd/run/L78300030006280283
Flag: EXEMPT bugfix
Change-Id: Ib874e2b44c1cc59280da1250fd35f01572c39221
2024-09-08 21:50:18 -07:00
Tracy Zhou a54e490eb1 notifyTaskbarStatus in taskbar phone mode
This fixes notification shade not being able to swipe up to the edge during animation because it listens to the task bar visibility signal

Fixes: 352365691
Test: https://b.corp.google.com/issues/352365691#comment28
Flag: com.android.wm.shell.enable_taskbar_on_phones
Change-Id: I10d6f49d087dd85b3a8bc5894f76f5d46ba4a865
2024-08-20 20:39:41 +00:00
Fengjiang Li b87ad6f945 [Launcher Jank] Improve SimpleBroadcastReceiver.java
Bug: 348649441
Flag: NONE - jank fix
Test: manual - presubmit
Change-Id: I17bd7e4d7f0640522476e94edae691f983835f62
2024-07-11 11:12:29 -07:00
Brian Isganitis 8f1a1c4b6a Suspend Launcher taskbar while removed for tests.
This approach is less destructive than completely destroying Taskbar
while still ensuring it will not try to recreate itself.

Test: Taskbar Unit Tests
Bug: 230027385
Flag: TEST_ONLY
Change-Id: Ida0f7cc0b9c5b1d53bbadc2bb9fd81689c7f3940
2024-07-02 21:42:23 -04:00
Brian Isganitis 3ad18b451a Merge "Revert "Completely destroy Launcher's Taskbar."" into main 2024-07-02 23:20:58 +00:00
Brian Isganitis e1a2b67f2b Revert "Completely destroy Launcher's Taskbar."
Revert submission 28102205

Reason for revert: Potential test breakage.

Reverted changes: ag/28102205

Change-Id: If7fa1ff192a240e753e5c245d591d46e594e5a6f
Flag: TEST_ONLY
Bug: 230027385
Test: Presubmit
2024-07-02 17:00:11 -04:00
Brian Isganitis 035a25c9a7 Merge changes I18245c22,I4c7a6085,I1c17b7f0,I663e5ad7,I9199fd92 into main
* changes:
  Completely destroy Launcher's Taskbar.
  Add context for sandboxing Taskbar window contexts.
  Add tests for TaskbarUnitTestRule.
  Have recreateTaskbar perform recreate on UiThread.
  Move test rules to subpackage.
2024-07-01 16:41:17 +00:00
Brian Isganitis 326ae5e3d1 Completely destroy Launcher's Taskbar.
Just removing it temporarily from the window manager is insufficient.
Taskbar can attempt to recreate itself due to many callbacks being
invoked during tests such as the settings changing. After the tests
finish, the launcher process will restart anyways so taskbar will come
back automatically.

Flag: TEST_ONLY
Test: TaskbarUnitTestRule tests
Bug: 230027385
Change-Id: I18245c224f6d2ffc78d8bf80d30275429074f9b5
2024-06-28 18:38:23 -04:00
Brian Isganitis e7e98985f7 Move test rules to subpackage.
Test: Compiles
Flag: EXEMPT refactor
Bug: 230027385
Change-Id: I9199fd92450180fa10673c3072dd6e8312fd24d6
2024-06-27 18:32:26 -04:00