Commit Graph

1232 Commits

Author SHA1 Message Date
Cosmin Băieș
33f8bfbadf Add IME switch button long click support
This adds support for handling long clicking on the IME switch button.
Initially it will behave exactly like short clicking, i.e. show the IME
switcher menu.

Flag: android.view.inputmethod.ime_switcher_revamp
Test: atest
  TaskbarNavButtonControllerTest#testPressImeSwitcher
  TaskbarNavButtonControllerTest#testLongPressImeSwitcher
Bug: 311791923
Change-Id: Ibd0d6bce2bab11511bc082f46731ec86038c8cf8
2024-07-11 11:42:16 +02:00
Alex Chau
0ac34a3388 Add use case for split animation to retrieve thumbnail
Fix: 349120849
Test: TaskSplitAnimationHelperTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I7d4bcbdbeacd56356c71eb18c73ceef8446011d1
2024-07-10 09:37:33 +00:00
Treehugger Robot
6f7be465c0 Merge "Taskbar running apps: show one icon per task + tap opens that task" into main 2024-07-09 19:01:02 +00:00
Gustav Sennton
f3108c59ed Taskbar running apps: show one icon per task + tap opens that task
Before this CL we would show only one Taskbar icon per app, making it
impossible (through the taskbar) to switch between several windows of
the same app.
With this CL we add one icon per task instead, making it possible to
bring each task to the front individually.

Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Bug: 351118893
Bug: 349790805
Bug: 351156858
Test: Started several Chrome windows -> taskbar has one icon per window

