Commit Graph

13120 Commits

Author SHA1 Message Date
Treehugger Robot
446ea7592f Merge "Let getOffsetToDismissedTask not rely on taskCount" into main 2024-12-17 14:37:52 -08:00
Mykola Podolian
bd10730a57 Merge "Added an onClick listener to the bubble bar." into main 2024-12-17 10:36:14 -08:00
minch
7fc34db11b Let getOffsetToDismissedTask not rely on taskCount
This is a preparation to migrate TaskViews iteration that
rely `getTaskViewCount` to the `TaskViewsIterable` and
`TaskViewsIterator`.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Tested on tangor with `adb shell wm density 480` to simulate
      phone layout, and verified overview layout is correct in
      scenarios below:
      1. Dismiss the first TaskView
      2. Dismiss the last TaskView
      3. Dismiss a TaskView in the middle
      4. Click `ClearAll` button to dismiss all the TaskViews
Change-Id: Icbaf1ea706906097fc6ac60ad3e2ab17d2781284
2024-12-16 23:39:24 +00:00
mpodolian
5391e14c3e Added an onClick listener to the bubble bar.
Previously, clicks were not handled because no listener was set on the
bubble bar.

Fixes: 383622825
Test: Manual. Ensure bubbles are on the home screen and set the
navigation mode to 3-button navigation. Click on the collapsed bubble
bar and observe the bar expanding.
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I99e1c20e40a9dd9da97b68817734c8ca1f656baa
2024-12-16 15:16:15 -08:00
Liran Binyamin
6592d90003 Merge "Fix bar visibility after dismissing while stashed" into main 2024-12-16 10:05:39 -08:00
Johannes Gallmann
c812907eb8 Merge "Add blur effect to predictive back-to-home animation" into main 2024-12-16 05:50:34 -08:00
Gustav Sennton
c66964125c Merge "Revert "Open Task into Desktop Mode when Taksbar is in DesktopMode"" into main 2024-12-16 05:42:38 -08:00
Liran Binyamin
38dc7ef520 Fix bar visibility after dismissing while stashed
When updating the bubble bar visibility, allow it to become visible
if the only hidden bit is the stashed one and we're animating.

This fixes the visibility issue that appears after dismissing the
bar while stashed, and then sending an initial bubble, while still
stashed.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 383620113
Test: manual
       - create bubble
       - launch app
       - dismiss bubble with adb
       - create bubble with adb
       - observe bubble bar is visible during the animation
Change-Id: I7a955de068867829b3ccab11b2b0adc8d8e10239
2024-12-13 20:30:47 -05:00
Wen-chien Wang
ad0b62daad Merge "pin-shortcut: Add pin shortcut to the context menu" into main 2024-12-13 17:00:42 -08:00
Wen-Chien Wang
2badfc7ebc pin-shortcut: Add pin shortcut to the context menu
This cl adds the pin shortcut option to the context menu, where
it works on Home launcher, hotseat, and pinned apps on the
taskbar.
Currently the option is a no-op.

Bug: 375648361
Test: Manual. Recording uploaded to buganizer
Flag: com.android.launcher3.enable_pinning_app_with_context_menu
Change-Id: I5d1284a6e909fd75f14e81c3ae713da3cdc01ce3
2024-12-13 22:49:52 +00:00
Treehugger Robot
5849df4002 Merge "[-1] Fix flicker of -1 when swipe up to exit -1 isn't fast enough" into main 2024-12-13 14:02:46 -08:00
Fengjiang Li
b8b16bd288 [-1] Fix flicker of -1 when swipe up to exit -1 isn't fast enough
Fix: 381017761
Flag: NONE - released code
Test: manual - record a video
Change-Id: I5bda4a234cdcc8227d4feb9a92a174d07e46f7a2
2024-12-13 12:11:41 -08:00
Treehugger Robot
9b6c58e6a9 Merge "Do not rely on getTaskViewCount to iterate TaskViews" into main 2024-12-13 11:59:41 -08:00
minch
8cf0df7f96 Do not rely on getTaskViewCount to iterate TaskViews
Using `getChildCount` to iterate TaskViews instead of
`getTaskViewCount` when indices are used. As it is not safe to assume
the TaskView starts from index 0.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Manual
Change-Id: I599b5117f0848e429ebf83fc4b85451e52b4bcab
2024-12-13 10:12:34 -08:00
Treehugger Robot
4d295d0867 Merge "Migrate to TaskViewsIterable & TaskViewsIterator - [2/n]" into main 2024-12-13 09:49:39 -08:00
Treehugger Robot
f340be6e4f Merge "Replacing all int lookup flags and boolean overrides with an object to make it easier to extend options" into main 2024-12-13 06:20:44 -08:00
Alex Chau
fa39d7478d Merge "Pass RecentsView reference to RecentsViewUtils to simplify code" into main 2024-12-13 06:12:31 -08:00
Johannes Gallmann
b5d923f17a Merge "Add depth animation to predictive back to home" into main 2024-12-13 05:43:35 -08:00
Artsiom Mitrokhin
4c7663768d Merge "Add haptics for opening taskbar pinning popup view from anywhere" into main 2024-12-13 05:34:00 -08:00
Gustav Sennton
027a0fb35f Revert "Open Task into Desktop Mode when Taksbar is in DesktopMode"
This reverts commit d87722d396.

