Commit Graph

70 Commits

Author SHA1 Message Date
Pat Manning
0fa114ecc0 Merge "Refresh taskbar apps show on DeviceProfile change." into tm-qpr-dev 2022-10-04 11:46:48 +00:00
Mady Mellor
78c899314e Add a button for floating tasks to taskbar (behind a flag)
Test: manual - build launcher3, enable the feature flag on tablet with
               a valid app installed, open an app, observe that there
               is NO button in taskbar because launcher3 doesn't have
               populated config
Bug: 237678727
Change-Id: Ic261608898eb9a9220cffacd0c6060a32c10a74f
2022-09-20 10:41:12 -07:00
Pat Manning
e0a7478fde Refresh taskbar apps show on DeviceProfile change.
Fix: 244269456
Test: manual
Change-Id: Ie95813c77b45b03a824542a25d1349675b1825c0
2022-09-15 14:42:57 +01:00
Vinit Nayak
89be3a4c6d Merge "Show 3 button nav on phone in Taskbar (1/2)" into tm-qpr-dev 2022-08-10 03:06:53 +00:00
Vinit Nayak
8a3d05587e Show 3 button nav on phone in Taskbar (1/2)
* TODO: Landscape/seascape support,
        Separate nav spacing out into
        separate class/add tests

Bug: 219035565
Change-Id: I8f5c007f04ea4d6df15962772806356181d764ff
2022-08-09 13:25:50 -07:00
Alex Chau
206ede9c1f Adjust height of tablet AllApps base on row height
- Also used hotseatQsbHeight for AllApps QSB height as they have to match to transform between each other

Fix: 232907846
Test: manual on different tablets
Test: atest DeviceProfileTest
Change-Id: I001d0e129db2a5de6c8ace4c3302381110da03f1
2022-08-03 15:29:22 +00:00
Vinit Nayak
7db37b3d94 Use Taskbar window for phones (only works on gesture nav) with flag
* Try to avoid re-creating TaskbarActivityContext to
avoid re-inflating taskbar views
* Toggle via Flipper App (key 1101)
OR adb shell setprop persist.wm.debug.hide_navbar_window 1 && adb reboot
TODOs
* Only works for gesture nav, not 3 button
* Sampling on phone doesn't always work.

Bug: 219035565
Change-Id: I2a015f99d5f1fe86d7261eec9fd898bd4480ff9f
2022-08-01 17:48:09 -07:00
Merissa Tan
5dbd289f18 Add running apps icons to taskbar for desktop environment.
This CL adds app icons for launched/running apps to the Launcher
taskbar hotseat. When the activity is closed, the app icon is
removed. The apps that are added to the taskbar on boot are never
removed.

Recall: http://recall/clips/ad6d3cfc-7358-4b37-846e-de843ad3000d

Bug: 183906774
Test: Launch an app and verify the app icon is added on the taskbar.
Close the app and verify the icon is removed from the taskbar.
Test: Switch navigation modes on the emulator and ensure that running
app icons are added to the taskbar after it is reinitialized.
Test: atest NexusLauncherTests:com.android.quickstep.RecentTasksListTest RecentTasksControllerTest

Change-Id: Ieaaf001530b5778871fb7a8d18cdcaa1ccbf0e31
Merged-In: Ieaaf001530b5778871fb7a8d18cdcaa1ccbf0e31
2022-07-28 17:50:12 +00:00
Schneider Victor-tulias
3f6c473164 Fade out the taskbar icons when animating to overview in 3 button nav.
Bug: 231213105
Test: from home, opened recents, then went back home, then went back to recents, resumed an app, then went back to recents and resumed the same app (both in 3-button and gesture nav)

Change-Id: I83b1b33cafb95353f36a126b93fcaf3b536d3bf4
2022-07-19 11:35:37 -07:00
Thales Lima
b8c0595d42 Add new hotseat bottom margin options
This changes how the hotseat height is calculated and by consequence how spaces are distributed in the workspace as well. This is the first of a series of changes that will improve and streamline workspace calculations.

