Commit Graph

11018 Commits

Author SHA1 Message Date
Kshitish Vyas
f309097aa8 Merge "Ensure starting position rect isn't empty in FloatingTaskView" into 24D1-dev 2024-06-10 18:33:32 +00:00
Winson Chung
669b9c5c30 Always report mandatory insets for button nav
Fixes: 340134342
Fixes: 343817842
Test: atest android.systemui.cts.WindowInsetsBehaviorTests
Test: Verify mandatory insets vs window bounds in various
      orientations when folded/unfolded
Change-Id: I18d4f5d212d16c62d15d84b4842b3d20c0d8c5ae
Merged-In: I18d4f5d212d16c62d15d84b4842b3d20c0d8c5ae
(cherry picked from commit 762b3b4685)
2024-06-07 05:18:36 +00:00
Vinit Nayak
f8efb32379 Ensure starting position rect isn't empty in FloatingTaskView
* on rotation taskbar re-inflates it's hotseat views.
If we're already in split, then FloatingTaskView tries to do calculations
on the view's position in the window, but has a reference to the
old, pre-rotated view which is no longer in any window.
* This sets startingPosition to be an empty rect, which is used to
set LayoutParam values, which are used downstream in update() to calculate
scale, and thus we end up dividing by 0.
* TODO(b/345556328) figure out a better solution than checking for an
empty rect

Fixes: 342606096
Test: Repro steps don't cause crash
Flag: EXEMPT bugfix
Change-Id: Icb546a05d383d1997a92471fc1de3ffc37d06eca
Merged-In: Icb546a05d383d1997a92471fc1de3ffc37d06eca
(cherry picked from commit 410681a955)
2024-06-07 03:24:37 +00:00
Treehugger Robot
85e9c6f1a2 Merge "Cancel manual animation if LauncherState changes during drag." into 24D1-dev 2024-05-31 19:27:25 +00:00
Priyanka Advani
8ec05c628b Merge "Revert "Always report mandatory insets for button nav"" into 24D1-dev 2024-05-30 18:50:44 +00:00
Chaitanya Cheemala
1773b06050 Revert "Always report mandatory insets for button nav"
This reverts commit 4304a14206.

Reason for revert: Likely culprit for b/343564388  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Ibc6fae27f31bcb54406da013babc76b2d5fc7f10
2024-05-30 11:44:57 +00:00
Winson Chung
6de4b5286a Merge "Always report mandatory insets for button nav" into 24D1-dev 2024-05-29 22:56:05 +00:00
Jeremy Sim
1abc4761cc Address jank and memory issues with OverviewActionsView
Attempt to improve jank and memory regressions by simplifying the view layout of OverviewActionsView.

Bug: 339688091
Bug: 339853741
Test: testSaveAppPairMenuItemOrActionExistsOnSplitPair()
Flag: EXEMPT bugfix
Change-Id: Ib4a7c5a813b221c0a083144e7fb1e1c5f3fedb1c
2024-05-29 18:15:32 +00:00
Winson Chung
4304a14206 Always report mandatory insets for button nav
Fixes: 340134342
Test: atest android.systemui.cts.WindowInsetsBehaviorTests
Change-Id: Iee9d5ca9f12ff63f856e7aa94227e5b8273e02a4
2024-05-29 06:39:57 +00:00
Vinit Nayak
b34cc291d0 Merge "Return false for isSplitSelectionActive() if controller not initialized" into 24D1-dev 2024-05-28 20:39:58 +00:00
Vinit Nayak
364d784242 Merge "Disable gestures when split apps are animating in from shell" into 24D1-dev 2024-05-28 20:21:53 +00:00
Vinit Nayak
f9b81f24a4 Return false for isSplitSelectionActive() if controller not initialized
Test: unable to repro
Fixes: 342716244
Flag: EXEMPT bugfix
Change-Id: I9d7d54d5f7571286778c0e82ef4082f9b5843c1d
(cherry picked from commit b449116345)
Merged-In: I9d7d54d5f7571286778c0e82ef4082f9b5843c1d
2024-05-28 20:19:46 +00:00
Winson Chung
21bb36fa66 Report gesture height for mandatory system gestures
- We are currently reporting the content insets for the mandatory system
  gestures in taskbar, but for button nav we should actually be
  reporting zero, and for gesture nav we should either report the
  content height if the taskbar is pinned, or the gesture height
  otherwise as the bottom mandatory gesture inset

