Commit Graph

116 Commits

Author SHA1 Message Date
Pat Manning
52bb52aeb4 Remove long press on home button for kids mode.
Fix: 229961238
Test: manual
Change-Id: Idb50d4e142b1d1b0539a71b7a727d00dc76c6a68
2022-05-09 16:57:33 +01:00
Vinit Nayak
b1436b0ae7 Extend recents button hitbox on tablet
* Extends hitbox when recents is tapped
when going from taskbar to overview.
* Extended region lasts for 400ms after
the animation ends.

Fixes: 225885714
Test: Manual, added unit test
Change-Id: I8766279c1a5bf6867f8d69ddd3af2aa3565deec2
2022-05-06 17:04:47 -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
Tony Wickham
36c9d888d8 Move taskbar insets logic to TaskbarInsetsController
Test: TaplTestsTaskbar; manually stash/unstash taskbar, open IME
Bug: 215411414
Change-Id: I73622dc020c4f8c8b3d317fcb1dd072bcfc3d274
Merged-In: I73622dc020c4f8c8b3d317fcb1dd072bcfc3d274
2022-04-20 19:27:48 +00:00
Tracy Zhou
0439fcdd5c Do not append additional delimiters
Fixes: 227665358
Test: N/A
Change-Id: I6ec0bca286c0824e474f04a61b7d855858490120
2022-03-31 17:15:46 -07:00
Vinit Nayak
c750e3d3aa Hide taskbar when launcher receives nav and keyguard showing
* On large screen we receive notification shade expanded
signals even on keyguard.
* Add a check to not show taskbar if keyguard is showing

Fixes: 223465924
Test: Taskbar doesn't show on 3 button nav except
on bouncer, as expected.

Change-Id: I4a7ea14422eda13ae8571793ed7ba1a1964072d6
2022-03-23 14:09:25 -07:00
Yohei Yukawa
697ae451d4 Use config_imeDrawsImeNavBar in Launcher
With this CL, the Launcher starts checking

  config_imeDrawsImeNavBar [1]

instead of

  config_navBarInteractionMode

when determining whether the IME should render the back and IME
switcher buttons or not.

There should be no observable behavior change as long as

  config_navBarInteractionMode

is set to true when the gestural navigation is enabled.

Bug: 216118048
Test: presubmit
Change-Id: Ia8269e240e0b18e1c7b8bd550dbb197ad58a6dbc
2022-02-08 07:47:29 -08:00
TreeHugger Robot
790146d1d8 Merge "Do not translate taskbar icons in kids mode when IME present." 2022-01-28 15:05:15 +00:00
Pat Manning
05ff09c52c Do not translate taskbar icons in kids mode when IME present.
Test: manual
Bug: 203749295
Change-Id: I6958ed95f1199c1178487134b92ff3ef0f15da2e
2022-01-28 12:22:17 +00:00
Pat Manning
e9a36099db Merge "Animate icon dimming in taskbar when force showing in immersive mode." 2022-01-28 10:24:07 +00:00
Tony Wickham
f6e98fdc9c Don't add IME back and switcher buttons if IME renders them
- Also cache InputMethodService.canImeRenderGesturalNavButtons() since it doesn't change at runtime

