Commit Graph

11400 Commits

Author SHA1 Message Date
Treehugger Robot a8c1628d6e Merge "Fix bug where hotseat disappears" into main 2024-05-10 08:47:33 +00:00
Jordan Demeulenaere 3af63d8504 Merge "Delay TransitionAnimator.onAnimationEnd by one frame (2/4)" into main 2024-05-10 07:36:34 +00:00
Winson Chung 36f38cb028 Merge "Add multi-instance state to item infos" into main 2024-05-10 04:16:38 +00:00
Ats Jenk 8ed5d288d2 Merge "Get display size from DisplayController instance" into main 2024-05-09 22:58:38 +00:00
fbaron cf10603ed3 Fix bug where hotseat disappears
Fix: 336096469
Bug: 339700174
Flag: NONE
Test: n/a
Change-Id: Ie567c08445d7743281f501c782a8fd51a75ad9bc
2024-05-09 15:44:57 -07:00
Anushree Ganjam 798340dc6d Merge "Hardcode the className instead of class.getSimpleName()." into main 2024-05-09 20:13:13 +00:00
Ats Jenk 5b650d0796 Merge "Update expanded view drop target size based on value from shell" into main 2024-05-09 20:06:10 +00:00
Winson Chung 94e8ad0731 Add multi-instance state to item infos
- Add legacy resource for supported multi-instance apps that
  matches the current SystemUI resource of the same name, and will
  be removed as apps migrate to the V manifest property to declare
  multi-instance support
- Load the multi-instance state from PackageManager when the db is
  first loaded or when packages are updated
- The multi-instance check is then used to determine if an app pair
  can be saved (ie. whether the action can be shown)

Bug: 323112914
Test: atest NexusLauncherTests

Change-Id: I565b4bee4ab5f7040910306b1fd60a4fc3bf9a1c
2024-05-09 18:43:38 +00:00
Sukesh Ram e514bac5e3 Merge "Remove Logs for TaplOverviewIconTest#testOverviewActionsMenu" into main 2024-05-09 18:26:31 +00:00
Uwais Ashraf 2a2be5dfee Merge "Add corner rounding to TaskThumbnailView" into main 2024-05-09 09:44:30 +00:00
Tracy Zhou bfdd7d27c0 Merge "Fix back button sometimes not showing up in the initial setup screen" into main 2024-05-09 05:50:46 +00:00
Ats Jenk 5a4836b64f Get display size from DisplayController instance
DeviceProfile is not updated after rotation. Which led to drag to
reposition using landscape display size in portrait.

Bug: 330585402
Test: have device in landscape, drag bubbles and the bar itself
  left/right, observe that the drop target is shown when passing half
  the screen
  rotate device to portrait, start dragging again, observe that drop
  target is shown on the other side when passing half the screen
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: I5c0e2e4ab47a669b6e178b45ab132989029f5913
2024-05-08 15:59:54 -07:00
Sukesh Ram 60cab37a23 Remove Logs for TaplOverviewIconTest#testOverviewActionsMenu
Remove logging for TaplOverviewIconTest#testOverviewActionsMenu.

Flag: NONE
Test: Manually tested in pixel 7.
Bug: 326073471
Change-Id: Ie19cdb10234fd50fc64f259b5dafe9881162e23d
2024-05-08 22:29:48 +00:00
Alex Chau ec547e0c32 Merge "Recycle thumbnailViews in DesktopTaskView" into main 2024-05-08 22:20:22 +00:00
Alex Chau 4205013b0a Recycle thumbnailViews in DesktopTaskView
- Changed mTaskContainers to a List
- Added an XML for TaskThumbnailView to make it compatible with ViewPool
- Removed mSnapshotViews variable, and streamlined DesktopTaskView binding logic to re-use thumbnailvIew from mTaskContainers or ViewPool

Bug: 249371338
Fix: 251586230
Test: manual
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Change-Id: Iab7575e9c36b8ebf3eb62f19f13d75ba671f9f4f
2024-05-08 22:19:27 +00:00
Ats Jenk f3224cf847 Update expanded view drop target size based on value from shell
When a bubble drag starts, shell sends the current expanded view size
over as part of BubbleBarData. Update the size stored in
BubblePinController based on latest value.
Update drop target visual to match the spec. It should have 24dp insets
compared to expanded view and 28dp corner radius.