Fixes: 340134342
Test: atest android.systemui.cts.WindowInsetsBehaviorTests
Change-Id: Ie4d56b62c903c273db95c19c9d34fcfe6c9ce486
Merged-In: Ie4d56b62c903c273db95c19c9d34fcfe6c9ce486
(cherry picked from commit 05682a059f)
2024-05-24 07:15:17 +00:00
Vinit Nayak
f08e1afa37 Disable gestures when split apps are animating in from shell
Bug: 286509643
Test: See other CL in topic
Change-Id: Ic770bdf5ae6f847b1deca3b1d7e5a389ddd6663e
Merged-In: Ic770bdf5ae6f847b1deca3b1d7e5a389ddd6663e
2024-05-23 22:54:55 +00:00
Winson Chung
ab8e999f81 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

Merged-In: I565b4bee4ab5f7040910306b1fd60a4fc3bf9a1c
Change-Id: I9658b63672b692c42563c111c11be2433c98d535
2024-05-21 23:01:19 +00:00
Tracy Zhou
8355bc1a76 Set inset in phone setup mode to setup inset
- In phone setup mode, gesture mode is no button but the inset we report should be setup inset

Fixes: 340998601
Test: https://screenshot.googleplex.com/8Q4WHorpUeqWSjw
Change-Id: I84d60ecc7179008e80e7b09eda5b3a1abb24e138
(cherry picked from commit b17af6ff75)
2024-05-20 16:24:50 +00:00
Jeremy Sim
ee9e655c5c 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
Merged-In: I1093363780db5e0780deda2ff14b4f7361d63940
2024-05-14 21:10:10 +00:00
Jeremy Sim
740a52a27c 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
Merged-In: I1b6be4637ac8c8d424e7633c437fca376ecdd757
2024-05-14 21:09:56 +00:00
Brandon Dayauon
66176c745c Merge "Make all apps text focusable by accessibility." into 24D1-dev 2024-05-13 18:10:22 +00:00
Brandon Dayauon
deb2e2c35e Make all apps text focusable by accessibility.
From b/330638194, the requirement is that
1. "all apps" can be focusable with talkback
2. "all apps" text is persisted when in accessibility mode.

Merged-In:Ibabb92bd9d202221fdc9cfacb585755167898187
bug:330638194
Test: manual video: https://drive.google.com/file/d/1QI_F4dUijfnU2ahE2Mg6yrmRJfOVyuVJ/view?usp=sharing
Flag: None

Change-Id: Ibabb92bd9d202221fdc9cfacb585755167898187
2024-05-10 18:19:27 +00:00
fbaron
95df178e4f Fix bug where hotseat disappears
Fix: 336096469
Bug: 339700174
Flag: NONE
Test: n/a
Change-Id: Ie567c08445d7743281f501c782a8fd51a75ad9bc
(cherry picked from commit cf10603ed3)
2024-05-10 15:44:57 +00:00
Tracy Zhou
bd940cdcee 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
(cherry picked from commit 9d602e684c)
2024-05-09 05:50:58 +00:00
Andy Wickham
8b75bde581 Merge "Implement animateNavBarLongPress for stashed taskbar." into 24D1-dev 2024-05-07 22:07:51 +00:00
Anushree Ganjam
03d13287d8 Merge "Add dump for PredictionRowView." into 24D1-dev 2024-05-07 20:28:04 +00:00
Andy Wickham
649903838e Cancel manual animation if LauncherState changes during drag.
Previously, the following would cause the All Apps panel to appear
in NORMAL state:

1. Start dragging to all apps
2. During the drag, something sets Launcher to NORMAL
3. Release finger  -> animation to all apps completes, but state
   is still NORMAL

