summaryrefslogtreecommitdiff
path: root/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
AgeCommit message (Collapse)Author
2021-12-16Fix some small related to back button alphaWinson Chung
- 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-15Set navBarDarkIntensity based on dark theme in SUWTony Wickham
- 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-09Only inset IME by 48dp instead of 60dp when taskbar is presentTony Wickham
- 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-03Merge "Revert "Align OverviewActionsView for 3 button taskbar"" into sc-v2-devTreeHugger Robot
2021-12-03Revert "Align OverviewActionsView for 3 button taskbar"Alex Chau
This reverts commit 6e906f3436e01354bf99336a5bc9a9da6a22ba02. Reason for revert: b/204891006 Bug: 189807374 Change-Id: I1b3f93d44b1691aa3d2cc90222ac93067a5cf6b4
2021-12-03Merge "Align OverviewActionsView for 3 button taskbar" into sc-v2-devAlex Chau
2021-11-30Add task unpinning support for 3 button taskbarVinit Nayak
Bug: 199544447 Test: Tested on small and large screen Change-Id: Ib7785992ef11825cd07a929e2cb623d02ef246f1
2021-11-30Align OverviewActionsView for 3 button taskbarVinit Nayak
Bug: 189807374 Change-Id: I3c7ec5f8c7b588032ff83ca7ab461d2aac7bfa35
2021-11-29Merge "Handle configuration changes in floating rotation button" into sc-v2-devTreeHugger Robot
2021-11-26Handle configuration changes in floating rotation buttonNick Chameyev
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-23Stash taskbar when IME is present, including during gesturesTony Wickham
- 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-22Invoke Assistant on 3 button long click on TaskbarVinit Nayak
Bug: 204273914 Change-Id: I757fa40ad9ac0ace44b57c7dd08ec30b4c0ae6d0
2021-11-17Add support for dark tint on taskbar nav buttonsTony Wickham
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-03Merge "Revert "Align OverviewActionsView for 3 button taskbar"" into sc-v2-devVinit Nayak
2021-11-02Revert "Align OverviewActionsView for 3 button taskbar"Vinit Nayak
This reverts commit 97d64ea8a1b681e44b757dd3ae9f6f28bcb55512. Reason for revert: b/204891006 Change-Id: I9d40a5c8c9bce6b818779ebaf748bb9bd9231caf
2021-11-02Merge "Align OverviewActionsView for 3 button taskbar" into sc-v2-devVinit Nayak
2021-11-02Align OverviewActionsView for 3 button taskbarVinit Nayak
Bug: 189807374 Change-Id: I028ae31b98e28bc372f0148a28755d067fe50678
2021-11-01Do not use shared lib resourcesNick Chameyev
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-01Move floating rotation button handling to LauncherNick Chameyev
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-10-28Recreate taskbar when dark mode changesTony Wickham
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-25Hide taskbar background when notification shade is expandedTony Wickham
- 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-19Delaying taskbar loading until user setup completedSunny Goyal
> 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-18Merge "Fix taskbar layout issues in setup wizard" into sc-v2-devTony Wickham
2021-10-14Fix taskbar layout issues in setup wizardTony Wickham
- 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-14Align 3 button nav with hotseatVinit Nayak
* Animate translationY alongside icons * When device rotates on home, update translationY * Add padding to contextual buttons to center it Bug: 189807374 Change-Id: I149ef25df570fb1fd385f1da960c827105ff975d
2021-10-06Move back to end of screen on keyguardVinit Nayak
* Animate it back into position after user unlocks * Re-create taskbar on layout direction change so PropertyHolders are recreated to take into account new values Fixes: 199852418 Test: Tested w/ password + pin for gesture + 3 button Change-Id: Ie7f16f737a8fc12328c05d7628d0e3ae09fc08ca
2021-09-23Don't show taskbar when keyguard occludedVinit Nayak
* Show only back button in taskbar for 3 button nav. Fixes: 199406716 Test: From lock screen view home controls or double-tap camera, no taskbar shown. Change-Id: Ia603c7dbe584e3fab62365de4fc5a790c48d1340
2021-09-07Show all nav buttons when IME showingVinit Nayak
* Keep home and recents button, and rotate back button to be down when IME shows in 3 button task bar. * Move IME switcher to left side of taskbar for 3 button, keep on right side for gesture nav. Bug: 191399224 Test: Tested RTL and LTR, gesture + button nav with and w/o IME. Change-Id: I7959d26986e546596e2436b8b5eb7668f44b55cf
2021-08-26Show back button in SUWTony Wickham
- Listen for USER_SETUP_COMPLETE - Recreate taskbar, forcing nav buttons to be visible Test: Run setup wizard and ensure back button is present, then is replaced with taskbar when setup is complete adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity Fixes: 191846922 Change-Id: I789186dcc23a2db7cc4637b1cb0486f0d2add784
2021-08-26Hide taskbar icons when recents button is disabledTony Wickham
The idea is that both taskbar icons and recents navigate you to new apps, which we'd want to disable in similar contexts. Hence reusing FLAG_DISABLE_RECENTS. Test: locally set FLAG_DISABLE_RECENTS=true, ensure taskbar icons don't show up (both in 3 button mode and gesture nav) Bug: 193183428 Bug: 194990283 Change-Id: I9537f57dc25663151b1414c5260dadb58506fdb0
2021-08-18Respect StatusBarManager back/home disable flagsVinit Nayak
* Also use the same signals provided by SysUi flags instead of directly from the disable API just for consistency. (Disable2 flags still need to be migrated over, so we're keeping the API for now). Bug: 194870114 Test: Locking screen w/ 3 button nav w/ various keyguards Change-Id: I858ea36876061cddf0debbd43e8fcfe1d5712839
2021-07-26Merge "Only set property state after back button instantiated" into sc-v2-devTreeHugger Robot
2021-07-26Only set property state after back button instantiatedVinit Nayak
Fixes: 194374924 Test: Repro steps don't cause crash Change-Id: I5ece220469f420d59698a56816057e248306fd32
2021-07-22Hide taskbar on lockscreenVinit Nayak
Add new animated float to disable taskbar background value when keyguard is visible. Fixes: 191857724 Test: Tested w/ and w/o bouncer for gesture + 3 button Tested w/ IME pw on lock screen. Change-Id: I2e1696fd25f4c170bfb2bc0694ccd644e453b1fe
2021-07-20Move NavButtons to end of taskbarVinit Nayak
* Layout hotseat icons from the end instead of the start * IME down and system back arrow are now separate views Bug: 191399224 Test: Tested w/ RTL + LTR in gesture and 3 button nav w/ and w/o IME Change-Id: I4d0ecd0bee0c519892c63eeefef45055b26d349b
2021-06-24Show back and IME switcher for gesture nav (1/2)Vinit Nayak
This shows back and IME switcher when in app taskbar and IME is visible. This doesn't remove the system bar just yet (will show overlap). Next CL will remove the system IME buttons so only launcher IME buttons show. Bug: 191612881 Test: Used IME in gesture + 3 button with taskbar. Change-Id: If39382c4d01f26a9350f7460d9e769ca9b57828c
2021-06-18Add IDs to buttons in 3 button nav for TaskbarVinit Nayak
Bug: 191449914 Test: testSwitchToOverview passes See bug for more details Change-Id: I108bbe7607181680bca7cb5fad5e7289191edde6
2021-06-16Enable 3 button nav for taskbarVinit Nayak
Bug: 180046394 Test: Switched between gesture and button nav on phone and tablet. Change-Id: Iac2357a3256f8b6b36ca49d3680594a91e824a5f
2021-06-15Initial commit of TaskBar on keyguardVinit Nayak
Bug: 180046394 Test: Tested with pin + keyboard + pattern Change-Id: I951d9508b1325c157a9c0d92fa8e77fe8df9c460
2021-06-09Reorganize taskbar controllersTony Wickham
Organize existing properties as follows: - TaskbarViewController contains properties affecting TaskbarView (though child icons are still supplied by TaskbarHotseatController) - TaskbarDragLayerController contains properties related to TaskbarDragLayer itself - Renamed NavbarButtonUiController to NavbarButtonsViewController, following the pattern of TaskbarViewController and TaskbarDragLayerController - TaskbarControllers contains the different controllers to make it easier to construct, initialize, destroy, and pass them around - Removed TaskbarIconController as its responsibilities were moved to more specific controllers Test: compiles and runs, manually tested Bug: 187353581 Change-Id: Idccd95d47117101bf9617e5532a5b87635d2b8f6