Bug: 330585402
Test: drag bubble in landscape, check that drop target for expanded view
  matches with what is shown when expanded view is dragged
Test: drag bubble in portrait, check that the drop target for expanded
  view, matches with what is shown when expanded view is dragged
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: Ic11c4c5c675107543ba08f24a4138cda422d24c1
2024-05-08 14:05:03 -07:00
Jeremy Sim 7d69804e4e Merge "Fix bug with double-relayout of Overview Actions View" into main 2024-05-08 20:24:21 +00:00
Anushree Ganjam c9eda41c31 Hardcode the className instead of class.getSimpleName().
class.getSimpleName() causes issues with obfuscation.

Bug: 332171918
Test: Manual
Flag: NA
Change-Id: I5119a7ba0e4e27d8745c94df67881934fed282a4
2024-05-08 12:31:24 -07:00
Holly Jiuyu Sun e498d6ea55 Merge "allKeys in DeviceConfigHelper should be populated with keys." into main 2024-05-08 19:30:09 +00:00
Uwais Ashraf 9533b0fb27 Add corner rounding to TaskThumbnailView
Fix: 334826840
Test: TaskThumbnailViewModelTest
Flag: ACONFIG com.android.launcher3.enable_refactor_task_thumbnail DEVELOPMENT
Change-Id: Iba4d49d43abc09363f61186c3fcc07f2281b7006
2024-05-08 14:45:44 +00:00
Jordan Demeulenaere 5512003c0d Delay TransitionAnimator.onAnimationEnd by one frame (2/4)
Bug: 330672236
Test: atest ActivityTransitionAnimatorTest
Test: atest DialogTransitionAnimatorTest
Flag: N/A
Change-Id: I81e85df79256d013f6c3ef5cb58a5d96c0c7deec
2024-05-08 16:28:53 +02:00
Orhan Uysal 906df388ef Merge "Add quick switch flag for desktop windowing cases." into main 2024-05-08 11:17:56 +00:00
Anna Zhuravleva 9f3bca37e6 Merge "Log animation jank" into main 2024-05-08 08:22:57 +00:00
Tracy Zhou 9d602e684c Fix back button sometimes not showing up in the initial setup screen
A few things to note
- We use gesture nav layoutter because it's the mode in which we show back button rendered by IME. There might be other historical reasons but it is what it is.
- The back button isn't necessarily laid out correctly with this layoutter (currently we don't adjust anything in layoutButtons.

Fixes: 338876161
Test: Repeatedly get in setup mode, and make sure the back button is visible
Change-Id: I402273c2868f3f46a12b00918dab3f36fbe82204
2024-05-07 18:15:51 -07:00
Jeremy Sim 41eadd1a91 Fix bug with double-relayout of Overview Actions View
This CL refactors Overview Actions View so that a separate view, R.id.group_action_buttons, is used for buttons related to grouped tasks. This also changes the way visibility is handled with actions buttons -- instead of all buttons living on one bar and being toggled on and off, sometimes the whole bar is toggled on and off (to change from single task actions to group actions and vice versa).

This prevents the same view from having its visibility changed twice in in one layout and causing the wrong visibility to be rendered.

Fixes: 333844287
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_app_pairs NEXTFOOD
Change-Id: I1b6be4637ac8c8d424e7633c437fca376ecdd757
2024-05-07 11:18:24 -07:00
Vinit Nayak cc7107d82e Merge "Disable gestures when split apps are animating in from shell" into main 2024-05-07 18:12:00 +00:00
Ats Jenk 31e9455718 Merge "Use translation to move bubble bar during bubble drag" into main 2024-05-07 18:04:31 +00:00
Treehugger Robot 22283fd1b8 Merge "Use TaskContainer as source of truth around Task handling" into main 2024-05-07 15:00:24 +00:00
Liran Binyamin 8f266507fd Merge "Animate the bubble bar for the first bubble" into main 2024-05-07 13:08:21 +00:00
Orhan Uysal d3f3200c5f Add quick switch flag for desktop windowing cases.
Add quick switch flag to desktop windowing cases. Quick switch should
work out of the box for desktop windowing when the flag is enabled.