Reason for revert: causes b/383976643

Change-Id: Ib862599e84a6f61133819797a1ba51b79fe1f745
2024-12-13 05:13:38 -08:00
Alex Chau
ec1883b261 Pass RecentsView reference to RecentsViewUtils to simplify code
- RecentsViewUtils is owned by RecentsView, it's safe to have an instance of RecentsView to simplify a lot of call sites

Fix: 383999010
Test: presubmit
Flag: EXEMPT refactor
Change-Id: I69f991ea137b30e0297df825b78ad431f6388af8
2024-12-13 12:21:47 +00:00
Johannes Gallmann
8d5fd05718 Add blur effect to predictive back-to-home animation
Bug: 342178850
Flag: com.android.launcher3.predictive_back_to_home_blur
Test: Manual, i.e. testing predictive back-to-home animation on device
Change-Id: I6295353d910ad8597477b722de3a87f93ee0297c
2024-12-13 11:44:07 +00:00
Johannes Gallmann
998e11e0a5 Add depth animation to predictive back to home
Setting the depth when predictive back to home is started. This will be animated to NORMAL state by ScalingWorkspaceRevealAnim on back gesture commit.

Bug: 382453424
Flag: com.android.launcher3.predictive_back_to_home_polish
Test: Manual, i.e. testing predictive back-to-home animation on device
Change-Id: Id33f49d78aae268b7d89035cce58065f6a60a8bf
2024-12-13 11:44:06 +00:00
Johannes Gallmann
9b524b0f60 Merge "Play workspace reveal animation for predictive back-to-home" into main 2024-12-13 02:10:17 -08:00
Sunny Goyal
18e480838a Replacing all int lookup flags and boolean overrides with an object to make it easier to extend options
Bug: 381897614
Bug: 366237794
Flag: EXEMPT refactor
Test: atest CacheLookupFlagTest
Change-Id: Ic89d48dd1c5dc8b0a89b1898cd7b00d9c61d6513
2024-12-12 18:32:55 -08:00
Liran Binyamin
0f0394c597 Merge "Fix bubble bar visibility issue" into main 2024-12-12 15:36:42 -08:00
Liran Binyamin
138dd0bc5f Fix bubble bar visibility issue
Update the bubble bar visibility for the initial bubble if the animation
is suppressed, e.g. if we're creating the bubble when the shade is open.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 382693837
Test: manual
       - enable bubbles
       - remove all conversations from the list of allowed to bubble
       - create notification
       - open shade and click on the bubble button to bubble the notification
       - observe bubble bar becomes visible