Test: Enable persist.sys.ime.can_render_gestural_nav_buttons setprop, then ensure we don't draw IME back button or switcher button when gesture nav is enabled
Test: We still show back button in setup, regardless of nav mode
Bug: 205803355
Change-Id: Iab8c47521ab9e561881e4ffb45142888e4c427e4
2022-01-27 20:15:19 +00:00
Pat Manning
900ef936ad Animate icon dimming in taskbar when force showing in immersive mode.
Test: manual
Bug: 203748818
Change-Id: Iab3c65db502e7dbde3141429e9ae70eec1fabde1
2022-01-27 17:59:35 +00:00
Tony Wickham
c4f2560b0f Merge "Don't create new nav bar layer when IME is rendering nav buttons" 2022-01-25 20:17:43 +00:00
TreeHugger Robot
3e25f29128 Merge "Add log dumps for taskbar state" 2022-01-21 15:05:32 +00:00
Tony Wickham
27c41677b1 Don't create new nav bar layer when IME is rendering nav buttons
Test: Edit folder name in taskbar, ensure we don't create a new window
Fixes: 214571910
Change-Id: I9a1385dbed2df7a4ee141485c8bbfb521457d853
2022-01-21 00:08:19 +00: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
Merissa Tan
d41ce4980d Create new DesktopNavbarButtonsViewController class.
This CL creates a new DesktopNavbarButtonsViewController class to allow
for taskbar buttons and status icons customization on desktop
environment.

Recall: http://recall/clips/e008d2de-36d3-47f6-954a-5ce18bac69a5

Bug: 213964564
Bug: 196757951
Test: Switch between different system navigation modes and verify the
desktop taskbar buttons stay on screen.

Change-Id: Ie7a9a044fad3b60cd37d910b8eb78c8734aadfd5
2022-01-18 17:10:15 -08:00
Tony Wickham
7b40594bc7 Merge changes I36f6cfb8,I7c784765
* changes:
  Create new window for Taskbar Nav Buttons when taskbar is focusable
  Make taskbar focusable when folder is open to get IME input
2022-01-14 17:12:08 +00:00
Tony Wickham
66971f87e1 Create new window for Taskbar Nav Buttons when taskbar is focusable
Test: Open folder from taskbar, edit name, ensure back button displays above IME and that IME sends input to the taskbar folder name
Bug: 205803170
Change-Id: I36f6cfb835aa7da280f15ea4b0aed8923ce8a012
2022-01-12 14:22:47 -08:00
Pat Manning
2c4a1d8f7a Create taskbar for kids mode.
Test: manual
Bug: 203749295
Change-Id: I52c05cf8685e6e921bb717e9714d1cb2e5f4a351
2022-01-07 11:25:04 +00:00
Winson Chung
3ed9d508bd Merge "Fix some small related to back button alpha" into sc-v2-dev am: 75867ae0ba am: 747dae3bb2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16487030

Change-Id: I1392f9f16613ef9fb0add480260d9d5af3fbed16
2021-12-16 22:58:29 +00:00
Winson Chung
e62a1996b7 Fix some small related to back button alpha
- Skip updating nav button dark intensity if we're setting it manually
  while SUW is running
- There should only be one alpha StatePropertyHolder for the same view
  otherwise when updating the properties it can clobber a previous state

Bug: 204384193
Test: Disable dark mode on SUW and verify nav buttons show
Change-Id: I450c3a5697954d9b464bdd622847beb2d01f3802
2021-12-16 17:47:53 +00:00
TreeHugger Robot
368eb46da5 Merge "Set navBarDarkIntensity based on dark theme in SUW" into sc-v2-dev am: f9f90d6dc2 am: 5ebda13e05
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16482607

Change-Id: I8babe4bae067d8feab9d80c41b48994a33bf19df
2021-12-16 00:50:57 +00:00
Tony Wickham
70d237d8f3 Set navBarDarkIntensity based on dark theme in SUW
- Also remove old tinting based on textColorPrimary, as it's no longer necessary with dark intensity tinting.

Test: Run SetupWizardTestActivity in both dark and light theme, ensure back button visible
Fixes: 204384193
Change-Id: I2dc2e94bc0318ded62419b9ae0eed719db289d7f
2021-12-15 21:37:15 +00:00
Shuming Hao
33e97f1ca4 Merge changes from topic "kingyo-new-buttons-master"
* changes:
  Toggle notification panel when new buttons are clicked in taskbar
  Add new buttons to taskbar
