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
- 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
- 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
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
- 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
- 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
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
To revert the preference change on PreviewItemManagerTest for on-device
test.
Bug: 354157494
Test: Unit tests
Flag: EXEMPT bugfix
Change-Id: I966cbd7bf85b0336e131c6e9e4bb306b3700a928
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
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
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
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
- 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
- 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
We do not need this for now and it is making development more difficult on macs.
Test: Taskbar unit tests
Bug: 230027385
Flag: TEST_ONLY
Change-Id: I2e74e91e21aa650544d8264fab7b336b97b52547