Change-Id: If771c28998b2b091f4f1ab38001e9485ed1ed849
2024-12-12 15:36:29 -08:00
Sunny Goyal
daf46a09b2 Merge "Moving WMProxy to dagger" into main 2024-12-12 15:27:19 -08:00
Brandon Dayauon
1d1bffbf0b Merge "Fix unintended scroll in all apps when using external mouse." into main 2024-12-12 11:37:31 -08:00
minch
b344bc1fb6 Migrate to TaskViewsIterable & TaskViewsIterator - [2/n]
Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Manual
Change-Id: I9bd1bad7a9eb8a3cc8333f37e3b535975a5ce0b6
2024-12-12 11:29:48 -08:00
Ats Jenk
49319240dd Merge "Handle suppressed bubbles" into main 2024-12-12 10:12:45 -08:00
Johannes Gallmann
c8fd3f23fe Play workspace reveal animation for predictive back-to-home
Bug: 382453424
Test: Manual, i.e. tested back-to-home and back-to-allapps animation on phones, tablets and foldables, including interruptions.
Flag: com.android.launcher3.predictive_back_to_home_polish
Change-Id: I092a74ab2340828e18067ca15c7019c44d30f40b
2024-12-12 14:18:03 +00:00
Alex Chau
74ff7af5e2 Merge "Migrating the remaining getTaskViewAt(0)" into main 2024-12-12 04:01:59 -08:00
Alex Chau
f3013954a3 Merge "Introduce hasTaskViews() to RecentsView" into main 2024-12-12 04:01:07 -08:00
Treehugger Robot
41d5494a4e Merge "Fix for split animation" into main 2024-12-12 01:55:55 -08:00
Brandon Dayauon
1fb2d7815f Fix unintended scroll in all apps when using external mouse.
The reason is because when ag/29152694 was introduced, the accessibilityEvent that would
trigger is TYPE_VIEW_HOVER_ENTER that would eventually always have the list scrolling depending
on where the mouse would be. Gating it to TYPE_VIEW_ACCESSIBILITY_FOCUSED would be fix this as
this should still work for talkback when traversing the A-Z list as TYPE_VIEW_ACCESSIBILITY_FOCUSED is whats is always used
during this case.

bug: 372965379
Test: manually
Flag: EXEMPT bug fix
Change-Id: I249cee8036216f93aab53efc3d77fad047f7e408
2024-12-11 16:53:16 -08:00
Ats Jenk
bcc12470b7 Handle suppressed bubbles
Hide or show bubble based on suppression signals from shell.
If this is the only bubble, hides or shows the bubble bar.

Bug: 273316505
Test: have a single bubble in the bubble bar, suppress the bubble,
  observe that bubble is hidden and bubble bar is not shown,
  unsuppress the bubble, check that bubble bar and bubble is shown
  again, perform check with transient and persistent taskbar
Test: have multiple bubbles, suppress one bubble, check that this bubble
  is not shown, but the bubble bar remains visible with other bubbles,
  perform the check with transient and persistent taskbar
Test: have a single bubble in bubble bar that is suppressed, receive
  notifications to trigger new bubbles, observe bubble bar is shown for
  new bubbles, check that after unsuppressing bubble, it is added back,
  perform the checks with tranient and persistent taskbar
Test: suppress a bubble and rotate the device to trigger launcher
  recreation, check that after unsuppress, the bubble is added back

Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I17e5cec750a2666feecc62213a3e8fc204ee510a
2024-12-11 16:02:32 -08:00
minch
c7a66bd4af Migrating the remaining getTaskViewAt(0)
Migrating the remaining `getTaskViewAt(0)` to `getFirstTaskView()`.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Manual
Change-Id: I083626b0ca62b88d06f508dfc15d9f64112f1a6a
2024-12-11 23:50:53 +00:00
minch
3695c7a64c Introduce hasTaskViews() to RecentsView
- This function is going to replace all the call sites that compares
  `getTaskVieCount()` and `0`.
- This is based on the fact that this count can not be a negative
  number.
- Introduce `getLastTaskView()` to get the last TaskView inside the
  RecentsView.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Manual
Change-Id: Iefb107d1aba61549a870f14c18e025c34b19a1b5
2024-12-11 23:44:16 +00:00
minch
37ed08215d Introduce TaskViewsIterator and TaskViewsIterable
- Create TaskViewsIterator to iterate all the current TaskViews inside
  RecentsView.
- Create TaskViewsIterable with TaskViewsIterator as its iterator.
- Create `mTaskViewsIterable`, an instance of TaskViewsIterable that
  used to make the TaskViews iterable.
- Current `getTaskViews()` return `mTaskViewsIterable` directly.
- Change `getTaskViews()` to be a public function, thus it can be
  used outside of the RecentsView.

