summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java
Commit message (Collapse)AuthorAgeFilesLines
* 4/ Keep EdgeBackGestureHandler state across nav/taskbar changesWinson Chung2023-03-091-6/+5
| | | | | | | | | | | - Don't update the edge back handler state when switching between nav and taskbar (since the nav mode doesn't change and a bar still exists across the change) Bug: 219035565 Test: atest NavBarHelperTests Test: atest SystemUITests Change-Id: If930d8950e5cc19eb8d6e86f01b676c1acabbe2b
* 1/ Initialize assistant state change listeners once with the nav bar helperWinson Chung2023-03-091-2/+0
| | | | | | | | | | | | | | | | - Consolidate the meaning of init/destroy into the registration/unregistration of the nav bar helper state callbacks. This allows us to track the case where we are replacing the bars to prevent churn in unregistering and reregistering shared callbacks - Using the above, we can only register the assistant content observers when the first bar is registered, and keep it registered across bar replacements Bug: 219035565 Test: atest NavBarHelperTests Test: atest SystemUITests Change-Id: I2444bb0b27086b72212ef05b8c975c19a05a35d5
* Hide task bar on AODYunfan Chen2023-02-171-3/+6
| | | | | | | | | | | | | | The previous logic only checks the existance of navigation bar. Check task bar as well to make sure task bar gesture bar can be hidden correctly on AOD. Inject StatusBarKeyguardViewManager into TaskbarDelegate instead of the reverse way to avoid loop injection. Bug: 259759616 Test: See the bug's reproduce steps. Test: atest StatusBarKeyguardViewManagerTest TaskbarDelegateTest Change-Id: I8f1764d1baf59a5fbf44ab6f92845eac7c231608
* Remove expensive queries for lock task mode (screen pinning)Winson Chung2023-01-111-3/+18
| | | | | | | | | | | | - Instead use the TaskStackListener callbacks to update the state in each component as needed Bug: 224544468 Test: Enable/disable lock task mode and dumpsys activity service SystemUIService to confirm the sysui state is still updated Test: atest SystemUITests Change-Id: I15ec6251c75a29c563820ea6424768fa33245497
* Pass button nav long press assistant availability to LauncherVinit Nayak2023-01-031-4/+7
| | | | | | | | | | | | * Currently we're passing in assistantAvailability, but that's specific to gesture nav. For button nav even if assistant isn't available, we show the UI to encourage user to sign in to enable assistant * Separate signals used for button vs gesture nav Bug: 255909545 Test: Existing tests pass, updated/added test in launcher Change-Id: Id8fba0d07826ff1013a078f81512d44d3d88a1ab
* Initialize navigation mode for TaskbarDelegateVinit Nayak2022-11-281-3/+8
| | | | | | | | | | | | | | * Previously we were only initializing nav mode for EdgeBackGestureHandler and never updating state in TaskbarDelegate Fixes: 260226345 Test: Wrote new tests, killed sysui process and dump state in terminal and observe nav mode matches between NavigationModeController and TaskbarDelegate Change-Id: I637fbf759ab86cd9ff25875e24dca9327fee35fa
* Use NavBarHelper to keep shared initalizing state between nav/taskbarVinit Nayak2022-11-221-0/+8
| | | | | | | | | | | | | | | * If we switch from taskbar to navbar and state updates, and then we switch back to taskbar, TaskbarDelegate would have old state since we stop listening for CommandQueue callbacks. * NavBarHelper outlives both so it can keep whatever state we need (and more can be added if necessary into CurrentSysuiState) and task/navbar can load from that on init Fixes: 246890611 Test: Couldn't repro bug through device interactions, but issue via adb (b/246890611#comment8) doesn't repro Change-Id: I55f888c475fc5d17bd44fb8df73ad5022af421e2
* Pass config changes through to TaskbarDelegateVinit Nayak2022-10-061-13/+6
| | | | | | | | | | | | | | | | | | | | | * Previously TaskbarDelegate was listening for config changes, but there was a race condition between when it was initialized and when the config change callback happened. The callback didn't re-fire after TaskbarDelegate became a listener for it. * Rely on NavigationBarController, whose lifecycle outlives TaskbarDelegate, to pass through config changes to TaskbarDelegate (similar to how it's doing for NavigationBar today) * One caveat is that previously TaskbarDelegate was relying on WM.ComponentCallbacks#onConfigChanged() whereas NavigationBarController gets its config changes from Application#onConfigurationChanged() Fixes: 243765256 Test: Repro in bug no longer happens Change-Id: Ifa7ea26946e6e68f74d095cbdf1e274d6a39b6b7
* Create API for WM to send letterbox info to SysUI.Christian Göllner2022-07-041-1/+3
| | | | | | | | | + Creates a new LetterboxDetails parcelable class + Adds LetterboxDetails as a parameter to IStatusBar#onSystemBarAttributesChanged Test: Manually by checking that the device works without crashing Fixes: 236829652 Change-Id: Ib4e615f6e4eb44d0fc4fb753b27a04b908e7bd24
* Fix transient behavior with task barTracy Zhou2022-06-071-12/+33
| | | | | | Fixes: 200730636 Test: manual Change-Id: Ie3dc424542ff457218fe4ec2fd516244f51bb94f
* Remove NavigationBarOverlayController.Peiyong Lin2022-04-281-22/+1
| | | | | | Bug: b/219563602 Test: manual Change-Id: If0a0896f10fa4eecd953e2aca110ee3bf7d09c8a
* Revert "Revert "Remove Dep.get(CommandQueue.class) from NavBarView""Dave Mankoff2022-04-211-1/+1
| | | | | | | | This reverts commit f18c6b3cf6695835684001abb3edb18d0d6adc81. Reason for revert: Trying to restore this change. Change-Id: I3080d50046edd490609332c79e65ad93a1540f29
* Merge "Revert "Remove Dep.get(CommandQueue.class) from NavBarView"" into tm-devVinit Nayak2022-04-201-1/+1
|\
| * Revert "Remove Dep.get(CommandQueue.class) from NavBarView"Vinit Nayak2022-04-191-1/+1
| | | | | | | | | | | | | | | | This reverts commit ef7b6b681ee564ee02ab84e8079d796046c6193c. Reason for revert: b/229413744 Change-Id: I4d75b1a6eb224a37007c034554af4b0698fbb79a
* | Merge "Remove Dep.get(CommandQueue.class) from NavBarView" into tm-devDave Mankoff2022-04-131-1/+1
|\|
| * Remove Dep.get(CommandQueue.class) from NavBarViewDave Mankoff2022-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove a call to Dependency#get form NavigationBarView by constructing the NavigationBarTransistions class in the controller instead of in the view. To be honest, this is not a beautiful cl. Some of this code is more than ten years old and is in need of more thoughtful refactoring. Bug: 218354102 Test: manual && atest SytemUITests Change-Id: I163c6e07ad5bbe046061c22ac92cf8d8138a20e4
* | Merge "Make LightBarTransitionsController injectable." into tm-devDave Mankoff2022-04-081-16/+20
|\|
| * Make LightBarTransitionsController injectable.Dave Mankoff2022-04-061-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Give it a factory that allows it be injected, removing its reliance on Dependency#get. More changes to follow this one, as NavigationBarTransitions is still not injectable, so more calls to Dependency#get had to be added to compensate. Bug: 218354102 Test: atest SystemUITests Change-Id: I891467cf0e49f78577533eb8c74fe26816f8d854
* | Remove FileDescriptor from systemui.Dumpable.Dave Mankoff2022-04-051-2/+1
|/ | | | | | | | | | This is the first step in moving over to the new public android.util.Dumpable api. Bug: 217567642 Test: m SystemUI Merged-In: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0 Change-Id: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0
* Cover screen pinning logic around task barTracy Zhou2022-03-281-0/+4
| | | | | | Fixes: 205280231 Test: manual Change-Id: I7e34def68dae9045d967f0871729e1988e1fe149
* Have both NAVIGATION_HINT_IME{,_SWITCHER}_SHOWNYohei Yukawa2022-02-041-2/+2
| | | | | | | | | | | | | | | | | | | This is a mechanical renaming CL with no behavior change. Somehow NAVIGATION_HINT_IME_SHOWN was set when the IME switcher needs to be shown, not when the IME is shown. This CL aims to avoid future confusions by also introducing NAVIGATION_HINT_IME_SWITCHER_SHOWN then setting NAVIGATION_HINT_IME_SHOWN when the IME is actually shown. This CL also updates NavigationBarTest to verify those flags. Bug: 192412909 Bug: 217755059 Test: atest SystemUITests:NavigationBarTest Change-Id: I8bdd58d040689953072c7f384ece2bca677265e1
* Track immersive mode via a new SysUI state.Pat Manning2022-01-241-0/+6
| | | | | | Test: manual Bug: 203748818 Change-Id: Iae29044fd1962391a6bd0390dcb7870ced2b3efb
* Integration of back gesture animation on Sysui (BackNav 2/n)Vadim Caen2022-01-201-1/+6
| | | | | | | | | | | | This CL contains the BackAnimationController, on WMShell, which controls the gesture based animation. When the gesture is done, the animation is done. It will be handed over to a TransisionHandler (in the next CL) Test: atest WMShellUnitTests:BackAnimationControllerTest Bug: 131727607 Change-Id: Ifc2ed99bfd51079f12a83468ca44e4aa19460e47
* Merge "Notify sysui of side swipe gestures that will show the bars ↵Winson Chung2022-01-071-1/+1
|\ | | | | | | | | | | | | | | transiently" into sc-v2-dev am: f80552b605 am: c80ff17275 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16422448 Change-Id: Idd7e52ee5506e6dd1b955fc7824396a114f4a987
| * Notify sysui of side swipe gestures that will show the bars transientlyWinson Chung2022-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - This won't be needed in T when immersive mode gestures are moved to SysUI (b/161689946) Bug: 208886351 Test: atest SystemUITests Test: In both 3button/gestural (all orientations), swipe from bar areas, swipe from sides show entry point only when swiping over bars Change-Id: Ie8f15a5fbd3248bc86a50ffcd1fc73cd08c4e214
* | Support game dashboard on tabletsTracy Zhou2022-01-061-6/+51
|/ | | | | | | | | - Report task bar transient state to EdgeBackGestureHandler and NavBarOverlayController - Register/unregister game dashboard listeners when the task bar is attached and detached Fixes: 211513457 Test: Game dashboard button shows and hides with the transient task bar Change-Id: Id55d78fc1ba36025d4441657f550c9e6088112e2
* Update PiP exclusion bounds in TaskBarDelegate.Ben Lin2021-12-141-1/+20
| | | | | | | | | | Navigation bar is only created and used when taskbar is not available. When taskbar is available, we will use TaskbarDelegate to be the one responsible to update pip exclusion bounds as PiP moves. Bug: 210038947 Test: Unfold, enter PiP, stash - PiP can be yanked out Change-Id: I8f789d3b603e41c3d15494afdadce2cddc4d4b9c
* Merge "Consider IME_VISIBLE_IMPERCEPTIBLE as shown for taskbar purposes" ↵Tony Wickham2021-12-011-0/+5
|\ | | | | | | into sc-v2-dev
| * Consider IME_VISIBLE_IMPERCEPTIBLE as shown for taskbar purposesTony Wickham2021-11-301-0/+5
| | | | | | | | | | | | | | | | IME_VISIBLE isn't set until the keyboard is "perceptibly" visible to the user (e.g. based on alpha). But we want to signal to taskbar as soon as we know IME will be visible. Test: tap an edit field to open keyboard, ensure taskbar reacts immediately instead of halfway through the transition Bug: 202511986 Change-Id: I39c15578ed3e5b729f4645ad76988b113f0b57a6
* | Support to show lock task toast on taskbarCharles Chen2021-11-301-0/+39
|/ | | | | | | Bug: 207452035 Test: manual Change-Id: I0ceba6427a5a4b0d59d9d744567886c8cd690929
* Remote mCurClientInKeyguard dependency in IMMSMing-Shin Lu2021-11-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The above field introduced from CL[1] for quick-fixing unexpected back icon indicator shows up when the lockscreen is shown. However, from IMMS points of view, seems IMMS is not necessary to be the decision maker to tell systemUI whether the IME is behind keyguard or not. SystemUI can properly leverage WindowInsets APIs to know the IME insets state when the keyguard requests IME visible. so that in other non-keyguard cases should be enough to deliver the IME visiblity/active information without setting "vis=0" for the special cases. [1]: I0de01ec29cb544e902305b0f9d9fb94a73835e7b Fix: 202218289 Test: manual as steps: 1) Set passcode for lockscreen to require IME. 2) Try to unlock screen 3) See if the back key icon altered when the IME shows up on the lockscreen Test: atest NavigationBarTest#\ testSetImeWindowStatusWhenKeyguardLockingAndImeInsetsChange (cherry picked from commit 1e5c277f7bb63b125e77ea3ef76cf58071d6ef86) Merged-In: I24c511d068ab371d6984201327a561322fc26bd8 Change-Id: I24c511d068ab371d6984201327a561322fc26bd8
* Revert "Revert "Extract assistant logic from NavigationBar to share with ↵Vinit Nayak2021-11-241-13/+44
| | | | | | | | | Taskbar"" This reverts commit 2511ebcc4042203658cfba9cd2f5093ddd6efb48. Bug: 204273914 Change-Id: I142802ef68e77030a340a59a25fd082852cd6c0c
* Revert "Extract assistant logic from NavigationBar to share with Taskbar"Vinit Nayak2021-11-231-44/+13
| | | | | | | | This reverts commit 33a7ce8427305393a0c81a656e8a3e3298d854a0. Reason for revert: test failure, b/207427578 Change-Id: I211a344659036248388e587c7cdf5082b8bdbf9d
* Pipe dark intensity through OverviewProxyTony Wickham2021-11-221-1/+38
| | | | | | Test: in 3 button mode, nav buttons in taskbar are dark on light wallpaper; in both 3 button and fully gestural, IME dismiss button is dark on light IME Bug: 204256643 Change-Id: Ib6488a393e9cf021c806a5caf5b81654cf5164eb
* Extract assistant logic from NavigationBar to share with TaskbarVinit Nayak2021-11-191-9/+44
| | | | | | | | | | | | | * Added logic into already existing class used for A11y, renamed that to NavbarHelper * Prevent destory() in TaskbarDelegate from being called without init() call first Bug: 204273914 Test: Assistant is invokable on launcher unfolded in gesture nav Change-Id: Ic3232f375c68fd444c7378bc8ddd5a9b6991bd69
* Add API to allow launcher to suspend AutoHideControllerVinit Nayak2021-10-111-14/+78
| | | | | | | | | | | | | | * Make suspend/resume methods public * TaskbarDelegate acts as the AutoHideUiElement for the purposes of simplicity (vs having Taskbar itself in launcher implement the interface). * We re-use existing mNavBar setter in AutoHideController since we know when tablet is showing there is no navigation bar present Bug: 193938507 Test: Taskbar shows when requesting auto-hide suspend. Change-Id: I36429b4ea357646cf6b6dac7a048905b1986be16
* Dump TaskbarDelegate infoWinson Chung2021-10-051-2/+20
| | | | | | Bug: 201662541 Test: dumpsys activity service SystemUIService Change-Id: Ib4a0a0316a02e5ab0ebe1dacf1fea0270750b36c
* Listen for ComponentCallback.onConfigurationChanged in TaskbarDelegateAlex Chau2021-10-011-1/+28
| | | | | | Bug: 201265004 Test: Back gesture works after switching screen and/or rotation on both edges Change-Id: Ic231029337c2d7fa840be3b83a479e468d6c868f
* Attach/Detatch EdgeBackGestureHandler only once on Taskbar init/destroyVinit Nayak2021-09-221-16/+0
| | | | | | Bug: 197058461 Test: Back works in app, and on launcher (all apps/overview) Change-Id: I81f6d649454fdf2164675b86849969425e46f63a
* Merge "Update edgeBackGestureHandler for Taskbar on init/destroy()" into ↵Vinit Nayak2021-09-201-0/+9
|\ | | | | | | sc-v2-dev
| * Update edgeBackGestureHandler for Taskbar on init/destroy()Vinit Nayak2021-09-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * TaskbarDelegate wasn't calling mEdgeBackGestureHandler.onNavBarDetatched() when going from large screen to phone screen * Also cache taskbar visibility to prevent multiple instances of the same listener from being added Bug: 197058461 Test: Went from tablet to phone, used back, saw Launcher#onBackPressed() only got called once Change-Id: I63b742b047cbfac1421c5a0e8422e9e341c62627
* | Set navigation mode when taskbar is initialised.Ben Murdoch2021-09-171-1/+2
|/ | | | | | | | | Without this, EdgeBackGestureHandler doesn't know that gesture nav is enabled until you toggle the setting explicitly. Bug: 198639199 Test: Manual Change-Id: Ie732469726318a335401a13f68083256f5b9a231
* Update SYSUI_STATE_SCREEN_PINNING in TaskbarDelegateTony Wickham2021-09-101-0/+4
| | | | | | Test: On a device with taskbar but not nav bar, pin an app and ensure can't swipe up to exit to home Bug: 190192993 Change-Id: I050643d0d5cea30f172e24716a8480cf79ed3649
* Revert "Revert "Support immersive mode with task bar""Tracy Zhou2021-09-031-0/+34
| | | | | | | | | This reverts commit e38e9d8793ccfd432131cbf7b4158591ae797129. Reason for revert: Rolling forward with a proper fix (ag/15746910) Fixes: 197991600 Change-Id: If9b8d2258832dbcbc63276bbfcace2664a595c68
* Revert "Support immersive mode with task bar"Tracy Zhou2021-08-301-34/+0
| | | | | | | | | This reverts commit dc1bbc2d63f74c432b854c1c143a3d92624b2485. Reason for revert: b/198050304 Fixes: 198050304 Change-Id: If5eec6f3749f0fe20fdf6b1b63fdc02e6ddcab57
* Support immersive mode with task barTracy Zhou2021-08-271-0/+34
| | | | | | Fixes: 197991600 Test: Open Youtube to fullscreen Change-Id: I34acbe1469fa71a4bca28d7ab160f6ea2ef31769
* Hook up EdgeBackGestureHandler with TaskbarDelegateTracy Zhou2021-08-211-3/+38
| | | | | | | | So that we don't need the presence of nav bar for back gesture for tablets Fixes: 197058461 Test: manual Change-Id: I6572f07dbaad665a03c43e70745744a2f0cf2734
* Pass through home/back/recents disable flags via sysuiFlagsVinit Nayak2021-08-171-0/+14
| | | | | | | | | | | * Create new SysUIFlag for back disabled, similar to home/recents disabled Bug: 194870114 Test: Locking screen w/ 3 button nav w/ various keyguards Change-Id: Ie9522fa2b893d98754be1b3ae5c17fb8bfe8ae57
* Use InsetsVisibilities to carry requested visibilitiesTiger Huang2021-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | InsetsState contains much more information than visibilities, such as display frame, display cutout, rounded corners, privacy indicator bounds, and frames of of insets sources. The control target only needs to send the requested visibilities to WMS, so it can be too heavy to use InsetsState. This CL introduces an new class, InsetsVisibilities, which only contains which type has which visibility. So it uses less memory, and it is more efficient on copying and checking the equality. Fix: 194186241 Test: atest InsetsVisibilitiesTest WindowAddRemovePerfTest InsetsControllerTest RegisterStatusBarResultTest CommandQueueTest LightsOutNotifControllerTest ActivityRecordTests DisplayContentTests DisplayPolicyLayoutTests InsetsPolicyTest InsetsSourceProviderTest InsetsStateControllerTest WindowFrameTests WindowManagerServiceTests WindowStateTests Change-Id: I86c1b26b4383bfa3b924726d580e5706e13ba735
* Send more system bar attributes to System UI for loggingTiger Huang2021-07-091-1/+2
| | | | | | | | | | This CL sends the requested visibilities and the package name of the focused app to System UI for logging. Bug: 190543382 Test: atest RegisterStatusBarResultTest CommandQueueTest LightsOutNotifControllerTest Change-Id: I6b3ceed1efc3075bf0c93620fe753ef2a6f79809