Change-Id: Ia692977effceb9ce339906bf6ca24d73e19d8769
2024-07-09 14:48:04 +00:00
Vinit Nayak
71c9a887c9 Merge "Add divider bg placeholder to app pair icon launch" into main 2024-07-09 04:18:56 +00:00
Shamali P
012ad2fc07 Align the launch location passed to prediction session
Matches the prediction helper (the prediction service ignores added
widgets if launch location doesn't match the pattern. The size / pos
details however aren't used, so we pass defaults.

With this, prediction service may be able to predict widgets that
aren't already added, hence providing more suggestions.

Bug: N/A
Test: Unit test
Flag: EXEMPT BUGFIX
Change-Id: Ieaba4c9a8354dc96ea2bc70cafa106978037c572
2024-07-08 19:56:47 +00:00
Treehugger Robot
892d358394 Merge "Make DeskopTaskView use latest TTV" into main 2024-07-08 12:05:53 +00:00
Alina Zaidi
f9fc3cf180 Merge "[Dev option] Move DesktopModesStatus to wm/shell/shared/desktopmode from wm/shell/shared/" into main 2024-07-08 09:49:20 +00:00
Alex Chau
3fde467b41 Make DeskopTaskView use latest TTV
- Made TaskThumbnailViewDeprecated nullable in TaskContainer, with non-null getter that requires feature flag to be on/off
- Removed TaskThumbnailViewDeprecated.setTaskOverlay, as it'll now be null with feature flag on
- Removed TaskThumbnailViewDeprecated from DesktopTaskView xml
- Simplifed DesktopTaskView binding logic, to always get thumbnailViews from viewPool, removeView and recycle all thumbnailViews in onRecycle
- Didn't implement view pooling of TaskThumbnailView due to difficulty with TaskContainer not being recycled togetehr with TaskThumbnailView

Bug: 338360089
Test: TaskThumbnailViewModelTest
Test: manual testing for DesktopTaskView for both enable_refactor_task_thumbnail on and off
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I38a6dfc6bc561689578d1660794f91d30bad4a68
2024-07-05 18:39:56 +01:00
Alina Zaidi
05cc31a613 [Dev option] Move DesktopModesStatus to wm/shell/shared/desktopmode from
wm/shell/shared/

Test: not needed, just refactoring. mp droid builds
Bug: 348193756
Flag: EXEMPT just refactoring
Change-Id: I6dd19f4203a2336f50bc26ac5b292057bb79ce37
2024-07-05 11:12:35 +00:00
Treehugger Robot
a00c81c173 Merge "Change thumbnail/icon to get the image rather than updating it" into main 2024-07-04 17:13:37 +00:00
Uwais Ashraf
551927c6d3 Change thumbnail/icon to get the image rather than updating it
Flag: EXEMPT no-op refactor
Bug: 334826842
Test: existing screenshot tests
Test: Manual - checked icon loading
Change-Id: Ie1da708f911ba569d6464f338dc4efac92420268
2024-07-04 12:18:56 +00:00
Brian Isganitis
f7ca8d60be Merge changes I6e7c349d,If6c74b3b,Ib276e9dc,Ida0f7cc0 into main
* changes:
  Override DisplayController on main thread.
  Add annotations for manipulating secure settings.
  Don't use UiThreadTest for Taskbar Unit tests.
  Suspend Launcher taskbar while removed for tests.
2024-07-04 02:26:46 +00:00
Treehugger Robot
564209829d Merge "Prevent taskbar icon tooltip from showing on hotseat transition." into main 2024-07-03 23:06:44 +00:00
Vinit Nayak
afdd0d3b31 Add divider bg placeholder to app pair icon launch
* Extract out both the top level split root leash
as well as the left and right split root leashes
* Set windowCorner radius on the left/right roots

Test: No more flicker near divider when launching app
pair (see comment for video in CL)
Flag: EXEMPT bugfix
Bug: 349387413

Change-Id: I6fce290d1e7766e55c2f11cc8c365f0c29087c0f
2024-07-03 11:27:41 -07:00
Treehugger Robot
ff4f1624a9 Merge "Support TaskOverlay with new TaskThumbnailView" into main 2024-07-03 15:01:51 +00:00
Alex Chau
58e8109d6e Support TaskOverlay with new TaskThumbnailView
- Also migrated getScaledInsets method into TaksOverlay

Bug: 335606129
Test: TaskOverlayViewModelTest
Test: TaskOverlayHelper is not tested because it should be a view-based screenshot test for TaskOverlay, which is currently impossible until we refactor TaskOverlay to MVVM
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I07a8657ff0fe925d8021875310e3ed12a712ba7a
2024-07-03 14:15:09 +01:00
Pat Manning
fc1d2daa63 Prevent taskbar icon tooltip from showing on hotseat transition.
Fix: 350512938
Test: TaskbarHoverToolTipControllerTest
Flag: EXEMPT bugfix
Change-Id: Ifc1647834358366b2d98555138edd4ad6286c16e
2024-07-03 13:15:36 +01:00
Treehugger Robot
58f5d08d7a Merge "Show tooltip for AppPairs in taskbar on hover." into main 2024-07-03 12:09:40 +00:00
Brian Isganitis
bfa3b7c80e Override DisplayController on main thread.
Bug: 230027385
Flag: TEST_ONLY
Test: TaskbarModeRuleTest
Change-Id: I6e7c349d50c8372ed0d4e1e8d5bfe7f108b2c2e2
2024-07-02 21:46:07 -04:00
Brian Isganitis
160ed1d31a Add annotations for manipulating secure settings.
By default, tests will run with user setup complete and kids mode
disabled.

Test: TaskbarUnitTestRuleTest
Flag: TEST_ONLY
Bug: 230027385
Change-Id: If6c74b3b2c07aa0eac5b6bda933b565351d65188
2024-07-02 21:46:05 -04:00
Brian Isganitis
8e5de6577b Don't use UiThreadTest for Taskbar Unit tests.
This annotation also runs the rule on the main thread, which can lead to
deadlocks with other threads (e.g. loading the model synchronously).

Change-Id: Ib276e9dc322f6f65bd32658e774d6076efb94f2e
Flag: TEST_ONLY
Test: Taskbar Unit Tests
Bug: 230027385
2024-07-02 21:45:23 -04: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
Pat Manning
0e89070e1a Show tooltip for AppPairs in taskbar on hover.
Fix: 350744397
Test: TaskbarHoverToolTipControllerTest
Flag: EXEMPT bugfix
Change-Id: Ic2273f17d01d1068ceaddca8a5c115b551b35856
2024-07-02 18:22:44 +01:00
Treehugger Robot
6bf444c3c9 Merge "Only commitRunningAppsToUI if shownTasks changed" into main 2024-07-02 09:07:41 +00: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
Tony Wickham
7829a1ced2 Only commitRunningAppsToUI if shownTasks changed
- Add GroupTask and DesktopTask equals() (with tests)
- Add tests to verify multiple onRecentTasksChanged
  doesn't commitRunningAppsToUI if there's no change
- Add tests to verify commitRunningAppsToUI is still
  called if minimized or running apps set changes

Bug: 348802109
Bug: 348787176
Test: TaskbarRecentAppsControllerTest
Test: GroupTaskTest
Test: log TaskbarView#onMeasure() locally, ensure it is called
much less despite noisy onRecentTasksChanged callbacks
Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps

Change-Id: I3efff7f4492272f88aa2bdbd7cc45bd2bf8156f6
2024-06-28 21:54:37 +00:00
Alex Chau
50293c5227 Merge "Extract TaskContainer to its own class" into main 2024-06-28 12:16:17 +00:00
Brian Isganitis
cc44113e57 Add context for sandboxing Taskbar window contexts.
Otherwise, the contexts leave the sandbox, which blocks testing.

Test: TaskbarWindowSandboxContextTest
Bug: 230027385
Flag: TEST_ONLY
Change-Id: I4c7a60858821c8959be2c82dc61a83b7e2f4d1ed
2024-06-27 18:32:26 -04:00
Brian Isganitis
c0da543553 Add tests for TaskbarUnitTestRule.
Test: TaskbarUnitTestRuleTest
Bug: 230027385
Flag: TEST_ONLY
Change-Id: I1c17b7f04920676cdfbe481b9435ff5d842181d1
2024-06-27 18:32:26 -04:00
Brian Isganitis
c2bb120a87 Have recreateTaskbar perform recreate on UiThread.
Test: Taskbar{AllApps,Overlay}ControllerTest
Bug: 230027385
Flag: TEST_ONLY
Change-Id: I663e5ad7bb37e73381e2ef9d787c80177cfdf7a7
2024-06-27 18:32:26 -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
Vinit Nayak
8c307e249c Promote testSplitAppFromHomeWithItself to presubmit
Flag: EXEMPT test promotion
Bug: 295225524
Change-Id: Ia8615f2380fc5aa27316ecc8a4ff567ac3facb42
2024-06-27 18:37:27 +00:00
Liran Binyamin
fde4fdc472 Merge "Add a new bubble at limit while expanded" into main 2024-06-27 17:26:34 +00:00
Vinit Nayak
d900d39412 Merge "Add set correct window corner radius on split invocation animation leashes" into main 2024-06-27 16:42:54 +00:00
Liran Binyamin
2e1dd4644b Add a new bubble at limit while expanded
Handles adding a new bubble and removing an old bubble when the bar
is expanded and at the limit.

Demo when bar is on right: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/dxhFKrctdR5I2F6Pvho6u8
Demo when bar is on left: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/er4ZGQfg8OKHZ2aTi9OJ9N

Flag: com.android.wm.shell.enable_bubble_bar
Test: demos
Test: atest BubbleViewAnimatorTest
Fixes: 345795791
Change-Id: I4e75d61c8afdb81340823a1d77e55b15e3fd6bc0
2024-06-27 10:36:16 -04:00
Alex Chau
8474edcf13 Extract TaskContainer to its own class
Bug: 335606129
Test: Manual
Flag: EXEMPT refactor
Change-Id: I0ac924652079c69737cd37a9233080b432ecc16e
2024-06-27 14:26:14 +01:00
Vinit Nayak
093978a6ba Add set correct window corner radius on split invocation animation leashes
Test: Enter split anim from overview on phone is smoother than
Michael Jackson's moonwalk
Bug: 349387413
Flag: EXEMPT bugfix

Change-Id: I01fd1eee6fe111623a22dd6aaf130837ebbdeeb1
2024-06-27 03:58:42 +00:00
Vinit Nayak
09f06c29da Merge "Promote testSplitTaskTapBothIconMenus to presubmit" into main 2024-06-27 03:35:47 +00:00
Vinit Nayak
233ab23db3 Promote testSplitTaskTapBothIconMenus to presubmit
Bug: 288939273
Flag: EXEMPT test
Change-Id: I8aec88fbba33dd94afd348ebc4ebcb9b75ab3c04
2024-06-27 03:35:34 +00:00
Treehugger Robot
2f90296717 Merge "Use snapshotView references in TaskContainer when possible" into main 2024-06-26 18:01:54 +00:00
Alex Chau
c06bc41ee0 Use snapshotView references in TaskContainer when possible
- Moved majority of TaskContainer.thumbnailViewDeprecated usage to TaskContainer.snapshotView, so they'll cover the new TaskThumbnailView as well
- There are afew location left that will be handled as a follow-up
- Removed TaskThumbnailView's splitTranslation and use translation directly as it's the only translation we use

Bug: 336612373
Test: Ensure all Task CUJs still work without refacorting
Test: Ensure major Task CUJs work with refactoring
Flag: EXEMPT refactor
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ieb52236bc503ce0d0a511249978c1821a82d406e
2024-06-26 16:07:57 +01:00
Treehugger Robot
ab26fef0f2 Merge "Ignore minimized Desktop apps in Overview." into main 2024-06-26 10:52:29 +00:00
Gustav Sennton
d06e8dc8a3 Ignore minimized Desktop apps in Overview.
For each desktop session, Overview shows a single tile with multiple
desktop tasks. With this CL avoid showing minimized tasks in that tile.

Bug: 333013317
Flag: com.android.window.flags.enable_desktop_windowing_mode
Test: manual: ensured minimized desktop tasks are not shown in Overview

Change-Id: I48cb6826849abf225c0fe4448ca7b0b13afea44e
2024-06-26 08:53:15 +00:00
Brian Isganitis
1812030be0 Merge "Take in test instance as field." into main 2024-06-25 23:02:32 +00:00
Brian Isganitis
a07a7c2f91 Take in test instance as field.
This refactor makes it simpler for the rule to keep track of the test
instance (immutable). Having the rule be a TestRule instead of a
MethodRule also simplifies nesting TestRules within this implementation
(future CLs).

Test: Taskbar{AllApps,Overlay}ControllerTest
Flag: EXEMPT refactor
Bug: 230027385
Change-Id: Icf587202242fcb4526946d9c7619e5be4f59154e
2024-06-25 17:16:35 -04:00
Brian Isganitis
5ee679dbb8 Merge "Introduce TestRule for setting Taskbar mode." into main 2024-06-24 20:17:24 +00:00