Commit Graph

299 Commits

Author SHA1 Message Date
Brian Isganitis
9c311b2917 Keep persistent Taskbar visible over Taskbar All Apps.
Additionally, this CL fixes some touchable insets issues with the
overlay window. Dragging and dropping is now reliable from taskbar while
All Apps or EDU is also open.

Change-Id: Ia612c1b5266a8fb2b7005a773fbd2b00ec4824db
Bug: 279465803
Bug: 275890048
Bug: 264463659
Flag: PERSISTENT_TASKBAR_OVER_TASKBAR_ALL_APPS (Teamfood)
Test: Taskbar is functional over All Apps and EDU.
2023-05-04 23:54:27 -04:00
Tony Wickham
3cfada0a00 Simplify/correct Taskbar insetsRoundedCornerFrame calculation
Now we base it on the current tappableElement insets, which will only be
> 0 for the unstashed, persistent taskbar which draws rounded corners.
This inset also stays stable during temporary stash transitions such as
when the IME is showing.

Flag: ENABLE_TRANSIENT_TASKBAR=true, ENABLE_TASKBAR_PINNING=true
Test: in split screen for both transient and pinned (persistent)
taskbar, ensure split screen divider bottom is drawn appropriately
Fixes: 278028503

Change-Id: Iab56c5dc8f9fc81c34aa01f41b5212dd5c6fd7f0
2023-04-28 23:51:41 +00:00
Jagrut Desai
c6d625b8db Exposing functionality to pin Taskbar from TaskbarDividerPopupView.
This CL allows user to long press on Taskbar divider view to bring up divider popup view. It also included functionality of allowing user to turn on always show taskbar from the divider popup view.

Test: Manual
Bug: 265436055
Bug: 265434718
Bug: 265434902
Bug: 265434705
Flag: ENABLE_TASKBAR_PINNING

Change-Id: Ied54d718483a9b06b053d68988e5c294a786002a
2023-04-20 22:04:21 -07:00
Brian Isganitis
91b0e2d6d1 Merge "Properly compute scroll for Taskbar All Apps." into udc-dev 2023-04-19 14:36:21 +00:00
Vinit Nayak
b0f1da28fe Merge "Prevent taskbar on phone from crashing" into udc-dev 2023-04-18 00:49:48 +00:00
Brian Isganitis
01be7eeb57 Properly compute scroll for Taskbar All Apps.
It was hooked up to Launcher All Apps scroll, which is a separate
instance from Taskbar.

Test: atest WMShellFlickerTests
Fix: 270770472
Change-Id: I14b11c8b5f1143886dd5976a12bba9e4ee66aa96
2023-04-17 18:19:54 +00:00
Vinit Nayak
f00760ac23 Prevent taskbar on phone from crashing
* Update code behind flag to work with transient taskbar
* We explicitly set the mDestroyed flag to false in
TaskbarActivityContext because it gets set to true when
the flag is on, but nothing resets it unless it gets
recreated normally.

Bug: 274517647
Flag: persist.wm.debug.hide_navbar_window
Test: Enable flag and verify no crash
Change-Id: I9a149ffb47a10efedfc9dff8399d12d4c1a31553
2023-04-13 14:33:17 -07:00
Mike Schneider
593ff77267 Revert ag/22195243 and solve the initialization issue it was supposed to fix differently
The fix caused a flicker tests to fail, but that is specific to the persistent taskbar used in tests only.

Bug: 277470898
Bug: 277003116
Fixed: 277470898
Fixed: 277003116

