Commit Graph

12168 Commits

Author SHA1 Message Date
Vinit Nayak
8f53b7be9f Merge "Move CUJ trace start closer to AppPair launch animation" into main 2024-08-23 22:44:49 +00:00
Vinit Nayak
71255b93f4 Move CUJ trace start closer to AppPair launch animation
Fixes: 361501841
Test: Logged CUJ and ensuring it gets hits when anim starts
Flag: EXEMPT bugfix
Change-Id: Ifecd2ccd21bf40a69fecad0c9634d122c058f059
2024-08-23 11:44:14 -07:00
Alex Chau
24e03825cd Fix wrong condition used to calculate clearAllShortTotalTranslation
- We now calcualte the first task's start position, and compared against the expected position (mLastComputedTaskSize) to determine if we need extra translation for ClearAllButton
- The calculation is done with `mIsRtl = true`, and only only flip +/- when applying translation
- http://screen/brM3taew74Z3uZJ shows what happens without clearAllShortTotalTranslation:
  - Blue area is mLastComputedGridSize, green area is longRowWidth
  - firstTaskStart is caculated from left of grid size, adding longRowWidth
  - Red area is mLastComputedTaskSize, where focus task is in the middle (for grid-only-overview it's in top right)
  - clearAllShortTotalWidthTranslation is the yellow area

Fix: 354104098
Test: With normal/largest display size, LTR/RTL, focus task /grid only Overview, swipe up with 1/2/6/7 tasks
Flag: EXEMPT BUG_FIX
Change-Id: I324eebc0a2b2129a4ba62d4569bc555b74140c21
2024-08-23 12:03:40 +01:00
Tony Wickham
3a47759619 Merge "Fix Taskbar being visible over Hotseat when recreated in Overview" into main 2024-08-22 18:51:55 +00:00
Tony Wickham
39d0107ef2 Merge "Animate away Recent Apps section when going to home" into main 2024-08-22 18:45:08 +00:00
Alex Chau
11290775f4 Merge "Refresh runningTaskView's thumbnail after setting shouldShowScreenshot to true" into main 2024-08-22 15:17:35 +00:00
Jordan Silva
e7c300f8f5 Merge "Fix condition when should focus on running task" into main 2024-08-22 10:32:50 +00:00
Alex Chau
eececf272e Merge "Reset mTopRowIdSet in applyLoadPlan" into main 2024-08-22 09:49:27 +00:00
Uwais Ashraf
37752f5e19 Merge changes I31d9a51e,I1bc14be7 into main
* changes:
  Prevent requestLayout() when updating drawables that don't change size
  Fix splash icon size to 52dp
2024-08-22 09:13:41 +00:00
Jordan Silva
4fb37a8ffa Fix condition when should focus on running task
Bug: 353947137
Fix: 353947516
Fix: 353947467
Fix: 353947334
Flag: com.android.launcher3.enable_large_desktop_windowing_tile
Test: OverviewDesktopTaskImageTest
Change-Id: I6210335333163ba70c228215e01889c0d13ec896
2024-08-22 09:50:52 +01:00
Tony Wickham
79f3cefae2 Animate away Recent Apps section when going to home
Also fix calculation for divider position during this transition
when there are recent apps. Added tests as well.

Flag: com.android.launcher3.enable_recents_in_taskbar
Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Test: TaskbarViewControllerTest
Bug: 343522351

Change-Id: Ifffd620c1d4c156b37561584d6e3278b39804439
2024-08-21 22:48:06 +00:00
Tony Wickham
5c32af7e5b Fix Taskbar being visible over Hotseat when recreated in Overview
Debugging locally, it seems there were a couple of state changes
and the last one (which is correct) was getting clobbered by a
previously destroyed instance of TaskbarLauncherStateController.
Fixed this by updating the isDestroyed() call which previously
only checked TaskbarActivityContext to now check
TaskbarLauncherStateController's destroyed state directly. This
is needed because TaskbarLauncherStateController is part of
LauncherTaskbarUIController which can be destroyed independently
of the other Taskbar controllers when Launcher is destroyed.

Also fix a debug log that was not updated long ago in ag/21122190

Flag: EXEMPT bugfix
Test: Go to overview, change Font Scale or Dark Theme from Quick
settings, ensure Taskbar is not visible over Hotseat
Fixes: 302923055

Change-Id: I1299462955b51a2bf931f022177045b1cec039c5
2024-08-21 21:43:54 +00:00
Treehugger Robot
97b4046b39 Merge "Add animation for the predicted icon ring Animation is modeled after the notification dot animation." into main 2024-08-21 21:25:54 +00:00
Alex Chau
1ca8471ae5 Refresh runningTaskView's thumbnail after setting shouldShowScreenshot to true
- TaskThumbnailViewDeprecated won't redraw automatically unless refresh() is called

Fix: 346696742
Test: Invoke Omnient or Screenshot hardware button on live tile, verify running task switches to screenshot after overlay closes
Test: Select/Screenshot swithces to screenshot normally
Flag: EXEMPT BUG_FIX
Change-Id: I678fb155bd577afbacfde7233956ce6cfa5e569d
2024-08-21 21:39:48 +01:00
Jagrut Desai
bb92ca0855 Merge "Do not register Taskbar System Action when device is in phone mode" into main 2024-08-21 20:31:26 +00:00
Treehugger Robot
cbd92ce7e4 Merge "Move DesktopTask to front of RecentsView (1/2)" into main 2024-08-21 18:38:34 +00:00
Jon Miranda
7d783ff70f Add animation for the predicted icon ring
Animation is modeled after the notification dot animation.

- This avoids the ring jumping in after swiping up to home to
  a predicted app.
- Also decreased the amount of time the icon has to fade out so
  that it shows up less during the animation.

Fixes: 360115794
Test: open predicted app from hotseat, swipe up to return home
Flag: EXEMPT bugfix
Change-Id: I59659610eb2e9f375a408d553bb4aa80947a28c4
2024-08-21 17:30:19 +00:00
Vinay Joglekar
eff3722286 Merge "DesktopTaskView rendered incorrectly in RTL" into main 2024-08-21 17:06:40 +00:00
Jordan Silva
b06ff83808 Move DesktopTask to front of RecentsView (1/2)
This CL updates the DesktopTasks in the RecentsView to be displayed after the focused task, separated from the other tasks in the grid. The DesktopTasks will be larger, following the same size used for focused tasks.
It was necessary to do the following changes to support DesktopTask at the front of the list.
1. Sort the GroupTasks in applyLoadPlan to move DesktopTasks after all other tasks.
2. Update the target page to take into account the DesktopTasks after the running task.
3. updateGridProperties had to support DesktopTask and Focused Task to be positioned at the front of the list. This function updates view translations to support the grid with two rows and rebalacing the position after a task is dimissed.
4. Update the max and min page scroll. Updated getFirstViewIndex to check for a DesktopTaskView, and if it doesn't exist, it uses the focused task as reference.
5. TaskView.updateTaskSize was updated to prevent DesktopTaskView being resized. This change makes DesktopTaskView to have the same size of our current focused task.
6. Update several places using focused task to use isLargeTile.

Bug: 353947137
Fix: 353947516
Fix: 353947467
Fix: 353947334
Flag: com.android.launcher3.enable_large_desktop_windowing_tile
Test: OverviewDesktopTaskImageTest

Change-Id: Ic7c0d8340ca259e8644de180aa6859a3c968d66e
2024-08-21 17:43:36 +01:00
Uwais Ashraf
e0a0ebeece Prevent requestLayout() when updating drawables that don't change size
Fix: 354224963
Test: presubmits passing, manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I31d9a51ed621f411bcafbb5bf885ee2587df057f
2024-08-21 15:45:05 +00:00
Uwais Ashraf
f1c14902ca Fix splash icon size to 52dp
Fix: 360804090
Test: presubmits passing, manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I1bc14be7d2d25a985d26709eb59b8aa4887d4764
2024-08-21 15:44:03 +00:00
vinayjoglekar
297f371b3d DesktopTaskView rendered incorrectly in RTL
Test: Manual
BUG: 357151780
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I1ea2bd7a6e6355a5a226c3516747c5b0205b9cbc
2024-08-21 12:46:42 +01:00
Alex Chau
9109b81a95 Reset mTopRowIdSet in applyLoadPlan
- All taskViewIds become obsolete after removing and re-adding, so we'll need to reset mTopRowIdSet when removing all taskViews
- OverviewActionsView.updateActionButtonsVisibility can be called before updateDimension (where mDp is set), so a null check is necessary
- Fixed TestStaibilityRule failing when running FallbackRecentsTest alone. FallbackRecentsTest runs with 3P Launcher, in that case launcherPackageName is our test activity, and launcherVersion can be null. This can only occur in a local run, thus return LOCAL in this case.

Fix: 355042336
Test: FallbackRecentsTest and manually testing dismiss
Flag: EXEMPT BUG_FIX
Change-Id: I9125ea38a567deb0d3028e7d7407397d1dc06ade
2024-08-21 12:37:14 +01:00
Alex Chau
1eebacf636 Merge "Clean-up debug logs" into main 2024-08-21 10:53:21 +00:00
Tracy Zhou
ee87fb8940 Merge "notifyTaskbarStatus in taskbar phone mode" into main 2024-08-20 22:38:06 +00:00
Mady Mellor
c15fe691e7 Merge changes I964d213d,I95085fd1 into main
* changes:
  Make an input consumer for bubble bar
  Include bubbles in the dragged items of taskbar UI controller
2024-08-20 21:34:54 +00: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
Winson Chung
ab06202228 Merge "1/ Remove unused legacy recents paths" into main 2024-08-20 20:02:50 +00:00
Alex Chau
fdbfd3410b Clean-up debug logs
Fix: 336660988
Test: presubmit
Flag: TEST_ONLY
Change-Id: Ie66a34134881e4333f610d8979b2ac443d54a1cb
2024-08-20 19:01:19 +01:00
Treehugger Robot
d064e58ff0 Merge "Handle multithreading in ActiveGestureLog" into main 2024-08-20 17:07:35 +00:00
Treehugger Robot
5f6f4b4342 Merge "Remove manual call to stash takbar from within onTaskbarIconLaunched." into main 2024-08-20 15:51:18 +00:00
Schneider Victor-tulias
cb8b3f27d2 Handle multithreading in ActiveGestureLog
ArrayList.add is not thread-safe. Attempting rapid calls across threads is the only way for it to throw ArrayIndexOutOfBoundsException.

Flag: EXEMPT bug fix
Fixes: 360619084
Test: checked TIS logs
Change-Id: I66e5f2e13d5237717abcf42e56efa2942f317676
2024-08-20 11:10:09 -04:00
Liran Binyamin
873fbaaebf Merge "Check bubble count for initial state animation" into main 2024-08-20 14:08:14 +00:00
Treehugger Robot
eda0a92d52 Merge "Read task size info from RecentsView directly" into main 2024-08-20 11:46:03 +00:00
Alex Chau
6d00b4b014 Read task size info from RecentsView directly
- Automatically determine the Overivew component to use the correct RecentsViewContainer
- Also added log on both pre-computed taskSize and newly calculated task size

Bug: 336660988
Test: presubmit
Flag: TEST_ONLY
Change-Id: Ic0adfba35af513e731007241416fc85760135f07
2024-08-20 10:56:52 +01:00
Jeremy Sim
bfb29a2e3f Merge "Add a contentDescription to splitscreen's first staged task" into main 2024-08-20 05:05:50 +00:00
Jeremy Sim
2e59268f3b Add a contentDescription to splitscreen's first staged task
Currently, when we stage the first app in a split, the floatingTaskView has no contentDescription and is announced by screen readers as "unlabeled".

This CL allows FloatingTaskView to copy a contentDescription from the underlying task or ItemInfo when it is created.

Also changes SplitConfigurationOptions#itemInfo to a private field with a public getter for mockito compatibility.

Fixes: 319783133
Test: Confirmed with TalkBack on Overview, contextual and Intent splits
Flag: EXEMPT bugfix
Change-Id: Ia5a95e403bfe8623e17d2ceac9073ef15c7bb476
2024-08-20 03:19:58 +00:00
Jon Miranda
173c218366 Remove manual call to stash takbar from within onTaskbarIconLaunched.
Taskbar does not know if the icon clicked will result in a translucent
activity. After this change, taskbar app stashing logic is now the same
between taskbar and home launches.

We should still stash after split screen, because in the case of
translucent activity the background becomes opaque.

Fixes: 354627538
Test: Pause app in hotseat, go to overview, launch paused app
      note that taskbar does not go away
Flag: EXEMPT bugfix
Change-Id: I3d3ed7a6ca10090c7207b45d0b272dc4fc928e32
2024-08-19 16:41:36 -07:00
Jagrut Desai
0f59383c62 Do not register Taskbar System Action when device is in phone mode
Bug: 359880840
Test: Presubmit
Flag: NONE bug fixing for taskbar system action

Change-Id: Idf34bd677a96cf711e80df1561d49441824ae4ba
2024-08-19 16:00:26 -07:00
Mady Mellor
788a6ebb74 Make an input consumer for bubble bar
Instead of unstashing bubble bar in TaskbarUnstashInputConsumer
handle it in its own input consumer instead. This is a nicer
separation of concerns and simplifies the logic in both places.

Additionally, this fixes issues where swiping up the bubble bar
handle might initiate / be handled by gesture nav (or all apps) when
really any events originating on bubble UI should be managed by
bubbles instead.

Adds some mostly mock'd tests to check that the static method used
to indicate if bubbles should take the event or not works correctly.

Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - test swipe up on bubble bar handle in an app
             - test swipe up on bubble bar on home - it should
               open & all apps / launcher transition shouldn't happen
             - longpress to drag bubbles around on home and overview,
               try the collapsed bar & individual bubbles in the
               expanded bar
             - test dragging on the bubble bar after it's revealed
               in an app
Test: atest BubbleBarInputConsumerTest
Bug: 345488529
Change-Id: I964d213d71de15e4350cff5202dfb9343de1af14
2024-08-19 15:26:37 -07:00
Winson Chung
69062b75b6 1/ Remove unused legacy recents paths
- We no longer support the legacy recents animation cancel path
  (it was already a no-op)
- Use the shell recents transition path instead of the legacy recents
  animation for remaining use cases

Flag: EXEMPT cleaning up unused code
Bug: 359608026
Test: Test both kb shortcut and desktop split invocation paths
Change-Id: I2726d52b3b4f3533afc4286b155c71eadcb57909
2024-08-19 20:28:51 +00:00
Alex Chau
d326e17fe2 Add logs for getFocusedTaskHeightForTablet
Bug: 336660988
Bug: 360724626
Test: presubmit
Flag: TEST_ONLY
Change-Id: I67d4fc8211f24b77566bd24525d23054dfdded6e
2024-08-19 20:39:41 +01:00
Mady Mellor
d22a0b84cb Include bubbles in the dragged items of taskbar UI controller
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - test dragging bubbles with the other CL
Bug: 345488529
Change-Id: I95085fd18f2710cd36a2d47640641da047aa48c7
2024-08-19 09:52:57 -07:00
Winson Chung
cafe06f63d Merge "Detach the nav bar from the app when going home" into main 2024-08-16 22:42:44 +00:00
Mykola Podolian
3bae9ff981 Merge "Fixed issue when hotseat icons are not touchable" into main 2024-08-16 22:26:56 +00:00
mpodolian
9367722dbc Fixed issue when hotseat icons are not touchable
The issue existed because of taskbar insets where set to the full height
of bubble and task bars. Added check that only adds bars touch area if
the user is currently not on the launcher home screen. Commented failing
tests.

Bug: 358301278
Bug: 359277238
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual.
http://recall/-/gx8ASgewUeUS3QYohfrd1J/hcgYuHUJwfbhlvPRsvdWYf
The touch area is within the red rectangle.

Change-Id: I3c2ad3633a049972b93fe5c5e45efd557c220e1f
2024-08-16 13:00:03 -07:00
Luca Zuccarini
0ad76ac07d Merge "Move some Shell utils to the Shared package." into main 2024-08-16 16:32:37 +00:00
Pat Manning
0c6e17020d Merge "Show and hide taskbar tooltips immediately." into main 2024-08-16 14:45:10 +00:00
Winson Chung
5db6d3dd8e Detach the nav bar from the app when going home
- Nothing currently detaches the nav bar from the app until the recents
  animation completes if onAnimationStart() happens after the end
  target is set

Flag: EXEMPT bugfix
Fixes: 343457097
Test: Artificially introduce delayed onRecentsAnimationStart and verify
      detachNavFromApp is called
Change-Id: I1ec0d8821d61f9fad9a811d6a12ce21e8417252f
2024-08-16 00:27:31 +00:00
Pat Manning
b488c88fa3 Show and hide taskbar tooltips immediately.
Fix: 356352494
Test: TaskbarHoverToolTipControllerTest
Flag: EXEMPT bugfix
Change-Id: Ie7dc1f341cf059bb38f61fa185152cb2555e36b1
2024-08-15 17:59:59 +01:00