Bug: 228998463
Fix: 234023782
Fix: 230191631
Fix: 232914299
Fix: 236238226
Test: manual, HSV and comparing to mocks
Change-Id: If021e8ba2c7c24c0bf9f27a1aa7aa946792ed04f
2022-07-05 15:33:47 +01:00
Tracy Zhou
849a0c4e81 Show IME switcher only when physical keyboard is connected in 3 button nav (instead of also when virtual keyboard is visible)
Bug: 226489759
Test: connect to a physical keyboard in 3 button nav and make sure the ime switcher shows; and doesn't show with virtual keyboard
Change-Id: Ib9a5880eb1bd6d5b877a9f3789ce858f399c4910
2022-06-24 23:40:41 -07:00
Alex Chau
c1d26448c5 Animate inline QSB between home and apps
- Added a QSB to taskbar to be animated between inline QSB and taskbar
- Passed endValue of taskbar animator to TaskbarController to have aniamtion variation between home -> app and app -> home
- Tuned duartion of taskbar animation and also stagger animation when taskbar is present
- Disabled scaling down of taskbar and inline QSB for home -> app
- Disabled stagger animation of taskbar and inline QSB for app -> home

Bug: 220733187
Test: manual
Change-Id: I4aac0bbc343b992a0472298595770e2bf2a55990
2022-06-15 22:12:29 +01:00
Tony Wickham
9a54d2aa43 Hide taskbar while VoiceInteractionWindow is visible
- Fade out icons (or stashed handle if stashed)
- Move background to APPLICATION_OVERLAY layer (behind VIW)
  - Only for gesture nav
- On home screen in 3 button mode, translate buttons down when assistant
  is invoked

Test: Invoke assistant, ensure it draws above taskbar background and
taskbar stops drawing icons or stashed handle
Bug: 225200928

Change-Id: I7807d30df8f358295b8231d89217c7413f32c6f9
Merged-In: I7807d30df8f358295b8231d89217c7413f32c6f9
2022-06-09 05:21:42 +00:00
Alex Chau
51da219869 Fix taskbar icon flicker and jump when transforming to hotseat
- Apply additional translation on TaskbarView to account for difference between taskbar icon to bottom spacing compared to hotseat icon to bottom spacing
- Call updateIconAlignment outside of synchronizeNextDraw's then block, which get run after the synchronization

Bug: 204850744
Test: manual
Change-Id: Id65842f506eb342105082649446eb694cd5c33a4
2022-05-23 14:33:34 +01:00
Schneider Victor-tulias
766f2fc346 Coordinate the SUW All Set page first reveal with the taskbar unstash to hotseat animation.
Bug: 220096988
Test: manual
Change-Id: I1f517b322e5c18f825be8b51ebb560a4a195b666
2022-05-13 11:17:10 -07:00
Sunny Goyal
f76524151d Merge "Replacing ItemInfoMatcher with predicate" into tm-dev 2022-05-03 20:04:55 +00:00
Sunny Goyal
32084d49d3 Replacing ItemInfoMatcher with predicate
This removed unnecessary componentName lookups when it
is not required. Many checks just rely on IDs and
userHandle

Bug: 231153610
Test: Presubmit
Change-Id: Ief93954abc5861062a9f55dc2ef181d3de106c62
2022-05-03 10:07:22 -07:00
Jon Miranda
e73c3075c1 Merge "Fix all app button taskbar animation in LTR and RTL." into tm-dev 2022-05-03 17:03:22 +00:00
Jon Miranda
e7b977ddd5 Fix all app button taskbar animation in LTR and RTL.
Bug: 225154998
Test: Open app, view taskbar, go back to home
      Repeat for both RTL, LTR

Change-Id: Ifdc8074bef6e5f5a447a1f4110ccb387b18a7ea9
2022-05-02 15:31:21 -07:00
Schneider Victor-tulias
9b6babf839 Translate the 3 navigation buttons to/from their in-app position when animating to/from the -1 screen, all apps and widgets.
Bug: 221455508
Test: opened all apps, widgets, -1 screen, notifications shade and keyboard in various combinations and orders; locked screen, launched app, returned home with the back/home buttons, opened overview
Change-Id: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
Merged-In: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
(cherry picked from commit 9c1a452a1d)
2022-05-02 18:45:01 +00:00
Schneider Victor-tulias
c0b30dc266 Fix taskbar 3-button truncation on rotate
- Fixed truncation issue in overview and home on rotation
- Fixed 3 buttons translating incorrectly when switching to/from overview

Fixes: 205057824
Fixes: 215482458
Test: Manual
Change-Id: I0b89010a2b6ed03a34c3443fc6e1edc81f8d9f20
Merged-In: I0b89010a2b6ed03a34c3443fc6e1edc81f8d9f20
(cherry picked from commit 8aa99c72b1)
2022-05-02 18:12:00 +00:00
Brian Isganitis
5b89b31b12 Log taskbar all apps entrypoint, launches, and drags
Test: wwdebug, wwlogcat, ensure container is formatted as follows:
    container_info {
      all_apps_container {
        taskbar {
        }
      }
    }
