Commit Graph

334 Commits

Author SHA1 Message Date
Tracy Zhou
d9d17ce133 Init nav mode in TaskbarActivityContext between fold/unfold
In RotationButtonController, we show the floating rotation button either when the bar is visible, or when the device is in gesture nav mode, even in an immersive app. The issue here is that mNavMode is not correctly initialized after the device is unfolded.

Fixes: 272164624
Test: Open townhall. Fold and then unfold. Tilt the device and make sure the floating rotation button shows.
Change-Id: I09025132fdca5c764e66d9ac21f29b853741d257
2023-08-21 22:38:13 +00:00
Brian Isganitis
18dd200832 Merge "Launch Taskbar All Apps with Meta key when it's available." into udc-qpr-dev 2023-08-09 17:15:12 +00:00
Brian Isganitis
a8ad7e448c Launch Taskbar All Apps with Meta key when it's available.
Taskbar All Apps will be chosen over Launcher's when we are in an app or
in overview. Otherwise, we fallback to toggling Launcher All Apps.

Test: Manual, adb shell input keyevent 117
Fix: 282111244
Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR
Change-Id: I68e4cb3a80d42e233f7d9ad33fc3791b5c75d219
2023-08-08 19:32:02 +00:00
Jeremy Sim
6390654526 Merge "App Pairs: Implement save, inflate, launch, and delete" into udc-qpr-dev 2023-08-08 00:56:04 +00:00
Vinit Nayak
3adfa41951 Merge "Ensure matching insets for taskbar gesture and 3 button nav" into udc-qpr-dev 2023-08-03 00:49:21 +00:00
Vinit Nayak
1fd1b68870 Ensure matching insets for taskbar gesture and 3 button nav
* WM checks that the number of insets don't change for
a given window once it's added. Previously when we changed
nav modes the window was removed and a new one was added, so
changing insets amounts/types didn't matter.
* Now that we use the same window and re-provide the insets,
the number of them provided have to match (insets values themselves
can change as much as needed)
* Fix minor bug when checking bit mask for gravity

Test: Switch between nav modes, no crash; no change in behavior
w/ flag turned off
Bug: 274517647
Flag: persist.wm.debug.hide_navbar_window
Change-Id: I750f843e8210ba1c800b61ac79664265924c054a

Change-Id: Idba4e8e1888fa58bf872c04cb042f77a8b5b0573
2023-08-02 14:21:31 -07:00
Jeremy Sim
94fd07e5da App Pairs: Implement save, inflate, launch, and delete
This is the third of several patches implementing the App Pairs feature behind a flag.

This patch includes:
- AppPairIcon and associated XML. Actual icon asset is placeholder for now
- Ability to launch split pair on click
- Icon can be moved around, incl. to Taskbar
- App pair can be deleted by dragging to "Remove" drop zone
- Icon persists on Launcher reload

Change-Id: I88aec6fbc814be98f9ef048bbc5af889d0797970
Flag: ENABLE_APP_PAIRS (set to false)
Bug: 274835596
Test: Not included in this CL, but will follow
2023-08-02 12:08:41 -07:00
Ivan Tkachenko
90a769d1d3 Bubble bar dismiss interaction
A single bubble and the bubble stack dismiss functionality is implemented using `BubbleDragController`. It attaches a touch listener to the corresponding views and handles gesture interactions.
* When the view is long clicked the dragging to dismiss interaction starts. It scales up the dragged view and presents the dismiss view in the bottom of the window.
* When the bubble or the bubble stack is dragged close to the dismiss target area, it gets pulled towards it and sticks to it. The `MagnetizedObject` and `MagneticTarget` classes are used for it.
* When the dragged view is released outside of the dismiss area, it moves back to the initial position with animation.
* When the dragged bubble is released inside of the dismiss area, it will dismiss the bubble with animation and remove it from the stack.
* When the dragged bubble bar stack is released inside the dismiss area, all the bubbles will get dismissed and the bubble bar will dissapear.