Some follow-up work includes:
- Replace all the call sites of `getTaskViewAt(0)` with
  `getFirstTaskView()`
- Replace `0` as the index of the first TaskView  with
  `getFirstTaskViewIndex()`
- Audit all the call sites of iterating the TaskViews, let them use
  `getTaskViews()` or IterableTaskViews.iterator() if index is needed.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Ensure the TaskViews required are correct in the following
      scrnarios:
      1. Swiping up from home screen to enter overview with empty or
         multiple tasks
      2. Swiping up from a fullscreen app to enter overview with
         one or multiple tasks
      3. Dimissing one or multiple tasks, exit and enter overview w/o
         newly opened tasks
      4. Remvoing all the tasks, reenter overview w/o newly opened
         tasks
Change-Id: I930ce92b7e0bc37005af74a58fd4c0ce3013e5cb
2024-12-11 21:48:34 +00:00
Sunny Goyal
41e8057bbf Moving WMProxy to dagger
Bug: 361850561
Flag: EXEMPT dagger migration
Test: Presubmit
Change-Id: I9a8031037f2167658b7bc212b59c9b11abbf2f03
2024-12-11 13:24:26 -08:00
Treehugger Robot
4d4eb7d685 Merge "Introduce mTaskViewCount inside the RecentsView" into main 2024-12-11 12:36:00 -08:00
minch
58abc8b0a6 Introduce mTaskViewCount inside the RecentsView
Add a member property `mTaskViewCount` inside the RecentsView to track
the number of TaskView inside it. Its value will be increased
`onViewAdded` and decreased `onViewRemoved`.
- Then `getTaskViewCount()` can just return this variable directly.
- Invalidate the `PagedView.mPageScrolls` on a view addition and
  removal util they have been updated on next `onLayout`. This is done
  to guarantee that `mOnPageScrollsInitializedCallbacks` is run with
  up to date `mPageScrolls`.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Tested on Tangor, ensure `mTaskViewCount` is correct in the
      following scenarios:
      1. Adding more tasks and enter overview
      2. Dismissing one and more tasks
      3. Dismissing all tasks
Change-Id: I32407e77dd2a9b3d8200efc334c1eadea1336b31
2024-12-11 10:43:31 -08:00
vinayjoglekar
ff076f85d6 Fix for split animation
While splitting focus task, there is a timing issue of focus task being animated first and then small tiles.
This CL fixes that makes animation smooth i.e. animate stage task(focus task) and other small tiles together.

 Also refactored animationStartProgress and animationEndProgress initialisation by adding "if/else" for readability.

Test: Manual.Split focus task.(RTL as well)
Fix: 383417963
Flag: com.android.launcher3.enable_large_desktop_windowing_tile
Change-Id: I7b8c651d91168802b930fdeac62e762a2be9dbe9
2024-12-11 18:42:21 +00:00
Mykola Podolian
29ccf8703b Merge "Remove usage of the enableBubbleBarInPersistentTaskBar flag." into main 2024-12-11 09:24:25 -08:00
Treehugger Robot
9632253a4a Merge "Revert "Play workspace reveal animation for predictive back-to-home"" into main 2024-12-11 08:07:22 -08:00
Schneider Victor-tulias
72fe47d329 Merge "Update OWNERS files to include the sysnav team" into main 2024-12-11 07:01:50 -08:00
Schneider Victor-Tulias
55500094e8 Update OWNERS files to include the sysnav team
Flag: EXEMPT updating OWNERS
Fixes: 383379046
Test: not needed
Change-Id: Ia1c95d6953bfddc9a4cbc7238cf1f9a2e4ee18cf
2024-12-11 09:59:16 -05:00
Johannes Gallmann
6b1272ad9f Revert "Play workspace reveal animation for predictive back-to-home"
This reverts commit 09603bfb39.

Reason for revert: Launcher icons are sometimes not visible during the back-to-home animation when immediately swiping back after opening the app.

Change-Id: I13869cf755160986e323365a460f6ebe128008a9
2024-12-11 06:05:39 -08:00
Johannes Gallmann
b2683aa902 Merge "Play workspace reveal animation for predictive back-to-home" into main 2024-12-11 01:33:53 -08:00