Commit Graph

5112 Commits

Author SHA1 Message Date
Liran Binyamin 013a4121be Merge "Suppress bubble animation when IME is visible" into main 2024-05-16 18:22:38 +00:00
Liran Binyamin 2cbb6dc5e4 Suppress bubble animation when IME is visible
When the IME is visible we now don't animate the bubble bar.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 340532785
Test: manual
Change-Id: I31fcf6a1fe81d907a9a02780ba42813111ac7e90
2024-05-16 10:15:19 -04:00
Alex Chau ed9e3a8701 Merge "Convert TaksView to Kotlin" into main 2024-05-16 14:00:02 +00:00
Liran Binyamin 606e9fde47 Merge "Animate bubble update notifications" into main 2024-05-16 13:13:57 +00:00
Chris Göllner 4b6d2d4fa3 Merge "Shortcut Helper - Integrate with launcher 3 button nav translation" into main 2024-05-16 12:40:22 +00:00
Alex Chau 9565667813 Convert TaksView to Kotlin
- PS1: Android Studio conversion (unformatted, cannot compile)
- PS2: Fix compilation issues and formatting
- PS3: First pass ready for review
- PS4: Minor changes (Remove Consumer, remove unnecessary null-checks)
- PS5: Removed check() around taskContainers, which is now lateinit and should always be initiailzed. Also ensure TaskView is bound before adding to parent.
- PS6: Move a bunch of getters to use .property style
- PS8: Refacoted RecentsView.applyLoadPlan bind logic, to avoid inflating TaksView, bind, add then immediatley remove
- PS10: Turned more functions to express functions; added an extension function
- PS11: Re-order functions, no code changes
- PS12: Reverted unit express function back to {} style

Bug: 339787593
Test: Manual
Flag: NONE
Change-Id: I75c06cf29718d8f258a4124997bcb054f5eb056f
2024-05-16 12:33:28 +01:00
Sam Cackett 1ee568bf13 Merge "Add metric logging for fake landscape usage" into main 2024-05-16 10:28:26 +00:00
Pragya Bajoria 571c9b288d Merge "Remove obsolete desktop stashing logic from platform/packages/apps/Launcher3 [5/n]" into main 2024-05-16 09:50:17 +00:00
Liran Binyamin 03a2ab1e56 Animate bubble update notifications
Updates to existing bubbles now cause the bubble bar to animate in
similarly to new bubble notifications.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: manual
Change-Id: Ib53316889170e0392f055242c6206882084b4a46
2024-05-15 12:13:12 -04:00
Pragya Bajoria d9900e0d17 Remove obsolete desktop stashing logic from platform/packages/apps/Launcher3 [5/n]
Bug: 309481654
Change-Id: Id7b5db662d578eb625171055d30c37cd59e7d73c
Flag: EXEMPT refactor since it is removing obsolete code with no changes to current behavior.
2024-05-15 09:16:13 +00:00
samcackett 76331b6c17 Add metric logging for fake landscape usage
- Reuse existing TaskSwitcherContainer for Overview metric logging
- Log current orientation state for Overview when interacting with
gestures or via three button nav
- Log current orientation state on each phone rotation

Bug: 332870519
Test: Manual
Flag: NA
Change-Id: Ia10cf1acb809432175daab55151998f0d77362f9
2024-05-15 09:42:08 +01:00
Holly Sun 49dc99abb0 [omni] Handle touch slop for LPAA.
Only handle touch slop when the taskbar is pinned (not isTransientTaskbar).

Bug: 335018496
Test: manual
Flag: legacy CUSTOM_LPAA_THRESHOLDS disabled
Change-Id: I4dc6dba473455b02208ef254c271a767bd7c8d42
2024-05-14 16:16:02 -07:00
Holly Jiuyu Sun 5334c82136 Merge "[omni] Dynamically configure timeout for LPAA." into main 2024-05-14 21:45:03 +00:00
Holly Sun 8b38295fb2 [omni] Dynamically configure timeout for LPAA.
Video: https://drive.google.com/file/d/1N7qOIolcSYM9n3z40FO9O6S_IdLJav9l/view?usp=sharing

Bug: 335018496
Test: manual
Flag: legacy CUSTOM_LPAA_THRESHOLDS disabled
Change-Id: I5b0f7cc7815ecd85c51254ad34f2be521c44795c
2024-05-14 12:42:28 -07:00
Chris Göllner fa09b12443 Merge "Convert SysUiState flags from int to long" into main 2024-05-14 10:44:40 +00:00
Orhan Uysal 3da07952c5 Merge "Disable drag from taskbar while in desktop." into main 2024-05-14 09:02:45 +00:00
Jeremy Sim 6243da4667 Merge "Fix bug with flickering actions bar" into main 2024-05-13 19:27:02 +00:00
Jeremy Sim 6198cf6544 Fix bug with flickering actions bar
This CL fixes a bug caused by ag/27148514. The bug occurred because:

