Commit Graph

173 Commits

Author SHA1 Message Date
Luca Zuccarini
0ad76ac07d Merge "Move some Shell utils to the Shared package." into main 2024-08-16 16:32:37 +00:00
Liana Kazanova (xWF)
4b4a045474 Merge "Revert "Synchronize bar expansion with WM Shell"" into main 2024-08-14 19:08:26 +00:00
Liana Kazanova (xWF)
799802cb7e Revert "Synchronize bar expansion with WM Shell"
Revert submission 28703070-bubbles-defer-expand

Reason for revert: DroidMonitor. Potential culprit for b/359765550 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:28703070-bubbles-defer-expand

Change-Id: I5651cc8f740b1f0718abcfa8065e18c174657224
2024-08-14 16:58:12 +00:00
Liran Binyamin
f544f7f164 Merge "Synchronize bar expansion with WM Shell" into main 2024-08-14 06:37:38 +00:00
Helen Cheuk
801f86ecac Merge "[Contextual Edu] Enable updating Edu data in Launcher" into main 2024-08-13 12:52:02 +00:00
Uwais Ashraf
d39bc803c7 Merge "Improve performance of thumbnail retrieval - hot taskData flow" into main 2024-08-13 10:59:32 +00:00
Uwais Ashraf
60b62d734d Improve performance of thumbnail retrieval - hot taskData flow
Bug: 357542209
Test: TasksRepositoryTest, manual with reduced speed video
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ie94daf61d8e41c4b9c12d67f5f45166104879325
2024-08-12 16:49:24 +00:00
Liran Binyamin
9b559c48a3 Synchronize bar expansion with WM Shell
When a bubble is added and requested to be expanded, notify WM Shell
to show the expanded view when expansion actually starts on the
launcher side.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/cPZuf3STUqX9uFZ4zneRO2

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 339683389
Test: atest BubbleBarViewAnimatorTest
Change-Id: I0ba27acf8bae560a10b754241f8f2d8e3281cef9
2024-08-11 04:36:14 -04:00
Liran Binyamin
de9b1df642 Merge "Remove BubbleBarView.mIsAnimatingNewBubble" into main 2024-08-11 08:25:29 +00:00
helencheuk
39a6093369 [Contextual Edu] Enable updating Edu data in Launcher
- Added ContextualEduStatsManager (in Launcher3) and SystemContextualEduStatsManager(in Quickstep) to enable classes in Launcher3 and quickstep to update contextual edu data
- Implemented new updateContextualEduData method in SystemUiProxy file, so the EduStatsManager could use it for update
- AbsSwipeUpHandler handles the logic to go home/overview when in app. Added code to update contextual edu data when these action is triggered.

Test: LauncherSwipeHandlerV2Test
Bug: 357542123
Flag: com.android.systemui.keyboard_touchpad_contextual_education
Change-Id: I6fc5a285ba1a1d770c54cc7af444ff8b3051bd00
2024-08-09 13:38:21 +01:00
Jagrut Desai
6edc79057e Merge "Only run Taskbar related tests on foldables and tablets" into main 2024-08-08 23:59:56 +00:00
Jagrut Desai
1926d46784 Only run Taskbar related tests on foldables and tablets
Test: presubmit
Bug: 356409843
Flag: TEST_ONLY
Change-Id: I18d8f6e6c2c4ec7ec876c84a27466c883b1c0f71
2024-08-08 13:30:48 -07:00
Liran Binyamin
5eeff8d1e3 Merge "Support expanding the bar while animating" into main 2024-08-08 12:44:42 +00:00
Liran Binyamin
09c2ad248b Remove BubbleBarView.mIsAnimatingNewBubble
We now use BubbleBarViewAnimator directly to check if there's a new
bubble animation.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 339683389
Test: presubmit
Change-Id: I5f884095125e6226338aee14d9d08e46b87ff2ec
2024-08-08 07:49:04 -04:00
Liran Binyamin
46111b109e Support expanding the bar while animating
Update the BubbleBarAnimator to handle auto expanding bubbles as
well as expand signals that are received while animating the bubble
bar.