Bug: 204696617
Change-Id: I2492b133f95fccb059010bc9e5ed6cce73c211f9
2022-04-11 12:14:14 -07:00
Jon Miranda
812feca9ef Merge "Revert "Revert "Sync hotseat/taskbar handoff""" into tm-dev 2022-04-08 01:39:42 +00:00
Jon Miranda
27f9559203 Revert "Revert "Sync hotseat/taskbar handoff""
This reverts commit efca5c8655.

Reason for revert: ANR no longer happening

Bug: 223789074
Bug: 223443781
Bug: 202507555
Change-Id: I03bfe8642ef4ed0f9e8fbd543141d39c66375604
2022-04-06 17:29:09 +00:00
Sebastian Franco
5282efddc9 Brighten theme-icons when in Dark mode and add dark color for taskbar
Bug: 217247494
Test: change between dark and light mode and transition in and out of apps
Change-Id: Ia5e38d674a56eb95a48cb1e8c2688586594a69f9
2022-03-23 10:47:52 -07:00
TreeHugger Robot
ec8ba135be Merge "Revert "Sync hotseat/taskbar handoff"" into tm-dev 2022-03-10 22:19:16 +00:00
Jon Miranda
efca5c8655 Revert "Sync hotseat/taskbar handoff"
This reverts commit ede8718e63.

Reason for revert: causing ANR b/223789074

Bug: 223789074
Bug: 223443781
Bug: 202507555

Change-Id: Ibd76939a345f54e8945cdd97e652f5e06e40edcb
2022-03-10 18:27:36 +00:00
TreeHugger Robot
b873662734 Merge "Sync hotseat/taskbar handoff" into tm-dev 2022-03-10 09:22:21 +00:00
Jon Miranda
ede8718e63 Sync hotseat/taskbar handoff
+ Do not allow sync during tests

Bug: 223443781
Bug: 202507555
Test: open/close apps in hotseat/taskbar
Change-Id: I2f434d440a26999219e785b8671768e27d0dcad3
2022-03-09 10:06:47 -08:00
Sam Dubey
5c8ba15b1c Merge "Revert "Sync hotseat/taskbar handoff"" into tm-dev 2022-03-09 10:58:03 +00:00
Nick Chameyev
41b7f53805 Merge "Do not run unfold taskbar animation when in portrait" into tm-dev 2022-03-09 10:26:21 +00:00
Sam Dubey
8d55819f6e Revert "Sync hotseat/taskbar handoff"
This reverts commit 4937d79c03.

Reason for revert: Breaking launcher tests on cf foldable and tablet targets
Bug: 223485229

Change-Id: I7a54982967426c4da9eb62ba100226102be6549e
2022-03-09 07:53:39 +00:00
Jon Miranda
4937d79c03 Sync hotseat/taskbar handoff
Bug: 202507555
Test: open/close apps in hotseat/taskbar
Change-Id: Ia5ecff8438f0cf237b39a54b7a78c423c53f9023
2022-03-08 08:22:31 -08:00
Nick Chameyev
fe9ec740cc Do not run unfold taskbar animation when in portrait
Limits taskbar icons translation animation
only when the display is in natural orientation.

Bug: 219958588
Test: fold/unfold in portrait and landscape
Change-Id: I33e26829ae37f1df39e8c7234f98d20eb7993b93
2022-03-08 12:03:32 +00:00
Tony Wickham
a56a197e14 Properly animate canceled deep shortcut drag back to original icon
- Added getFirstMatch() instead of using mapOverItems() (was a bit cleaner using ItemInfoMatcher)
- Match based on package name / UserHandle for deep shortcuts case

Test: drag deep shortcut from taskbar icon, inside folder, inside all apps; drag regular icons as well
Fixes: 222574524
Change-Id: Id5fdee29110f143c1125edc6945af09ab0a8d8ce
2022-03-04 00:39:38 +00:00
Brian Isganitis
a1370bfc5f Put taskbar all apps in separate overlay window and stash taskbar.
All apps should display below system UI components such as the
notification tray and power menu, so an overlay window is more
appropriate. As a result, all apps has a separate window activity
context, but some properties are delegated to the taskbar activity
context. Taskbar should also be stashed while all apps is open.