1) The new way we use FloatProperty to set the alpha did not have a working `get()` function, so it just returned a junk value, set to `-1f` (I didn't think `get()` would ever be called meaningfully for this property).

2) However, during certain UI interactions, `RecentsView#updateActionsViewFocusedScroll()` is called many times in a loop, which repeatedly tries to re-start the fade-in animation for actions bar. Pre ag/27148514, even though the fade-in animation was called repeatedly, it would start and then immediately stop running because it realized that it was already set to the desired alpha. However now that we return a junk value for `get()`, it didn't know to skip and just ran the full fade-in animation again and again.

Fixed by refactoring FLOAT_SETTER (now ALPHA_PROPERTY) and creating a new data class, OverviewActionsAlphaProperty, that handles some of the intricacies of this increasingly complicated alpha system.

Fixes: 339545510
Test: Swipe to Overview, move tiles around, actions bar does not flicker.
Flag: ACONFIG com.android.wm.shell.enable_app_pairs NEXTFOOD
Change-Id: I1093363780db5e0780deda2ff14b4f7361d63940
2024-05-13 10:40:31 -07:00
Liran Binyamin 3fcdc0a39f Merge "Handle touch on bubble bar while animating" into main 2024-05-13 17:30:40 +00:00
Chris Göllner 11398e2a36 Shortcut Helper - Integrate with launcher 3 button nav translation
Fixes: 335625543
Test: Unit tests in this CL
Test: Manually
Flag: ACONFIG com.android.systemui.keyboard_shortcut_helper_rewrite DEVELOPMENT
Change-Id: I0367bf4b73994a49ca65b8047bd76d3dc2b3faca
2024-05-13 14:47:57 +01:00
Chris Göllner 0cd995e4ef Convert SysUiState flags from int to long
We already reached the limit of 32 flags for an int. To be able to have
more, changing from int to long.

This is needed, as new flags have to be added.

Flag: NONE
Test: Manually running SysUI and Launcher
Test: Unit tests in CL
Bug: 335625543
Change-Id: Iec1d40218264c7c64c50fd09764aa07c0caa7787
2024-05-13 14:47:33 +01:00
Liran Binyamin 6097a29158 Handle touch on bubble bar while animating
This change handles touches on the bubble bar while the bubble bar is animating.
We now update the taskbar touch region during the animation to make the bubble bar touchable.
When the bubble bar is touched during the animation, we now cancel the animation and allow dragging or clicking to expand.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/gtGS6FCrygN5RKueFtPs5E

BubbleBarTest 100x run: https://android-build.corp.google.com/abtd/run/L42600030003675041
Note that in the abtd run above there's a flake but that's for a different test which I'll look into separately.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605790
Bug: 280605846
Bug: 339066271
Fixes: 339244038
Test: See demo
Test: atest BubbleBarViewAnimatorTest
Change-Id: Icb8f4fa46ae4bb8c94ca931193d4a3cc49c5b718
2024-05-13 09:41:23 -04:00
Luca Zuccarini 50a7190efa Merge "Update alpha animation for All Apps / Divider icon." into main 2024-05-13 13:32:23 +00:00
Orhan Uysal c42c8e76e4 Disable drag from taskbar while in desktop.
Currently drag from taskbar is broken. It will be fixed once drag from
taskbar to desktop is implemented in b/297921594.

Bug: 323388149
Test: Try to drag an app from taskbar while in desktop, see that app is
not launch and icon goes back to it's place in taskbar.
Flag: NONE

Change-Id: I27e73d8262e14944b34e193397a83f8435813339
2024-05-13 09:23:34 +00:00
Vadim Tryshev 575d15f231 Cleaning up TestProtocol
Bug: 262282528, 279059025, 322823209
Test: presubmit
Flag: N/A
Change-Id: I9af6e3f1fc49b2ebf0d99df8c4514de0bddee8f2
2024-05-10 11:03:24 -07:00
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
Jon Miranda c7e5813d97 Update alpha animation for All Apps / Divider icon.
This prevents the icons from lingering as the spring settles for the scaling reveal
home animation.

Bug: 298089923
Test: go from app to home, from overview to home, vice versa
Flag: ACONFIG com.android.launcher3.enable_scaling_reveal_home_animation DISABLED
Change-Id: I6bc3f0fcbdc63f0c064d425c8ebaf62a20451ac1
2024-05-09 13:34:46 -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
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
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
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
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
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
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
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