Test: Flicker tests passes
Test: Manual (http://shortn/_kiAZykhZsp)
Test: Tapl presubmit tests
Change-Id: Ib9daebf3b06af2f1a4a3b7461acf91f204ff281b
2023-04-13 11:37:39 +00:00
Brian Isganitis
3ef917a4e3 Cleanup ENABLE_TASKBAR_EDU_TOOLTIP: remove EDU sheet.
Test: Manual
Fix: 270396268
Change-Id: I3cebdb6646060cf6793e5ffc638213dde41338c0
2023-04-10 12:55:18 -04:00
Jagrut Desai
3aaae66d37 Merge "Taskbar System Action with Broadcast Receiver." into tm-qpr-dev am: d1d0fb8607 am: 99e6efe6f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22242613

Change-Id: I2cd41ac48e58ac04f4600f6d63b5915fc260c48f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 18:40:46 +00:00
Jagrut Desai
d2140ba498 Taskbar System Action with Broadcast Receiver.
Test: Manual
Bug: 265618836
Change-Id: I734402ef277a09cf5e41aa63f8be09375706c17a
2023-03-29 10:37:45 -07:00
Jon Miranda
a97dc04478 Merge "Add taskbarIconSize to GridOption/DisplayOptions" into tm-qpr-dev am: 085c53869f am: 3cd39729dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22228076

Change-Id: I3cb2d462cef1df514c87418ed70ac624899c21fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 23:02:51 +00:00
Jon Miranda
085c53869f Merge "Add taskbarIconSize to GridOption/DisplayOptions" into tm-qpr-dev 2023-03-24 21:51:42 +00:00
Jon Miranda
9c478b6c29 Add taskbarIconSize to GridOption/DisplayOptions
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
  sizes

Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
2023-03-24 12:29:11 -07:00
Johannes Gallmann
1103621fbc Merge "Fix taskbar linger above notification shade" into tm-qpr-dev am: 96892011ff am: cea344515e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22162582

Change-Id: Idb6d573353381d7d7bb980beed5b8a660389da05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 10:34:16 +00:00
Johannes Gallmann
c2e5bfca50 Fix taskbar linger above notification shade
Remarks:
1. I think the correct fix for this would be to have the Taskbar z-ordered below the notification shade. That however seems to be difficult because there are cases when the taskbar window must be above the notification shade.
2. This CL improves the behaviour by starting the taskbar disappear animation when the notification panel is half expanded instead of waiting for the full expansion. This improves the UX when expanding the shade slowly. When expanding the shade quickly, this CL does unfortunately not significantly improve the UX.
3. I believe that the `SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED` and `SYSUI_STATE_QUICK_SETTINGS_EXPANDED` flags can be replaced by the newly introduced one. But since this would pose the risk of introducing new bugs, I did not do that in this CL. It is my intention to create a CL with that replacement in udc.

Bug: 272621219
Test: Manual, i.e. observe Taskbar behaviour when pulling down notification shade and expanding quick settings
Change-Id: Ic79d3f41ed224cb1abdbac9011c6d27e0f458ec2
2023-03-23 10:31:25 +01:00
Mike Schneider
2736f2ed5b Do not play unstash animation when unlocking the device am: 94f46e14f4 am: 14db451c21
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22119728

Change-Id: I201404e1642a22dabae740e01d4b8bd06d36ca3b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 16:18:10 +00:00
Mike Schneider
94f46e14f4 Do not play unstash animation when unlocking the device
The unstash is ignored by TaskbarStashController, while the TaskbarLauncherStateController positions the hotseat on the launcher correctly without animation.

Since the TaskbarStashController is used even with 3p launchers, both of these actors keep track of whether the device is locked independently, based on the SysUI flags.

Bug: 270139677, 266890635, 274084408
Test: manually, Tapl
Change-Id: Iae94522b5d57cc89c9a4d219ad1254b150a3400d
2023-03-22 09:10:03 +01:00
Mike Schneider
42a8fe91db Merge "Do not perform invisible transitions while the screen is off." into tm-qpr-dev 2023-03-22 08:04:09 +00:00
Jon Miranda
7953f25c3c Merge "Add spring animation when stashing transient taskbar." into tm-qpr-dev am: ba85154590 am: 9c0ad5f746
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22178236

Change-Id: Ibec649f0c7d6181ac52e2067898fe4b0b82f01a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 03:46:12 +00:00
Jon Miranda
ba85154590 Merge "Add spring animation when stashing transient taskbar." into tm-qpr-dev 2023-03-22 02:34:46 +00:00
Jeremy Sim
e71032e2cf Merge "Fix bug where Taskbar was not auto-hiding after splitscreen launch from icon menu" into tm-qpr-dev am: 3c8def9f88 am: ce97be3d12
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22077752

Change-Id: I38ab3fedc4a6cbb164a8b0f8e5a8be8f1c4a4aea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 00:15:48 +00:00
Jeremy Sim
3c8def9f88 Merge "Fix bug where Taskbar was not auto-hiding after splitscreen launch from icon menu" into tm-qpr-dev 2023-03-21 23:34:34 +00:00
Jeremy Sim
8eed87ac89 Fix bug where Taskbar was not auto-hiding after splitscreen launch from icon menu
This patch fixes a bug where the transient Taskbar was not hiding properly after splitscreen was initiated. When the user is inside an app and launches splitscreen by longpressing on a Taskbar icon and selecting the split button, the transient Taskbar should hide right away. This is an equivalent action to dragging the Taskbar icon up to create a split, and should hide the Taskbar so that other UI elements (like system-level toasts and error messages) can be seen.

The bug occurred because updateAndAnimateTransientTaskbar() is not being called in this specific code path to stash the Taskbar.

Fixed by adding a new call to updateAndAnimateTransientTaskbar upon clicking the splitscreen menu button.

Fixes: 272292897
Test: Manual
Change-Id: I64a9acfc41ddcaba4d9f43eb216458de44b4c9a4
2023-03-21 14:35:36 -07:00
Mike Schneider
308b7849db Do not perform invisible transitions while the screen is off.
This change caches whether launcher was active at the time of the screen
off, and assumes this last state when the screen is actually off.

While trying to understand the code, I renamed a couple class-internal
methods and flags, plus added comments. If they are not accurate, its
due to a misunderstanding on my part, and I will gladly revisit and
check whether all the assumptions I made still hold.

Bug: 261418621
Test: manually

Change-Id: I2ad25caf478100781a063c356c5fd2d20d3e1917
Merged-In: I2ad25caf478100781a063c356c5fd2d20d3e1917
2023-03-21 21:02:55 +00:00
Jon Miranda
3344ec7004 Add spring animation when stashing transient taskbar.
Bug: 273961611
Change-Id: I35a658a5e30a155094a48effdefc3895f45e0483
Flag: ENABLE_TRANSIENT_TASKBAR
Test: stash transient taskbar
2023-03-21 10:25:48 -07:00
Mike Schneider
7b410f24b4 Do not perform invisible transitions while the screen is off.
This change caches whether launcher was active at the time of the screen
off, and assumes this last state when the screen is actually off.

While trying to understand the code, I renamed a couple class-internal
methods and flags, plus added comments. If they are not accurate, its
due to a misunderstanding on my part, and I will gladly revisit and
check whether all the assumptions I made still hold.

Bug: 261418621
Test: manually

Change-Id: I2ad25caf478100781a063c356c5fd2d20d3e1917
2023-03-21 10:27:13 +00:00
Brian Isganitis
7654a32a29 Merge "Log when FLAG_STASHED_IN_APP_AUTO changes." into tm-qpr-dev am: 201a8f5ea3 am: c9905fed66
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21778876

Change-Id: I56f40e88f58630b919fc1231fc1b230074c186bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 18:22:53 +00:00
Brian Isganitis
201a8f5ea3 Merge "Log when FLAG_STASHED_IN_APP_AUTO changes." into tm-qpr-dev 2023-03-14 17:16:43 +00:00
Brian Isganitis
31dded9c2a Ensure taskbar background always transparent in notification tray. am: 84261f9d9b am: 16fdd8b4f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21593273

Change-Id: I24d71d5ef12be305576149fd30666d951c033481
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 00:46:58 +00:00
Brian Isganitis
84261f9d9b Ensure taskbar background always transparent in notification tray.
Persistent, taskbar can be in light or dark modes. Since notification
tray has its own background color, we should hide ours to avoid clashing
with it.

Test: Manual
Fix: 270758899
Change-Id: Iedc6aae42aac30987af3259ccee11c5998e10517
2023-03-08 23:51:34 +00:00
Brian Isganitis
d1b7b5141f Merge "Log when taskbar is in task switcher container." into tm-qpr-dev am: ba5b25c198 am: cba28f0b3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21780681

Change-Id: Iac3de6884edf1a160da9baeb33929fcdd92eaf3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 19:45:04 +00:00
Brian Isganitis
c762ef68d4 Log when taskbar is in task switcher container.
Test: wwdebug & wwlogcat
Bug: 261177876
Change-Id: Id4eda7ee7e4e2c1aa60e07d5b65410b3847d9ac6
2023-03-07 03:29:21 +00:00
Brian Isganitis
cdc13fc4e8 Log when FLAG_STASHED_IN_APP_AUTO changes.
Bug: 261177876
Test: wwdebug & wwlogcat
Change-Id: If2d2a3d38f3128a60d551bca9f4cdf64f2bcb032
2023-03-07 03:12:45 +00:00
Brian Isganitis
8ecb5eeb62 Merge changes from topic "running-in-test-camel" into tm-qpr-dev am: d2d2913812 am: 0c15dabc48
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21725479

Change-Id: I3d02a42c2d0bdebc2487def8696d9a489aca7311
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 00:08:07 +00:00
Vinit Nayak
6820cf8677 Merge "Add null check for recents when tapping on Taskbar icons" into tm-qpr-dev am: f51426a6ee am: f24a4d5208
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21701337

Change-Id: Iec21590a5cda006eefdaafc8c39811dd4ce53b32
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 00:07:53 +00:00
Nick Chameyev
be2db5bd3d Merge "Do not use private APIs in unfold module" into tm-qpr-dev am: c7ab991818 am: fcf5d393eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21523105

Change-Id: I80ef77898fe2ffc728cdaa2473252ca032880da3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 00:05:17 +00:00
Brian Isganitis
d2d2913812 Merge changes from topic "running-in-test-camel" into tm-qpr-dev
* changes:
  Expose IS_RUNNING_IN_TEST_HARNESS as static method.
  Make isTooltipEnabled a getter due to its mutable dependencies.
2023-03-03 23:15:38 +00:00
Vinit Nayak
f51426a6ee Merge "Add null check for recents when tapping on Taskbar icons" into tm-qpr-dev 2023-03-03 21:33:52 +00:00
Nick Chameyev
c7ab991818 Merge "Do not use private APIs in unfold module" into tm-qpr-dev 2023-03-03 13:22:03 +00:00
Vinit Nayak
26c893603f Add null check for recents when tapping on Taskbar icons
Fixes: 270669636
Test: Couldn't repro, but visually we have checks for
recentsView != null && OTHER_CONDITION, but in the else
case we don't check if recentsView being null is the reason
the if-block didn't get triggered

Change-Id: I72e7480bac56c7e7b7edb73edac4309e9923d302
2023-03-02 18:18:11 -08:00
Brian Isganitis
fdd044e16e Expose IS_RUNNING_IN_TEST_HARNESS as static method.
This variable is now mutable, making the uppercase format misleading.
For instance, users might assume they can use this value in other
immutable properties, when they really should be accessing the latest
value every time they need it.

Context: https://source.android.com/docs/setup/contribute/code-style#follow-field-naming-conventions

Test: Manual
Bug: 271160958
Change-Id: Iaaa51d9153cb8a7d686c72e1210b1948029dcfd5
2023-03-03 00:17:33 +00:00
Jeremy Sim
86e4f02035 Merge "Fix bug with Taskbar not differentiating between user profiles" into tm-qpr-dev am: 24b1890c4b am: 0027186ea2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21566360

Change-Id: Ic90db4ff687565109c3644cede0f7c50f9f66f4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 04:10:00 +00:00
Jeremy Sim
e35d112693 Fix bug with Taskbar not differentiating between user profiles
This patch fixes a bug where Taskbar would not differentiate between user profiles when selecting an app to launch from Overview.

The bug occurred because findLastActiveTaskAndRunCallback(), which checks for already-running tasks when launching an app from the Taskbar, only checks for a ComponentName match and not a userId match.

Fixed by making the findLastActiveTaskAndRunCallback() also check for a userId match.

Fixes: 270456926
Test: Manual
Change-Id: I43ff06083a5dce775fdbd0b0ed951beaae34c0ab
2023-03-01 10:57:41 -08:00
Vinit Nayak
8e17afacdd Merge "Move split functions from RecentsView to SplitSelectStateController" into tm-qpr-dev am: 54c262cd67 am: 06ed4db282
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21468212

Change-Id: I4f8fab35c7c4c1de91927fc01a3b8a90d8d4aacd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 03:51:29 +00:00
Vinit Nayak
54c262cd67 Merge "Move split functions from RecentsView to SplitSelectStateController" into tm-qpr-dev 2023-02-22 02:15:46 +00:00
TreeHugger Robot
a09599d97f Merge "Remove setImeIsVisible/setTouchesEnabled as its already handled by insets." into tm-qpr-dev am: 73a2334f7f am: f94e71eca0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20590940

Change-Id: I622200bd7dca3086433170dc680ccc9aa2bc0e8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 22:47:21 +00:00
Nick Chameyev
dd2311e7f7 Do not use private APIs in unfold module
Removes usages of the private/hidden APIs
in unfold module so it could be easily
reused in 1p/3p apps.

Bug: 258828766
Test: manual fold/unfold with a full screen
 app and in split screen
Change-Id: I79618af5f1e4bd7da66b840e321403bb33cf7e95
2023-02-21 18:26:46 +00:00
Vinit Nayak
c97bb4600f Move split functions from RecentsView to SplitSelectStateController
* Moving things out of RecentsView to avoid
dependency on a non-testable class
* Also helping prevent bloating RecentsView.java

Bug: 266482558
Test: Single Chrome instance in recents. Initiate split
with Chrome from workspace, tap on Chrome again in Taskbar,
ensure no crash.

Change-Id: I99ec704479ffaa860f4d80c2cb9f54182f31f41a
2023-02-17 17:28:08 -08:00
Jon Miranda
ddb909603a Remove setImeIsVisible/setTouchesEnabled as its already handled by insets.
Bug: 260101467
Test: manual
Change-Id: Iba22a6db61abd4be0b2a15b2e4099d9bc03ddbc9
2023-02-18 00:27:03 +00:00