2021-12-15 16:49:19 +00:00
Daichi Hirono
db5960de5e Add new buttons to taskbar
Cherry picked from commit 53db50dd0b2bd6ed1842b25396c9c52b7abe1157
after resolving conflicts

The CL adds two new buttons for desktop usage.
No listeners are registered yet.

Recall: http://recall/clips/f52b70ed-c437-4374-a492-e4b7c802520a

Bug: 198355239
Test: m, verify that new buttons are added

Change-Id: I1d4a12da3041e113a978c37c9e36ec085d15e8b3
2021-12-10 16:24:24 -08:00
TreeHugger Robot
86afc595d1 Merge "Only inset IME by 48dp instead of 60dp when taskbar is present" into sc-v2-dev am: 5692501806 am: 1b578f3b71
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16433862

Change-Id: Idc3d1364d374fb33e5845f249be80ba3408c9b0c
2021-12-10 00:24:54 +00:00
Tony Wickham
1a2d581cf0 Only inset IME by 48dp instead of 60dp when taskbar is present
- Update providedInternalImeInsets whenever taskbar height changes, since the insets are subtracted from the taskbar window height. This ensures the IME always has the same bottom inset (48dp) regardless of taskbar's window size
- Also translate nav buttons down to center in the new size when IME is showing

Test: Open IME from home and in apps, both in gesture nav and 3 button mode. Ensure IME bottom inset is always 48dp and nav buttons center within that space
Fixes: 201115344
Change-Id: I5ed25b0ffc08145b2221cc5c960e669cc21b2aa7
2021-12-09 22:17:21 +00:00
Tracy Zhou
74fd7af92d Add content descriptions to task bar nav buttons
Fixes: 209608812
Test: manual
Change-Id: Iba50abfb2a3d33104b6d88574df0bc7b5daf1d3a
2021-12-08 10:44:31 +00:00
TreeHugger Robot
79b56b0659 Merge "Revert "Align OverviewActionsView for 3 button taskbar"" into sc-v2-dev 2021-12-03 18:40:37 +00:00
Alex Chau
149acef8d7 Revert "Align OverviewActionsView for 3 button taskbar"
This reverts commit 6e906f3436.

Reason for revert: b/204891006
Bug: 189807374
Change-Id: I1b3f93d44b1691aa3d2cc90222ac93067a5cf6b4
2021-12-03 15:17:51 +00:00
Alex Chau
402252f4b6 Merge "Align OverviewActionsView for 3 button taskbar" into sc-v2-dev 2021-12-03 12:30:49 +00:00
Vinit Nayak
570653346f Add task unpinning support for 3 button taskbar
Bug: 199544447
Test: Tested on small and large screen
Change-Id: Ib7785992ef11825cd07a929e2cb623d02ef246f1
2021-11-30 17:18:09 -08:00
Vinit Nayak
6e906f3436 Align OverviewActionsView for 3 button taskbar
Bug: 189807374
Change-Id: I3c7ec5f8c7b588032ff83ca7ab461d2aac7bfa35
2021-11-30 16:24:12 -08:00
TreeHugger Robot
ed05712f04 Merge "Handle configuration changes in floating rotation button" into sc-v2-dev 2021-11-29 19:41:26 +00:00
Nick Chameyev
71eed5ca35 Handle configuration changes in floating rotation button
Update resources in floating rotation button
when configurations such as screen density, screen size,
current locale have changed.

Bug: 200103245
Test: change display size, locale, fold/unfold
 -> check that floating rotation button resources
    are updated
Change-Id: Ia69f4f8b393a686012e286a1e39822650c562d52
2021-11-26 11:38:28 +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
Vinit Nayak
bca13abc82 Invoke Assistant on 3 button long click on Taskbar
Bug: 204273914
Change-Id: I757fa40ad9ac0ace44b57c7dd08ec30b4c0ae6d0
2021-11-22 17:32:16 -08:00
Tony Wickham
9ceae57095 Add support for dark tint on taskbar nav buttons
Tint the buttons when taskbar isn't drawing a background (either due to alpha or offset).

