Commit Graph

321 Commits

Author SHA1 Message Date
Sunny Goyal
b02dafc1d4 Removing explicit target SDK for launcher
> It will automatically target the latest SDK it was compiled with

Bug: 284349887
Test: Presubmit and manual
Flag: N/A
Change-Id: I32629b0dd710c3c04d8f70f988b7279e7cae6731
2023-06-26 10:15:14 -07:00
Winson Chung
aa4a56aaa1 Merge "Restore specific colors for floating rotation button" into udc-dev am: d827387ffd am: 5c03116eb3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23755143

Change-Id: I0c066b9cba339bf16ae2215cbb527c5e3038a03e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 17:30:02 +00:00
Winson Chung
c27a43ba30 Restore specific colors for floating rotation button
- The rotation button background does not change based on the current
  light/dark mode

Bug: 288126260
Test: Check rotation button color with dark mode enabled/disabled
Change-Id: If4d5edfd4b118e4f16b6d472f206587e7cd61f98
2023-06-20 22:45:25 +00:00
Sunny Goyal
c87f7c74ef Simplifying taskbar recreation logic
Using the same config changes as used by the Launcher activity to
avoid any inconsistencies

Bug: 269409332
Test: Tentative fix, can't reproduce the original bug
Flag: N/A
Change-Id: I3d7503cf13e6b3112151f1db520486d87871584c
2023-06-15 15:03:30 -07:00
Schneider Victor-tulias
19d085107a Merge "Add null-check to findLastActiveTaskAndRunCallback" into udc-dev am: bfa0fae851 am: 396bb7c262
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23590296

Change-Id: Ifd444206ac34ba591bf2f6033bf6961fadb5425f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-07 18:21:17 +00:00
Schneider Victor-tulias
ab51f2110a Add null-check to findLastActiveTaskAndRunCallback
ItemInfo.getTargetComponent is nullable, so we can't always create a ComponentKey. Added a null-check and proper creation of ComponentKeys

Flag: not needed
Fixes: 286053950
Test: started and completed splitscreen selection from home, taskbar and overview
Change-Id: Ifa30f194ae064fab8aad79c5116f8c859dfd8cf1
2023-06-06 11:02:09 -07:00
Liran Binyamin
a15b5913e9 Merge "Don't create the bubble bar controllers if the bubble bar view does not exist. This fixes a crash that happens when changing navigation modes." into udc-qpr-dev 2023-06-05 18:21:43 +00:00
Mady Mellor
6dea6d1624 Modify Taskbar code to accommodate bubble bar gesture to stash/unstash
* Bubble bar typically follows the behavior of taskbar - if taskbar
  is shown, the bubble bar is shown, if taskbar hides, bubble bar
  hides.
* The bubble bar has 3 states: stashed, collapsed (unstashed but
  the bubbles are not expanded), and expanded. When bubbles are
  expanded, this means WMShell is rendering the bubble
  expanded view. In this situation taskbar becomes collapsed.

Bug: 253318833
Test: manual - flag turned on - see go/bubble-bar-tests
Test: manual - flag turned off:
             - launch an app, ensure taskbar is stashed
             - unstash taskbar, drag down on taskbar, ensure it
               becomes stashed
             - be in an app, unstash taskbar, interact with the app,
               ensure taskbar is stashed
             - be in an app, unstash taskbar, select an app from it,
               ensure taskbar is stashed & app is opened
Flag: WM_BUBBLE_BAR
Change-Id: I7b481d768182c8429160ab4a9b213b885a7d78bc
2023-05-23 14:02:50 -07:00
Liran Binyamin
5cc006da6a Don't create the bubble bar controllers if the bubble bar view does not exist. This fixes a crash that happens when changing navigation modes.
Bug: 269670598
Test: Tested manually on a physical device
Change-Id: Ifd75418eb969b5d1de8625c0b9ff8884f8005ec5
2023-05-22 17:28:39 -04:00
TreeHugger Robot
f0c96721ba Merge "Add handling for toggling keyboard stashing from the keyboard" into udc-dev 2023-05-15 22:57:14 +00:00
Schneider Victor-tulias
eb8dce01ce Add handling for toggling keyboard stashing from the keyboard
Flag: ENABLE_KEYBOARD_TASKBAR_TOGGLE
Bug: 281726846
Fixes: 246660615
Test: toggled the transient taskbar with the meta+t input
Change-Id: I315f83850b11d24d8b55061d7111300effb43936
2023-05-15 18:41:25 +00:00
Sunny Goyal
4fdc9181dd Adding support for listening to end callbacks when launching an intent from Launcher
Also moving various state handling to these end callbacks enstead of relying on resume

