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 reason Recents is empty after a force-stop is when RecentsTasksList.getTasks is called first time after restart, the result is always invalid but we cached the invalid result with a chagneId(=1). The next time we call getTasks again, we think the cached result is valid, and returend an empty list.
- The fix is to mark such result as invalid to avoid caching the wrong result
Fix: 353926204
Test: RecentTasksListTest
Flag: EXEMPT bugfix
Change-Id: If15ab8fd7454db8a08c22b17eaac73f0c78aa75f
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
This CL includes
- Taskbar container enum class and interface for container to calculate their space needed.
- Inits and getter of util classes in taksbar activity context.
- Taskbar Icons specs not have default margins and minimum touch target specs
- Updates to the test
- Logic for calculating the space needed for taskbar container
Test: Presubmit
Bug: 341146605
Flag: com.android.launcher3.enable_taskbar_customization
Change-Id: I89e9d521476902a9027f6fd0cebdc2690b2e5f31
- Actually evaluate statement in tests.
- Enable aconfig flag for taskbar pinning.
- Allow DisplayController Taskbar mode to change in test harness.
- Make DisplayController think it's in desktop mode when needed.
Flag: TEST_ONLY
Bug: 230027385
Test: TaskbarPinningPreferenceRuleTest
Change-Id: I1c55f73cb5a4bb903cd2d628fa47fbd5e8b1bb86
After swiping from a landscape app to portrait home, the touch
orientation may be changed if there the touch event comes in a
short time (e.g. click app icon immediately):
DOWN
MOVE...
SimpleOrientationTouchTransformer#onDisplayInfoChanged
MOVE... (start to transform with inconsistent orientation)
UP
That could disturb the gesture detection:
OverviewInputConsumer#onMotionEvent
> BaseDragLayer#proxyTouchEvent
onInterceptTouchEvent, findControllerToHandleTouch
> PortraitStatesTouchController#onControllerInterceptTouchEvent
> BaseSwipeDetector#onTouchEvent
which may show the app drawer unexpectedly.
http://recall/-/b2qm27pJZxFIWQccA9qE9Q/ggLXlE5kf7AWMOjUc0FCUU
Bug: 351755391
Flag: EXEMPT bugfix
Test: atest NexusLauncherTests: \
com.android.quickstep.OrientationTouchTransformerTest# \
testSimpleOrientationTouchTransformer
Change-Id: Ic0e9d8292606837feb4775663abb60229c90e9c5
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
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
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
- 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
* 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.
* 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
- 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