Test: Dark icons on a light wallpaper on home screen, dark icons when light IME is showing
Bug: 204256643
Change-Id: Iae634a1b604f50edc102905abd0d812a43c5346e
2021-11-17 16:28:21 -08:00
Vinit Nayak
874ea446c9 Merge "Revert "Align OverviewActionsView for 3 button taskbar"" into sc-v2-dev 2021-11-03 05:04:32 +00:00
Vinit Nayak
3fabe054c2 Revert "Align OverviewActionsView for 3 button taskbar"
This reverts commit 97d64ea8a1.

Reason for revert: b/204891006

Change-Id: I9d40a5c8c9bce6b818779ebaf748bb9bd9231caf
2021-11-02 22:08:33 +00:00
Vinit Nayak
ac24e7f6f0 Merge "Align OverviewActionsView for 3 button taskbar" into sc-v2-dev 2021-11-02 05:37:45 +00:00
Vinit Nayak
97d64ea8a1 Align OverviewActionsView for 3 button taskbar
Bug: 189807374
Change-Id: I028ae31b98e28bc372f0148a28755d067fe50678
2021-11-02 01:13:02 +00:00
Nick Chameyev
5f11bf60a8 Do not use shared lib resources
Temporary removes usages of SysUI shared
resources as it leads to crashes in Launcher
tests.

Bug: 204727471
Test: install launcher, try autorotate suggestion
Change-Id: I1e3c1f5b331a22a753acc3fe0ee544d50fba5c18
2021-11-01 15:49:54 +00:00
Nick Chameyev
0288d2e8bb Move floating rotation button handling to Launcher
Moves handling of floating rotation button when navigation
bar is not created to the launcher. This button was not
showing when taskbar is visible as it was initialized in
navigation bar (which is not created for large screens).

Bug: 200103245
Test: rotate phone when autorotate disabled on inner screen
Test: showing rotate suggestion when gesture nav enabled/disabled
Change-Id: I13dd555bcd811f1524be7ab9ad51b2b012b3b749
2021-11-01 10:36:34 +00:00
Tony Wickham
5a5a926945 Recreate taskbar when dark mode changes
Also dispatch sysui flags to all controllers upon recreate, not just NavbarButtonsViewController. Additionally, tell the controllers to skip the animation due to the flag changes if it's fromInit.

Test: Enable themed icons, switch dark theme in quick settings, ensure taskbar updates
Fixes: 204403933
Change-Id: Ic43a50cf0456175f9beba5c29360440f051cbd2d
2021-10-28 17:49:03 -07: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
Sunny Goyal
2a528a43c1 Delaying taskbar loading until user setup completed
> Also keeping it stashed while all-set activity is visible
> Creating a shared state (simiar to saved instance state) for taskbar
> Keeping taskbar stashed while all-set activity is visible

Bug: 194786060
Bug: 201782272
Test: Manual
Change-Id: Iab5e082243a206772266aece62d3028f5acb6400
2021-10-19 12:38:02 -07:00
Tony Wickham
e202a64e56 Merge "Fix taskbar layout issues in setup wizard" into sc-v2-dev 2021-10-18 16:01:38 +00:00
Tony Wickham
bb6e278f14 Fix taskbar layout issues in setup wizard
- Align nav buttons (only back is enabled) to start instead of end
- Don't animate from init()
- Provide 0 contentInsets.bottom
  - Auto-stash the taskbar during setup
  - Hide the stashed handle by adding an alpha channel for home disabled
  - Report 0 contentInsets when stashed if the handle isn't visible
- Tint nav buttons according to theme

Test: adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
Bug: 194786060
Change-Id: I4a40501e8aad2a38ec00398efe9ea3dbfa7428cd
2021-10-14 21:50:03 -07:00