The expansion starts after the bar reaches its peak height. If the
hide animation starts before the expansion signal is received, we
ignore it.

Next step is to delay showing the expanded view until the bubble bar
starts expanding.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 353644484
Fixes: 356415377
Bug: 339683389
Test: atest BubbleBarViewAnimatorTest
Change-Id: I79a63f0b8728abc1ab3345f0116cbfcba2918643
2024-08-08 03:46:07 -04:00
Jagrut Desai
01d04c40dc Merge "Enable TaskbarEduTooltipControllerTests with rule ordering" into main 2024-08-07 17:55:02 +00:00
Jagrut Desai
6b39f2d40e Merge "Ignoring TaskbarEduTooltipControllerTests" into main 2024-08-06 23:15:06 +00:00
Jagrut Desai
5643f48bb8 Enable TaskbarEduTooltipControllerTests with rule ordering
Test: Presubmit
Bug: 356155191
Flag: TEST_ONLY
Change-Id: If4a03033424c07e37f2cb3f792e75a64a55fb67b
2024-08-06 14:11:38 -07:00
Jagrut Desai
3baa8a7f70 Ignoring TaskbarEduTooltipControllerTests
Test: Presubmit
Bug: 356155191
Flag: TEST_ONLY

Change-Id: I2aa0c0822ea4458484d7a04e38004ddc60f7c982
2024-08-06 13:04:47 -07:00
Alex Chau
67a1006f56 Use onTaskThumbnailChanged as sourced of truth for thumnbail override
- Both RecentsView.screenshotTask and RecentsView.updateThumbnail uses thumbnail that comes from recentsAnimationController.screenshotTask. recentsAnimationController.screenshotTask always results in TaskVisualsChangeListener.onTaskThumbnailChanged, which is a better source of truth to rely on rather than having 3 entry points for thumbnail override
- As a thumbnail objects from onTaskThumbnailChanged has the same snapshotId but are different instances, updated RecentsViewModel.waitForThumbnailsToUpdate to reflect that

Bug: 342560598
Test: RecentsViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I79b6e32224df4192e8df6930d87b222ed93bf8d8
2024-08-05 12:55:16 +01:00
Treehugger Robot
0e179ddc67 Merge "Fixes SettingsChangeLoggerTest failures" into main 2024-08-02 00:01:34 +00:00
Treehugger Robot
dae3f1d6ca Merge "Increase number of triggers for taskData reloading in TasksRepository" into main 2024-08-01 13:41:26 +00:00
Alex Chau
4c7dcc4b02 Increase number of triggers for taskData reloading in TasksRepository
- Simplified AbsSwipeUpHandler.switchToScreenshot to remove the unused refreshView=false parameter, so we RecentsView.updateThumbnail don't need to return a TaskView
- Changed TasksRepository.setThumbnailOverride to addThumbnailOverride, that'll accumulate overrides being sent to it
- Handled RecentsView.updateThumbnail to add an override to TasksRepository
- visibleTaskIds being sent to TasksRepository now take acccount of fileering out mTmpRunningTasks
- Updated a few TODOs around thumbnail/icon reloading

Bug: 342560598
Test: TasksRepositoryTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia892819c45f20e82fbda275fd0e39081d6362cb6
2024-08-01 12:42:00 +01:00
Mykola Podolian
fcde085beb Merge "Integrated new BubbleStashControllers into the existing code." into main 2024-07-31 16:43:17 +00:00
Luca Zuccarini
3cdabb8864 Move some Shell utils to the Shared package.
Bug: 322791067
Flag: EXEMPT move only
Test: NA
Change-Id: I8a827a200340fd1ee0168ed16c4f5223150a1795
2024-07-31 14:10:54 +00:00
mpodolian
484ff0fe9c Integrated new BubbleStashControllers into the existing code.
Integrated the PersistentTaskbarStashController and the
TransientTaskbarStashController into the launcher code. Made changes to
the TaskbarInsetsController to set appropriate touchable zones. Updated
the TaskbarUIController to not start the overview transition on clicks
for the collapsed bubble bar.