Side effects of this:
 - On large screens, All Apps draws its background on Launcher's
   ScrimView only if the current state is All Apps. So in this
   case, the apps just floated above the workspace.
 - On handheld, touches are handled by workspace even though you
   can see the All Apps list. So e.g. if you swipe down, the
   notification shade appears rather than all apps panel hiding
   (although it seems this touch issue was addressed separately).

I'm not sure if this is the main/only case of this state mismatch
happening, but verified with local async state changes that this
could in theory happen. We haven't been able to organically repro
the bug reliably. That being said, it feels plausible that a well
timed screen lock during the all apps transition could also hit
this case.

Demo videos with hard-coded state change to NORMAL 2 seconds after
you start swiping up to all apps (note I release my finger at the
end of each video):
https://drive.google.com/drive/folders/1ul8ep9N2M5oc6ZSbf_ZHQwp9IwTpz7GB?resourcekey=0-4LAufl0rkvtjvgZC0L-eMQ&usp=drive_link

Bug: 239394946
Bug: 331600490
Test: Manual with local async launcher state changes
Flag: NA
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:22dee942b595acae7a804b3008d9b732dad42620)
Merged-In: I6364dbde8aea67f5d1c525edf57ed7eb26096cf9
Change-Id: I6364dbde8aea67f5d1c525edf57ed7eb26096cf9
2024-05-07 20:24:31 +00:00
Vinit Nayak
eaf9f083dc Merge "Determine split leash position by taskId instead of bounds" into 24D1-dev 2024-05-07 18:02:44 +00:00
Tracy Zhou
63da44e7eb Merge "Update SUW swipe home logic for taskbar stashing" into 24D1-dev 2024-05-07 15:33:00 +00:00
Tracy Zhou
2155a925fc Merge "Fix 3-button showing up briefly on the AllSet page in setup" into 24D1-dev 2024-05-07 01:26:01 +00:00
Andy Wickham
1b6a08abd6 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3a7a76f88e51453cc4b70fa68aef2724cccc02c6)
Merged-In: I6ecbc849ac1c066a4c018325f0237a61641d99aa
Change-Id: I6ecbc849ac1c066a4c018325f0237a61641d99aa
2024-05-06 23:46:21 +00:00
Treehugger Robot
c5fec774b2 Merge "Fix null pointer in FloatingWidgetView" into 24D1-dev 2024-05-06 22:55:57 +00:00
Tracy Zhou
6d3a1d8f50 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
(cherry picked from commit b297d4fb83)
2024-05-06 22:34:36 +00:00
Tony Wickham
4f54ccebb5 Merge "Remove obsolete binder calls to TaskTransitionSpec" into 24D1-dev 2024-05-06 21:09:27 +00:00
fbaron
7435831cbd Fix null pointer in FloatingWidgetView
Flag: NONE
Test: NONE
Bug: 331868669
Change-Id: I350e6660ea1936bb9ee799c3d2c840c57876fef4
(cherry picked from commit c0c0bdbc38)
2024-05-06 20:58:14 +00:00
Tracy Zhou
3196b7ca5c 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
(cherry picked from commit cb8eb189f1)
2024-05-06 19:06:23 +00:00
Sukesh Ram
f1b3a2fc12 Merge "Replace Contextual Rotation Button with Floating Action Button" into 24D1-dev 2024-05-06 17:31:49 +00:00
Tony Wickham
35b08fe4b2 Remove obsolete binder calls to TaskTransitionSpec
Fixes: 334312256
Flag: none
Test: manual (no visual regression)
Change-Id: Ie20dc8d4bb0c85a8a256b001fbb92405679618a8
Merged-In: Ie20dc8d4bb0c85a8a256b001fbb92405679618a8
(cherry picked from commit a179a77e09)
2024-05-03 21:59:24 +00:00
Hongwei Wang
a089315793 Merge "Add debugging information on PiP content overlay" into 24D1-dev 2024-05-03 19:57:50 +00:00
Vinit Nayak
9a3b1ce673 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-03 19:13:34 +00:00
Tracy Zhou
098c477a04 Merge "Add ime back button logic to the init block of NavbarButtonsViewController" into 24D1-dev 2024-05-03 18:05:55 +00:00
Anushree Ganjam
37845c540b Add dump for PredictionRowView.
adb shell dumpsys activity NexusLauncherActivity : https://paste.googleplex.com/4907497231482880