Bug: 322759294
Bug: 322759294
Test: Manually enable/disable the flag
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_quick_switch DEVELOPMENT

Change-Id: Ifb531368552449f70ce9d883418d26c7f272c6e9
2024-05-07 12:38:05 +00:00
Alex Chau 5b15bfe20b Use TaskContainer as source of truth around Task handling
- Renamed TaskIdAttributeContainer into TaskContainer so it's shorter
- Make mTaskContainers the source of truth for Task handling, removing mTask, mSecondaryTask, mTaskIdContainer and use mTaskContainers to derive all related information
- Remove mTasks/mSnapshotViewMap in DesktopTaskView and replace with mTaskContainers
- Mark methods that assumes a single Task as deprecated e.g. getTask, getItemInfo, getThumbnail to discourage further usage of such methods; "First" is added to the method name to make it explicit only first Task is considered; getTaskContainers is encouraged to access such information

Bug: 249371338
Test: Manual
Flag: None
Change-Id: Ieb15e0e8432913c89dc46c1011f0148095c665f8
2024-05-07 11:51:26 +01:00
Alex Chau 6526706721 Merge "Remove TaskView.isDesktopTask" into main 2024-05-07 08:26:21 +00:00
Andy Wickham 96adbcb2a8 Merge "Remove unused AssistStateManager methods." into main 2024-05-07 01:43:46 +00:00
Ats Jenk 5a03549797 Use translation to move bubble bar during bubble drag
Revert logic to set translation on each BubbleView and background.
Background translation was set with bounds offset and BubbleView was
using setTranslationX(). This made it hard to synchronise background and
child view translations. And led to flickers.

Applying translation on the BubbleBarView itself, but applying the
reverse of the translation to the dragged BubbleView. This ensures that
the dragged bubble position is not affected by the parent translation.

Introducing a new property for BubbleView that is used to apply
translation during drag. It takes into account the offset of the
BubbleBarView.

Bug: 330585402
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: drag bubble to other side and release before the bubble bar
  animation finishes, observe no flickers
Test: drag expanded view to other side and release before the bar
  animation finishes, observe no flickers
Change-Id: I1712ed6ac26831f10466dbaf0378f8aabb29629d
2024-05-06 17:39:29 -07:00
Liran Binyamin aa73f595cf Animate the bubble bar for the first bubble
This change animates the bubble bar for the first bubble.
When we're in home -- the bubble bar bounces in and stays visible
When we're in app -- the bubble bar bounces in, then animates to
the stashed handle.
When the bubble bar auto expands, we currently animate the bubble
bar already expanded. In the future we'll time the expansion
until after the bubble bar settles in.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/hIGwtb3YKyCT9Ke9adZNgY

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 339066271
Test: atest BubbleBarViewAnimatorTest
Change-Id: I80ce55676b72a50bab23623e0b5c1e602690682f
2024-05-06 20:17:28 -04:00
Andy Wickham 17526db32a Merge "Implement animateNavBarLongPress for stashed taskbar." into main 2024-05-06 23:12:32 +00:00
Tracy Zhou b297d4fb83 Update SUW swipe home logic for taskbar stashing
- Reverted the previous change. It doesn't fix the issue when launching setup mode with command line. The fact that it looked as if it's fixed from factory reset might be a fluke
- Found out that we unstash the task bar to home from setup somewhere in TaskbarStashController. This is related to stashed alpha only.

Fixes: 337738795
Test: Finish setup, swipe home in folded, and observe home handle is visible.
Change-Id: I04daf41ae9a1c3b7e6e4962dd4a8c62b708e0a54
2024-05-06 13:05:41 -07:00
Tracy Zhou 74ed411d07 Merge "Fix 3-button showing up briefly on the AllSet page in setup" into main 2024-05-06 19:06:07 +00:00
Liran Binyamin b4b5e79ffe Merge "Interrupt bubble animation on stash change" into main 2024-05-06 16:06:55 +00:00
Liran Binyamin 209c764175 Interrupt bubble animation on stash change
This change handles cancelling the currently running bubble animation when the stash state is changing.