Change-Id: I593457708779d84a0ab8b949a966d247d0a2e1b7
Test: Manual
Bug: 216843189
Fix: 217383817
(cherry picked from commit 473b980bf9)
2022-02-23 15:06:56 +00:00
TreeHugger Robot
bf96683e46 Merge "Fix taskbar hotseat alignment" 2022-02-14 13:03:46 +00:00
Tony Wickham
9b2b607a09 Fix taskbar hotseat alignment
- Use hotseatBorderSpace instead of cellLayoutBorderSpace
- Also divide by 2f instead of 2 because AS was complaining. May or may not potentially address off by 1 pixel issues.

Test: locally set alignment = 1, ensure perfectly aligned
Fixes: 218880076
Change-Id: Ifec30e6727f62985427b65b6c0b0810e7f7cd695
2022-02-12 19:23:23 +00:00
Winson Chung
6992855742 Merge "Add basic return animation when drag is canceled" 2022-02-09 19:32:22 +00:00
Winson Chung
d937831791 Add basic return animation when drag is canceled
Bug: 179390870
Test: Drag, but don't drop to split an app from the taskbar and
      check that Launcher animates the surface back into place
Change-Id: I726855ff5bdffd1fc58d2839b3cc44b3fdb131e9
2022-02-09 06:44:21 +00:00
Jon Miranda
daa3150b9c Move All Apps button to the left in RTL.
Bug: 205803230
Test: verify LTR
      force RTL using developer option
      verify All Apps button is in the left
      verify All Apps button moves left before fading out

Change-Id: I2a5be9b37f471bfaa1a92f6819e04274e4dfb7a1
2022-02-07 14:08:47 -08:00
Jon Miranda
fd48b0c988 Add All Apps entry button to Taskbar.
- Opens All Apps when clicked
- Fades button in/out when transitioning b/w Hotseat & Taskbar

Bug: 205803230
Test: manual
      ensures alpha gets reset properly
      clicking button opens all apps
Change-Id: I1b96bae734aa9fd9308931d6312e3d65559d4284
2022-01-31 17:22:58 -08:00
Schneider Victor-tulias
fa0bfee97a Add log dumps for taskbar state
Test: created bugreport and checked logs
Bug: -
Change-Id: Ic0c2330b18c8daf181ae5b236e0c4b212d630fa3
2022-01-20 14:41:25 -08:00
Brian Isganitis
19ab3a5582 Include border spacing to align tasbar icons with hotseat.
The original calculation was including spacing in the the
hotseatCellSize, but that causes us to incorrectly compute the
hotseatIconCenter. If we take advantage of
DeviceProfile.calculateCellWidth, we get the width without the spacing.
Then we can add spacing for every icon to the left of the current one
when figuring out the center.

Test: Manual on tablet using device types tablet and multi display.
Fix: 210123477
Change-Id: Ie182718ad3a229ffa8bae031f3ac7f73f8539f49
2021-12-15 01:15:30 +00:00
Tony Wickham
a930bca528 Merge "Stash taskbar when IME is present, including during gestures" into sc-v2-dev am: b4aefc1277 am: cc6b8488bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16325264

Change-Id: I7c71ae9aa8c949907286c31a2e6c75871e599ec7
2021-11-24 18:27:32 +00:00
Tony Wickham
821e37b447 Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).

Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-23 16:37:06 -08:00
Schneider Victor-tulias
5173fd8090 Add notification dots and popup menu notification support to the taskbar.
- Added support for notification dots
- Added support for notifications in popup menu
- Added support for dismissing notifications from the popup menu

Bug: 198438631
Test: long pressed launcher and taskbar icons, clicked notifications, clicked shortcuts
Change-Id: I7c981e60a82b4d6ce28332d804bbbfb5eb89c6a8
2021-11-15 14:47:36 -08:00
Schneider Victor-tulias
2bfbf3bffa Add popup menu and click handling to taskbar.
- Added popup menu support to taskbar icons
- Added item click handling for taskbar icon popup menu items

Bug: 198438631
Test: long pressed taskbar icons, pressed popup menu items, dragged taskbar icons to start multi-window mode
Change-Id: Ibc59c1eada50a877a863c075fbfd3e4accaae008
2021-11-05 13:07:09 -07:00
Tony Wickham
add188f339 Merge "Hide taskbar background when notification shade is expanded" into sc-v2-dev 2021-10-26 02:56:47 +00:00
Tony Wickham
232e9a4631 Hide taskbar background when notification shade is expanded
- In 3 button mode, don't hide the background but do ensure nav buttons are translated down when swiping to notificaitons from the home screen

Test: swipe down notifications, background hides in 0 button mode but not in 3 button mode
Fixes: 199163951
Change-Id: Ic70adc7d67b2ab7c92a2d5d846b9b259d1bd7bfc
2021-10-25 13:44:09 -07:00