Bug: 346391377
Fixes: 350065038
Fixes: 355664783
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: com.android.launcher3.taskbar package tests

persistent taskbar and transient taskbar manual testing:
- on launcher home screen expand bubble bar, switch between bubbles,
remove bubble via bubble menu, add bubble, remove bubble with the drug
gesture, add bubble, collapse bubble bar
- repeat previous test on launcher overview screen and inside any
application
- after last test drag expanded bubble view to the opposite side of the
screen

Change-Id: I50f2c510854c4895fdfc9bd453a261c2103286fd
2024-07-30 18:36:05 -07:00
Alex Chau
e7a87f3fa8 Merge "Don't show splash when thumbnail is null in SplashAlphaUseCaseTest" into main 2024-07-30 10:44:50 +00:00
Alex Chau
2a640c61a7 Don't show splash when thumbnail is null in SplashAlphaUseCaseTest
- thumbnail is always null to begin with, and we don't want the splash icon to ever shown in Overview, so it should default to hidden

Fix: 356079562
Test: SplashAlphaUseCaseTestTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I2a010f911814fda2bbcf0ca7ebc7192580772076
2024-07-29 11:28:19 +01:00
Treehugger Robot
453734f09e Merge "Support switch to screenshot for TTV" into main 2024-07-27 00:14:26 +00:00
Jagrut Desai
65b5eb472e Merge "Unit Testing for TaskbarEduTooltipController" into main 2024-07-26 22:44:16 +00:00
Alex Chau
378622c907 Support switch to screenshot for TTV
- Moved live tile decision to TaskThumbnailViewModel, and added RecentsViewData for runningTask information
- Implemented a ThumbnailData override mechanism to override screenshot from TaskThunmbnailCache, the override will be added during switchToScreenshot and cleared when user exit recents (RecentsView.reset)
- During the thumbnail override, we wait until the new ThumbnailData propagates, before finsihing Recents animation to avoid a frame of flash

Bug: 343364498
Test: TaskThumbnailViewModelTest, TaskRepositoryTest, RecentsViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I776943ecdfa0d65d94b054692297b42686f59f8a
2024-07-26 21:25:58 +01:00
Andy Wickham
369a5e749b Merge "Add 2 stage LPNH tests." into main 2024-07-26 19:38:27 +00:00
Jagrut Desai
5af1bfbf52 Unit Testing for TaskbarEduTooltipController
This CL includes
	- TaskbarEduTooltipController Unit Test for all edu logic and hide tooltip
	- Test util class for taskbar controller test to run the test on main thread.
	- Refactored other controller test to use the new util function to run test on main thread.
	- Ability to disable running test in test harness mode.

Test: Presubmit
Bug: 346394824
Flag: TEST_ONLY
Change-Id: Ic623df8e7a58ac48d260e592ffab61d1f0658aef
2024-07-26 12:14:50 -07:00
Mykola Podolian
550927be44 Merge "Added TransientTaskbarStashController implementation." into main 2024-07-26 16:59:46 +00:00
mpodolian
a5cd1a0dbb Added TransientTaskbarStashController implementation.
Added TransientTaskbarStashController implementation of
BubbleStashController interface. Added tests for the implementation.

Bug: 346391377
Flag: com.android.wm.shell.enable_bubble_bar
Test: TransientTaskbarStashController
Change-Id: Ie302086d6b4aac48a948473908b68c2c436e4b30
2024-07-26 02:19:00 +01:00
Andy Wickham
e935438787 Add 2 stage LPNH tests.
Fix: 353613649
Test: NavHandleLongPressInputConsumerTest
Flag: TEST_ONLY

Change-Id: I99f4eb5f999d2769cc2d9e1eb1d04ae6c5ff27db
2024-07-25 23:21:16 +00:00
Treehugger Robot
4a6c90d552 Merge "Add unit tests for MultiStateCallback" into main 2024-07-25 17:43:24 +00:00
Liam, Lee Pong Lam
85f3476943 Fixes SettingsChangeLoggerTest failures
The mLoggablePrefs was created on constructor, so move the system under test out of setup because the preference change needs to be made before it.
For details: https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/quickstep/src/com/android/quickstep/logging/SettingsChangeLogger.java;drc=c56711c6691e7957ed98a9de6b3acb79103abb66;l=95