Bug: 265134143
Test: Verified that the end callback is received
Change-Id: I326a99c80154d244c0e49f678717c476602b6240
2023-05-15 10:31:06 -07:00
Jeremy Sim
f4835a8884 Force Taskbar to remain stashed when in 3p launcher or recents
This patch makes it so that the transient Taskbar cannot unstash when in 3P launcher.

Previously, the user was able to unstash Taskbar when in 3P launcher, causing a janky-looking UI (3P launchers may implement their own version of Taskbar on the home screen. This also caused problems with certain Taskbar commands like split screen, which provide an entry portal to Pixel-specific implementations.

Fixed by forcing the Taskbar to stay stashed when a 3P Launcher is displayed. The Taskbar is still usable inside of other non-launcher apps. This was done by using TopTaskTracker to check for ACTIVITY_TYPE_HOME or ACTIVITY_TYPE_RECENTS, and disabling Taskbar when these activities are running.

Fixes: 277963491
Test: Manual
Change-Id: Ifc0f3c07e3b76eb610f93205978fbc596bab6253
2023-05-12 00:32:24 -07:00
Mady Mellor
662787540c Revert "Modify Taskbar code to accommodate bubble bar gesture to stash/unstash"
This reverts commit 7344766886.

Reason for revert: b/282035015

Change-Id: I38db287f730048d3e1e5041f1853bdae214e1a66
2023-05-11 18:50:35 +00:00
Mady Mellor
7344766886 Modify Taskbar code to accommodate bubble bar gesture to stash/unstash
* Bubble bar typically follows the behavior of taskbar - if taskbar
  is shown, the bubble bar is shown, if taskbar hides, bubble bar
  hides.
* The bubble bar has 3 states: stashed, collapsed (unstashed but
  the bubbles are not expanded), and expanded. When bubbles are
  expanded, this means WMShell is rendering the bubble
  expanded view. In this situation taskbar becomes collapsed.

Bug: 253318833
Test: manual, with other CLs, see go/bubble-bar-tests
Flag: WM_BUBBLE_BAR
Change-Id: Ic210c382e7482c259ae543a0dc083fe9305cbf5b
2023-05-09 12:37:14 -07:00
Mady Mellor
764608263f Merge "Adds BubbleControllers to TaskbarControllers" into udc-dev 2023-05-06 17:22:21 +00:00
Brian Isganitis
0b53332c31 Merge changes I35fe528b,Ia612c1b5 into udc-dev
* changes:
  Don't close AFVs when opening Taskbar folder.
  Keep persistent Taskbar visible over Taskbar All Apps.
2023-05-06 14:42:54 +00:00
Mady Mellor
c37bf46381 Adds BubbleControllers to TaskbarControllers
* BubbleControllers is optionally available (gated behind a flag).
* The bubble bar controllers follow init & onDestroy after the taskbar
  controllers.
* Adds the relevant views used by the bubble controllers to the
  transient taskbar layout.

Bug: 253318833
Test: manual, with other CLs, see go/bubble-bar-tests
Flag: WM_BUBBLE_BAR
Change-Id: I685163cdcc912768b1a720952762f4cbc602b14b
2023-05-05 17:02:38 -07:00
Qiao Yang
2482c8dcd4 Revert "Revert "Listen for hover events over stashed taskbar.""
This reverts commit c27605099c.

Reason for revert: DroidMonitor-triggered revert due to breakage <https://android-build.googleplex.com/builds/quarterdeck?branch=git_udc-dev&target=cf_x86_64_phone-userdebug&lkgb=10076607&lkbb=10076982&fkbb=10076788>, bug <281093059>

Change-Id: I71e7fd07232c27a004243df0ffb0457fe53fe13b
2023-05-05 19:07:17 +00:00
Pat Manning
c27605099c Revert "Listen for hover events over stashed taskbar."
This reverts commit c5882bcdfc.

Reason for revert: b/281068877

Change-Id: I431678658fc464c995df0df5e3cac5491d91b052
2023-05-05 17:22:21 +00:00
Brian Isganitis
f3135fea05 Don't close AFVs when opening Taskbar folder.
Test: Manual
Fix: 276798702
Change-Id: I35fe528bf3ad7fb374b8d8ae83f0d525e131681e
2023-05-04 23:55:23 -04:00
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
Pat Manning
c5882bcdfc Listen for hover events over stashed taskbar.
Bug: 243191650
Test: TaplTestsTaskbar
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: Ia189ac6a6097d073c40c69ead6ecaf398d22eba8
2023-05-04 20:35:44 +01: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