Demo - http://recall/-/bJtug1HhvXkkeA4MQvIaiP/4jnBgnFaIPez6m7fVLSlf

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I34628f8ad741228dd21285ad66e45ef2909fbdab
2024-05-06 09:55:34 -04:00
Tracy Zhou cb8eb189f1 Fix 3-button showing up briefly on the AllSet page in setup
Fixes: 338883705
Test: Go through setup. Make sure the 3-button doesn't show up anytime during setup
Change-Id: Idd62486465d608235abe61b994718311c72cb20c
2024-05-05 21:39:54 -07:00
Andy Wickham 3a7a76f88e Implement animateNavBarLongPress for stashed taskbar.
I think ideally we would tie this into the taskbar's outline
provider, but it seemed more complicated to deal with existing
stashing animations.

Instead I've just animated the stashed taskbar scale to 0.85 or
1.18, depending on the SHRINK_NAV_HANDLE_ON_PRESS flag. These
are based on the existing navbar shrink/expand animations.

Demo (the flickering doesn't happen on-device):
https://drive.google.com/file/d/1CWCPRsuD3kjtOUbwXspkQ_ZJ6Ln7FnUo/view?usp=sharing&resourcekey=0-kJjfgnuEca1de4u8mbHrig

Bug: 308693847
Test: Manual
Flag: LEGACY SHRINK_NAV_HANDLE_ON_PRESS DISABLED
Flag: LEGACY ANIMATE_LPNH DISABLED
Change-Id: I6ecbc849ac1c066a4c018325f0237a61641d99aa
2024-05-03 17:53:34 -07:00
Vinit Nayak 13dea8cbc9 Disable gestures when split apps are animating in from shell
Bug: 286509643
Test: See other CL in topic
Change-Id: Ic770bdf5ae6f847b1deca3b1d7e5a389ddd6663e
2024-05-03 14:52:11 -07:00
Holly Sun 3b36a82cff allKeys in DeviceConfigHelper should be populated with keys.
We have 2 instances of `DeviceConfigHelper`. One is `DeviceConfigHelper<SearchConfigProvider>` which contains all the old keys. One is DeviceConfigHelper<DeviceConfigWrapper> which contains all the new(omni) keys.

Bug: 338430152
Test: manual
Flag: NA
Change-Id: Ic0450df795888c8e5e7892157a8596cd86eb0d99
2024-05-03 13:25:03 -07:00
Treehugger Robot 7cc2ab636f Merge "Determine split leash position by taskId instead of bounds" into main 2024-05-03 19:56:54 +00:00
Alex Chau 17d5f77ff5 Remove TaskView.isDesktopTask
- Replace with DesktopTaskView instanceOf check

Bug: 249371338
Test: Manual
Flag: None
Change-Id: I02034775d3b76646ec4603026fc9e617b055f77c
2024-05-03 19:05:54 +01:00
Ats Jenk b67d07912c Merge "Drag bubble in bubble bar to other side" into main 2024-05-03 16:41:55 +00:00
Vinit Nayak 070c3661d5 Determine split leash position by taskId instead of bounds
* Previously we were comparing bounds of the leash to determine
which leash was leftTop vs bottomRight
* That didn't work when we were translating the split apps when
IME is showing in portrait split screen
* Transitions between IME showing to recents animation could
probably use some work, but that itself is not a regression.

Bug: 330714602
Test: Tested on large and small screen with IME up on both apps
No more empty hole

Change-Id: Ie08ac644e5d1bcc48ba57e05e25bbee66afa3d37
2024-05-02 15:45:23 -07:00
Tracy Zhou c9b5b0a3dd Merge "Add ime back button logic to the init block of NavbarButtonsViewController" into main 2024-05-02 21:16:54 +00:00
Fengjiang Li c2ef74306b Merge "[Launcher Jank] Pass single threaded Executor to RotationButtonController so that binder calls are ordered." into main 2024-05-02 20:08:50 +00:00