Bug: 354157494
Test: Unit tests
Flag: EXEMPT bugfix

Change-Id: I2fd5eec5b10d7463c663df03cfefefb11bcefecc
2024-07-25 17:18:15 +00:00
Uwais Ashraf
06dd94c66a Add splash state to new TTV
Bug: 334826842
Test: test classes added in CL
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia7c2de18b5ff932430946df6b4c27929d715e79c
2024-07-25 14:35:00 +00:00
Schneider Victor-tulias
dfeb22f7ab Add unit tests for MultiStateCallback
Flag: EXEMPT adding tests
Fixes: 355003429
Test: MultiStateCallbackTest
Change-Id: Id617ca79c44dcfa6226e47d574b9e3bfe6cfb140
2024-07-25 10:11:17 -04:00
Vinay Joglekar
fe7878c144 Merge "Dim TaskThumbnailView on Foreground scrim" into main 2024-07-25 13:03:49 +00:00
vinayjoglekar
36ef7bf6e7 Dim TaskThumbnailView on Foreground scrim
Bug: 349601769
Test: TaskThumbnailViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I3a9fa21d8a4c28ffe40279243030f0e47c957513
2024-07-25 11:18:20 +01:00
Andy Wickham
75ce1a2cd6 Move TestExtensions.kt to quickstep for DeviceConfig overrides.
Fix: 353740808
Test: Run existing tests using this class
Flag: TEST_ONLY
Change-Id: Ie72fb86ea4d451e90a6629554dc717126db0b24c
2024-07-24 00:15:05 +00:00
Treehugger Robot
ea4373c060 Merge "Add NavHandleLongPressInputConsumerTest." into main 2024-07-23 23:20:47 +00:00
Treehugger Robot
e3078707a0 Merge "Move more tests to deviceless" into main 2024-07-23 23:16:08 +00:00
Mykola Podolian
126be5629b Merge "Added BubbleStashController interface" into main 2024-07-23 21:37:31 +00:00
Anushree Ganjam
7c32ae9acf Move more tests to deviceless
Bug: 353339741
Test: Manual
Flag: TEST_ONLY
Change-Id: Ib43d5a17feb812b08d9749b1bf6dcacabf205d47
2024-07-23 13:57:28 -07:00
Liam, Lee Pong Lam
80ffa83957 Fixes SettingsChangeLoggerTest failures
To revert the preference change on PreviewItemManagerTest for on-device
test.

Bug: 354157494
Test: Unit tests
Flag: EXEMPT bugfix
Change-Id: I966cbd7bf85b0336e131c6e9e4bb306b3700a928
2024-07-23 19:33:27 +00:00
mpodolian
08e98a2c3e Added BubbleStashController interface
Added common BubbleStashController interface and implementation for the
PersistentTaskBarStashController. Added tests for the implementation.

Bug: 346391377
Flag: com.android.wm.shell.enable_bubble_bar
Test: PersistentTaskBarStashControllerTest
Change-Id: I353e5a2cfa2d39e83b0e94980938aee8a1002fd9
2024-07-23 19:32:08 +01:00
Andy Wickham
8e4faffd0e Add NavHandleLongPressInputConsumerTest.
Tests LPNH for the standard conditions (no flags or AGA configs).

Specifically tests:
 - Delegate stealing focus
 - Long press triggers with steady hold or slight slop
 - Up, cancel, or excessive slop cancels the long press
 - Touch ignored if outside the nav handle (not centered)

Things behind flags / AGA config which are not yet tested:
 - 2 stage detection (double timeout after small slop)
 - Deep press
 - Custom timeout from AGA

Fix: 353613291
Test: NavHandleLongPressInputConsumerTest
Flag: TEST_ONLY
Change-Id: I5ada3a07ccec9062ac22fa21b00d5a030f6d134a
2024-07-23 01:23:45 +00:00