Bug: 271466616
Test: manual, TBD
Flag: WM_BUBBLE_BAR
Change-Id: I83393898be61ec522db92688ac2e111ef7d72fe6
2023-07-28 18:17:09 +00:00
Mady Mellor
e7cc3997d0 Revert "Bubble bar drag to dismiss"
Revert submission 23879277-bubble_bar_dismiss

Reason for revert: issues with touch

Reverted changes: /q/submissionid:23879277-bubble_bar_dismiss

Change-Id: I4311abff0e542907b09b0aa865d68257b47f6af1
2023-07-12 22:27:17 +00:00
Ivan Tkachenko
eceb797d2f Bubble bar drag to dismiss
* Added dismiss view to the taskbar
* Bubble drag to dismiss of:
  * A single bubble when the bubble bar stack is expanded
  * All bubbles when the bubble bar stack is colapsed
* Added dismiss related calls to WMShell in SystemUI through SystemUIProxy

Bug: 271466616
Test: manual, TBD
Flag: WM_BUBBLE_BAR
Change-Id: Ibb62a0b1ab9fafa8a3acf07450ce2132ed605adc
2023-07-12 07:13:12 +01:00
Winson Chung
55eedd4e5c Merge "Fix an issue with nav bar translations not being updated" into udc-dev am: a53261b9cd am: a8e08175ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23923806

Change-Id: Id330daa9c44cad3ef1733ba2319a8b69260ef99b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-07 20:01:36 +00:00
Winson Chung
ccd359d76c Fix an issue with nav bar translations not being updated
- There are flows where the shared taskbar state is updated prior
  to being destroyed, and not updated to the latest values when
  the taskbar is recreated.

  ie.
    unfolded -> lock screen -> LauncherTaskbarUiController's
      mTaskbarInAppDisplayProgress[SYSUI_SURFACE_PROGRESS_INDEX]
      is set to 1 due to the notif shade (lockscreen) showing.
      This is written into TaskbarSharedState's sysuiStateFlags
      and inAppDisplayProgressMultiPropValues.
    fold -> TaskbarActivityContext is destroyed
    unlock -> TaskbarManager and TaskbarSharedState's
      sysuiStateFlags are updated while the device is folded
    unfold -> TaskbarActivityContext is recreated and initialized
      which restores from the shared state's
      inAppDisplayProgressMultiPropValues. It also tries to reapply
      the shared state's sysuiStateFlags, but this doesn't update
      inAppDisplayProgressMultiPropValues because the state's
      "enabled" state is not updated (default is no flag set, and
      lockscreen sysui state is not set anymore).
    -> The restored inAppDisplayProgressMultiPropValues value
       results in the wrong translation.

- Note that after the above, the NavbarButtonsViewController state
  is actually correct and reflects the SysUI state, but the
  LauncherTaskbarUiController state is wrong.  This CL tries to
  manually update the ui controller to the correct state when it
  is recreated.
- CL also fixes a separate issue where LauncherTaskbarUIController
  could potentially overwrite the saved state progresses while
  restoring them due to the state callback being called

Bug: 283346744
Test: Unfold -> Lockscreen -> Fold -> Unlock -> Unfold and ensure
      the buttons are translated correctly



Change-Id: I43e473faf4fa2a493b9705506e3755df8f6264e7
Signed-off-by: Winson Chung <winsonc@google.com>
2023-07-06 22:01:49 +00:00
Vinit Nayak
15a9feb67f Add support for taskbar phone 3 button seascape
* Ignore orientation check from ag/22709055 for now,
that will be reverted. This causes recreateTaskbar() to
not run when folding the device

Bug: 274517647
Test: Tested 3 button nav in portrait/landscape/seascape
Flag: persist.wm.debug.hide_navbar_window
Change-Id: Ied02ead677d496b465c748257e32b7db5eb9580c
2023-07-06 13:58:30 -07:00
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