When AllApps prediction is off : https://paste.googleplex.com/5930628737925120

Bug: 332171918
Test: Manual
Flag: NA
Change-Id: I753ff876aab162026d99fd1b35f63edf2e712f70
(cherry picked from commit 1115b416bb)
2024-05-03 17:08:44 +00:00
Vinit Nayak
afb770c737 Merge "Allow single root candidate for app pair launch for pip edge case" into 24D1-dev 2024-05-03 06:30:43 +00:00
Tracy Zhou
7b4cd90332 Add ime back button logic to the init block of NavbarButtonsViewController
Fixes: 338320015
Test: Run adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity. Make sure the back key shows by default but hides when IME renders back arrow.
Change-Id: I8baeb10d3f5b13c3bac084872d77d881c1513733
(cherry picked from commit 4b43cfbc04)
2024-05-03 06:24:59 +00:00
Vinit Nayak
55270a9f70 Allow single root candidate for app pair launch for pip edge case
* Shell will launch single task if requested split apps have one of them
already in Pip
* Create a separate method to set animation for launching from the
appPair icon on workspace
* Reuse the animation method for launching an AppPair icon from taskbar
by specifying which windowing mode to look for if we're launching the
actual split pair vs just one in fullscreen

Bug: 323089902
Test: Launches fine visually
Change-Id: I415343a48e980afd7f4e511558d350cf15b97ca1
Merged-In: I415343a48e980afd7f4e511558d350cf15b97ca1
2024-05-02 22:49:25 +00:00
Sukesh Ram
8bce9e5940 Replace Contextual Rotation Button with Floating Action Button
When foldable is in 3 button, the rotation button is covered by the device’s camera cutout upon rotation.

This CL replaces Contextual Rotation Button with Floating Action Button for taskbar and navbar.

Flag: NONE
Test: Manually tested on Felix & panther.
Bug: 324070001
Change-Id: I8bd9acdeec8ade4c8183c42056bf67b1c825906c
Merged-In: I8bd9acdeec8ade4c8183c42056bf67b1c825906c
2024-05-02 22:30:49 +00:00
Hongwei Wang
cdb9690a87 Add debugging information on PiP content overlay
Added the reason for creating the overlay. Updated
SwipePipToHomeAnimator constructor also due to the fact the source rect
hint from Builder class is never empty.

Bug: 330488822
Test: manually, follow the reproduce path
Flag: NA
Change-Id: Id98ce799d7c96fff3279c0df0fa49084a49d563a
2024-05-02 17:01:17 +00:00
Tracy Zhou
58a018746d Do not hide nav bar on the homescreen from setup
FLAG_STASHED_SMALL_SCREEN is not updated after setup UI finishes.

Fixes: 337738795
Test: Finish setup, swipe home in folded, and observe home handle is visible.
Change-Id: I297e3b44f49f94ab5a1b9fe5ff16ff64c6cf2c0a
(cherry picked from commit ee67a48d60)
2024-05-01 00:08:47 +00:00
Vinit Nayak
4dfda85f2a Merge "Revert^2 "Launch split tasks at beginning of animation instead of the end"" into 24D1-dev 2024-04-26 18:18:56 +00:00
Saumya Prakash
edc8a0a967 Merge "Increase the delay in between gesture tutorials" into 24D1-dev 2024-04-26 18:05:21 +00:00
Vinit Nayak
242b67eda8 Revert^2 "Launch split tasks at beginning of animation instead of the end"
This reverts commit fb092a9a6c.

Reason for revert: b/333937249

Change-Id: I77bd6c0d2fbe2f2dad074e8e0e741b50d4d7c204
(cherry picked from commit a6bf5a0014)
2024-04-25 23:11:26 +00:00
Saumya Prakash
436f342b5a Merge "Only run search edu when enabled, also make code more generic." into 24D1-dev 2024-04-25 22:10:32 +00:00