summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java
Commit message (Collapse)AuthorAgeFilesLines
* Update notification FSI logic for when device is considered dreamingLucas Silva2023-03-161-1/+8
| | | | | | | | | | | | | | | | | | This change uses StatusBarStateController to check if the device is dreaming, since that state is based on the dreaming broadcasts which are only sent after the dream has finished waking up. This means that StatusBarContoller.isDreaming will remain true during the wake-up phase of the dream, therefore allowing full-screen intents in notifications. This change also removes the RPC to DreamManagerService, since the dream state is locally cached in StatusBarController Fixes: 265977861 Test: atest StatusBarStateControllerImplTest Test: atest NotificationInterruptStateProviderImplTest Test: atest CentralSurfacesImplTest Change-Id: I8e97fdb064c4b23517d69498638769aac26f419f Merged-In: I8e97fdb064c4b23517d69498638769aac26f419f
* Publish dream state to OverviewProxyService.Bryce Lee2023-01-251-0/+28
| | | | | | | | | | | | | This change pipes the current dream state to OverviewProxyService, similar to how doze information is shared. A condition has been added to monitor the dream state, and a callback relays this information to the StatusBarStateController. A new CoreStartable maintains the monitor for this interaction. Test: atest StatusBarStateControllerImplTest#testSetDreamState_invokesCallback Bug: 265755700 Change-Id: Ic927a7e55864453da026c14cd1c87e6a7cf22489 Merged-In: Ic927a7e55864453da026c14cd1c87e6a7cf22489
* Replaced setPanelExpanded with listener in NPVC/Central SurfacesShawn Lee2022-11-091-17/+20
| | | | | | | | | | Removed direct calls from NotificationPanelViewController and CentralSurfaces to update several classes to reduce reversed dependencies, and moved the related logic to use an existing listener instead. Test: manual Bug: 237811427 Change-Id: I1691066a51292aa95bc906e4b433faaec4a0b993
* [DO NOT MERGE] Remove unused methodsMatt Pietal2022-08-221-5/+0
| | | | | | | | | | Cleaning up some unused code Test: atest StatusBarStateControllerImplTest NotificationPanelViewControllerTest Bug: 242853098 Change-Id: I071247716ffe03cffebaf24031c7b201bf727fbc
* Start AOD transition a frame earlierPeter Kalauskas2022-06-021-5/+21
| | | | | | | | | | | During J<LOCKSCREEN_TRANSITION_FROM_AOD>, relayoutWindow was being called twice. The second call was due to scrim property changes that were delayed a frame because the ValueAnimator started from 1.0. Test: During J<LOCKSCREEN_TRANSITION_FROM_AOD>, check that there is only one call to relayoutWindow Bug: 225004500 Change-Id: I0fa03dfb11e5e711afcf43fbf56fbc4bebec491b
* Merge "Remove FileDescriptor from systemui.Dumpable." into tm-devDave Mankoff2022-04-071-2/+1
|\
| * 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
* | Hide manage & clear affordances on transition to KGBeverly2022-04-011-3/+13
|/ | | | | | | | | | We don't want to show the footer view that contains the "Manage" and "Clear all" affordances in the notification shade when the device is transitioning to the keyguard. Test: manual Fixes: 219680200 Change-Id: I1611589759e67d134ab957eee57ae865cfb64856
* Don't short-circuit setting StatusBarState if the upcoming state differs.Josh Tsuji2022-03-301-1/+12
| | | | | | | | | | | | This signals that a status bar state transition has been interrupted, and we're re-setting the status bar state before the upcoming state could be applied. This means that some components (such as the shade) could be partially showing the upcoming state still. In these cases, we should proactively re-apply the current state. Test: atest SystemUITests Fixes: 221099026 Change-Id: I8429b8ffbc5cb15f7be8394339cff80cb93d5068
* Add logging to QSFragment by implementing DumpableChristian Göllner2022-03-301-1/+1
| | | | | | | Fixes: 227185623 Bug: 220148766 Test: Bug report and checked the dumpsys section Change-Id: I76af03dfce5ee084306af596e840d392d4731c8f
* [Status Bar] Re-name StatusBar.java -> CentralSurfaces.java.Caitlin Cassidy2022-02-281-2/+3
| | | | | | | | | | | Also add some javadoc to CentralSurfaces.java to make its purpose slightly clearer. Bug: 197137564 Test: compiles Test: atest SystemUITests Change-Id: Id06e7ba7641d6d2bc276cce57101c9c7236bc758 Merged-In: Id06e7ba7641d6d2bc276cce57101c9c7236bc758
* Defer the instrument of AOD transition per doze amountAhan Wu2022-02-161-1/+12
| | | | | | | | | | When the doze changes, StatusBar#updateDozing will be invoked at the first frame, usually make the following one be regarded as janky, but it is unperceptible by the users, so ignore it. Bug: 201987244 Test: Capture the trace manually Change-Id: Iac739d23eb0fdc988bd52076bdccca4665e28d18
* Dump state listeners to bug reportsLucas Dupin2022-02-141-0/+4
| | | | | | | | | It's fairly common to leak those listeners, knowing which ones are registered will make debugging easier. Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService' StatusBarStateControllerImpl Fixes: 200161871 Change-Id: I89f2132ee907dfd25e251e5bfd1c9367d479d7d3
* Do not repeat doze amount callbacksLucas Dupin2022-02-081-0/+3
| | | | | | | | | | We can skip setting the doze amount if the callback was invoked with the same value. Test: manual Test: atest StatusBarStateControllerImplTest Fixes: 190379075 Change-Id: I6417e89a61745b377b1229a23bf2d56296685153
* Remove StatusBarState.FULLSCREEN_USER_SWITCHERMatt Pietal2022-02-011-1/+1
| | | | | | | | | | | Was only used for downstream projects, and has since been removed from those projects. There is an existing config: config_enableFullscreenUserSwitcher which will be repurposed for tablet user switching. Bug: 217365397 Test: atest StatusBarTest KeyguardMediaControllerTest LockscreenShadeTransitionControllerTest StatusBarStateControllerImplTest StatusBarStateEventTest StatusBarKeyguardViewManagerTest Change-Id: Idec504b682a244f4dde0c4ffcd50989365f29101
* Merge changes from topic "presubmit-am-e78f08e08e08405dbecbcc11c69b1ee2" ↵Matt Pietal2022-01-311-0/+1
|\ | | | | | | | | | | | | | | into sc-v2-dev-plus-aosp am: 997db6cdff Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16747765 Change-Id: Ic2a4d2c03325339ea9e654b711ee8880ccaa83b5
| * Add more tracingMatt Pietal2022-01-281-0/+2
| | | | | | | | | | | | | | | | | | Row for statusBarState and showKeyguard Bug: 212572042 Test: manual (trace + perfetto) Change-Id: I1e8074d71fb36989a93e1d4cffca82fb5bdcfa63
* | Selectively log some buffersLucas Dupin2022-01-051-0/+2
| | | | | | | | | | | | | | | | | | Excluded some very verbose buffers, and added annotations around status bar state to improve readability of traces. Bug: 207049735 Test: adb shell perfetto Change-Id: I00420b7048c1dfa00db7958d83b75a4964b32b8f
* | 3/ Inject InteractionJankMonitor for StatusBarStateControllerImplBill Lin2021-11-221-5/+14
|/ | | | | | | | | | | | | | | | | | Scope : StatusBar & NotificationShade The purpose of InteractionJankMonitor.begin() and InteractionJankMonitor.end() is used for e2e tests (scenario / latency / benchmark tests) SysUI had setup dagger for InteractionJankMonitor, it would be helpful on unittest if inject instance in SysUI code directly. Test: atest SystemUITests Test: m ArcSystemUI-core Test: m CarSystemUI-core Bug: 206720526 Change-Id: Ic17b8f990c353bd4723b79bbfbed40c21016e29c
* Add status bar state logsBeverly2021-11-101-8/+14
| | | | | | | | Log the upcoming status bar state Test: manually check logs (sysui dumpsys) Bug: 205587594 Change-Id: I3316faac4bea5a79863092d79fed33216308dc21
* Revert "Annotate state changes on traces"Lucas Dupin2021-10-291-9/+0
| | | | | | | | | This reverts commit 72fd421bf9c647d098f7702ce229031b82c970e3. Fixes: 204484694 Test: presubmit Reason for revert: b/204484694 Change-Id: I6ece6d055d88a034cfff90fa2d3ac137cccd8c8c
* Annotate state changes on tracesLucas Dupin2021-10-131-0/+9
| | | | | | Bug: 191971782 Test: perfetto Change-Id: I5c44c05e81ac293e55aac79efb32135dd3433ac2
* [Ongoing Call] Show semi-transparent background behind status bar in ↵Caitlin Cassidy2021-10-061-1/+1
| | | | | | | | immersive mode. Test: atest+manual Bug: 195839150 Change-Id: I0d79d889ddc199e290f8976b9b3ccb55ee8f51ac
* Manually register Dumpables to DumpManagerNed Burns2021-09-091-3/+8
| | | | | | | | | | | | | | | | | Dependency.get() automatically registers its managed objects to the DumpManager if they implement Dumpable. However, if code is refactored that removes all usages of Dependency.get() in favor of Dagger injection, then there is no longer a guarantee that the class in question will be registered to DumpManager (and so included in bug reports). Instead, remove the auto-registration feature of Dependency in favor of manually registering all dumpables with the DumpManager. Bug: 198713580 Test: atest Change-Id: Ie02a44fb7da0b76bf53da874cc9eee030a1b9173 Merged-In: Ie02a44fb7da0b76bf53da874cc9eee030a1b9173
* Use InsetsVisibilities to carry requested visibilitiesTiger Huang2021-07-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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/+30
| | | | | | | | | | 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
* Hide silent notifications when AOD animation startsNed Burns2021-07-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user presses the power button on an unlocked device, we play a transition animation into AOD. This animation has two parts: a black scrim that collapses around the power button, followed by the appearance of the AOD UI. For performance reasons, we don't mark the state of the status bar as KEYGUARD until both sections of the animation finish. This causes a bug with silent notifications: if the user's only notification is one or more silent notifs and they press the power button, the AOD animation will play, but in the moment that the AOD UI needs to appear, the status bar is not yet in the KEYGUARD state. This means that the silent notifications will not yet be hidden, and so the lockscreen will use the "small" clock treatment rather than the "large" clock treatment. A few ms later, we will enter KEYGUARD state for real, the notifs will be hidden, and the small clock will revert to the large clock, causing a flicker. This change creates a new concept in StatusBarStateController: an "upcoming state". When we start the animation, we mark our upcoming state as KEYGUARD (without changing the actual state). At the same time, we modify NotificationViewHierarchyManager (the thing in charge of hiding silent notifications) to check the upcoming state rather than the actual state. To avoid the upcoming state desyncing from the actual state, setting the actual state causes the upcoming state to be cleared. Bug: 190344677 Test: manual Change-Id: I7b3613d242516440ba2e86aa1a936aef62a53d6a
* Allow forcing status bar state changes and do so during a cancelled screen off.Josh Tsuji2021-06-161-2/+2
| | | | | | | | | | During screen off, we show the AOD UI without fully switching to the KEYGUARD state. When screen off is cancelled, we ask all components to reset to the SHADE state, which should also reset the UI components we changed to show AOD. However, since the StatusBarState was already SHADE, this is ignored. This adds a force flag, which we use when cancelling screen off to make sure that all UI components are reset to the SHADE state regardless. Test: cancel screen off, pull down the shade Fixes: 190986023 Change-Id: I79baeb71ac5d1ed45602ac55cdca996b3bed0ac3
* Move ActivityLaunchAnimator in its own lib. (1/n)Jordan Demeulenaere2021-04-081-1/+1
| | | | | | Bug: 184121838 Test: Manual Change-Id: Ib979fed2f59d9dbf5f0696edb5fcb4956600e6e0
* Instrument jank between lockscreen and AoDAhan Wu2021-03-151-0/+53
| | | | | | | | Instrument interaction jank between lockscreen and AoD. Bug: 177255643 Test: Manually Change-Id: I0450e2c2ed114a37f28f7e227d7684721b4fcc86
* Add BEHAVIOR_DEFAULT for visual immersive modeTiger Huang2021-01-191-9/+3
| | | | | | | | | | | | | | | | | | | | | BEHAVIOR_DEFAULT lets the user can use single gesture to navigate while system bars are hidden in gesture navigation mode. The user doesn't need to make navigation bar visible before performing navigation. BEHAVIOR_DEFAULT will be the default behavior, which means if there is no system bar behavior (or any legacy sysui flag about immersive) specified, the behavior will be BEHAVIOR_DEFAULT instead of BEHAVIOR_SHOW_BARS_BY_TOUCH. BEHAVIOR_SHOW_BARS_BY_TOUCH and BEHAVIOR_SHOW_BARS_BY_SWIPE are deprecated. Their behavior is equivalent to BEHAVIOR_DEFAULT now. The logic about HideNavInputEventReceiver is removed. Bug: 168913586 Test: atest WindowInsetsControllerTests ViewRootImplTest DisplayPolicyTests CommandQueueTest LightsOutNotifControllerTest RegisterStatusBarResultTest Change-Id: Ic818e323abbb38b57bef9fc36fb1afef2a007f1b
* Add visual stability manager to data-layerBeverly2020-08-171-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Create OnUserInteractionCallback (to repace OnDimissCallback) which will handle user interactions with notifications (ExpandableNotificationRow) and send this information to the relevant notification pipeline. While we still have both notification pipelines in SystemUI, the new pipeline will use a VisualStabilityManagerStub (used by HeadsUpManagerPhone and MediaCarouselController) since the view layer no longer needs visual stability since this will be taken care of by the VisualStabilityCoordinator in the data-layer. Once we migrate to the new pipeline, the legacy VisualStabilityManager + Stub should deleted. Notes: - Currently only one coordinator can attach a visual stability manager or an IllegalStateException will be thrown. - The suppressed group and section changes are logged in the suppressedAttachState on the ListAttachState object on each entry. - Currently we do not suppress the ordering of children as part of the new VisualStabilityCoordinator; however the old pipeline does suppress ordering. Test: atest VisualStabilityCoordinatorTest Test: SystemUITests Change-Id: Ia26844ba885ac9ed3b8526af82e772f19e5dcd19
* 6/N Move everything into SysUIComponent.Dave Mankoff2020-08-161-2/+2
| | | | | | | | | | | | | | | It is far easier to move _everything_ into SysUIComponent, and then selectively promote things back to GlobalScope and/or WMScope than it is to try to do it one at a time. With this change, though lots of files are touched, very little actually changes structurally. After this change goes in, folks should stop using @Singleton quite so freely. Most things should live in @SysuiSingleton. @Singleton is due to quickly be replaced by @GlobalScope. Bug: 162923491 Test: atest SystemUITests && manual Change-Id: Idc31d3d83b030581fb1fa869f7fafc4f2d3a8828
* Create a DemoMode controllerEvan Laird2020-08-131-2/+4
| | | | | | | | | | | | | | | | Pull Demo Mode out of StatusBar.java and create a subscription / callback model. This reduces the number of broadcasts needed by StatusBar and also enables for demo mode: - clean state tracking (dumpsys DemoModeController) - We can fix bugs like state initialization (entering demo mode on in dev options has a different effect than entering via broadcast, etc). - We can more easily implement it as a command line interface (available for preorder today!) Bug: 163393864 Test: atest SystemUITests; manual demo mode testing Change-Id: I70535aeca3478a42b1ebb668822346e23854379f
* Prevent double animation of lockicon when waking.Dave Mankoff2020-05-041-0/+5
| | | | | | | | | | | | | | | If the phone went from pulsing -> awake, it could cause the lock icon to briefly disappear then reappear. Specifically, this caused it to appear to animate twice. This all resulted from the internals of the Doze system briefly being told that it was neither dozing nor pusling, meaning that it thought it should hide the lock icon. The rest of the system then caught up, and it shows the lock icon again, animating it into place. Fixes: 155411884 Test: manual Change-Id: I79e1bbde2c5cb5fe588a29111294fab68c546c7c
* Add new QS Ui EVentsFabian Kozynski2020-04-301-1/+5
| | | | | | | | | | | | | | | | | This CL adds events for: * QS interactions * StatusBarState changes * User Switcher interaction * DND panel interaction The new QS events that refer to particular tiles attach the following: * spec (if framework tile) or package (if CustomTile) * instanceId associated with the QSTile object on creation Test: atest SystemUITests (including new tests) Test: manual using statsd_testdrive Fixes: 147508235 Change-Id: I43d8fe1fdb2aec1f16032da61a599ebc29809afc
* Window Manager Flag Migration (4/n)Jorim Jaggi2019-10-191-7/+12
| | | | | | | | | | | | | | | Wire up the appearance and the transient state of system bars between WMS and System UI. The derived classes of CommandQueue.Callbacks no longer listen to setSystemUiVisibility, but listen to showTransient, abortTransient, and onSystemBarAppearanceChanged instead. Bug: 118118435 Test: atest InsetsSourceProviderTest InsetsStateControllerTest InsetsPolicyTest WindowStateTests CommandQueueTest RegisterStatusBarResultTest InsetsFlagsTest LightBarControllerTest Test: build on specific target Change-Id: Ie35f4b4468bce7ef8c76f091e306610c069fba85
* Revert "Window Manager Flag Migration (4/n)"Ioannis Ilkos2019-10-171-0/+12
| | | | | | | | This reverts commit cb1b848084be47118342c4893ede2298067c3d0f. Reason for revert: Droidcop-triggered revert due to b/142849532 Change-Id: If81eba4e979e21202e78839bb1afbc66691098d2
* Window Manager Flag Migration (4/n)Jorim Jaggi2019-10-171-12/+0
| | | | | | | | | | | | | | Wire up the appearance and the transient state of system bars between WMS and System UI. The derived classes of CommandQueue.Callbacks no longer listen to setSystemUiVisibility, but listen to showTransient, abortTransient, and onSystemBarAppearanceChanged instead. Bug: 118118435 Test: atest InsetsSourceProviderTest InsetsStateControllerTest InsetsPolicyTest WindowStateTests CommandQueueTest RegisterStatusBarResultTest InsetsFlagsTest LightBarControllerTest Change-Id: I1dcaff47ae57ccee91146fdc042cde5e26fc0b3f
* Merge "Avoid going to SHADE_LOCKED when already in SHADE" into qt-qpr1-dev ↵Lucas Dupin2019-09-181-0/+6
|\ | | | | | | | | | | | | | | am: 01047d0372 am: cb95d040fc Change-Id: I7f0d670450eba65b174983907dfd7d70c12a3060
| * Avoid going to SHADE_LOCKED when already in SHADELucas Dupin2019-09-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | It's not possible for the device to go to SHADE_LOCKED after you're already unlocked, still it's possible that it would happen. Added an extra condition to avoid it, and logs to catch the regression if it happens again. Fixes: 139259891 Test: pull down notification while authenticating Change-Id: I5c2b81906fa444dfd07d040b81a527245d4130e6
* | IPC StrictModeLucas Dupin2019-08-261-0/+10
|/ | | | | | | | | | | | | | This CL introduces a way of blocking IPCs on the main thread. This is enforced by StrictMode, and enabled on tests and eng builds. All current blocking IPCs were whitelisted and bugs will be filed, in order to fix them for R. Bug: 139360025 Test: adb logcat Test: atest SystemUITests Change-Id: I45af2619605ee36b6bae83ef080272c62754b654
* Add callbacks to StatusBarStateControllerBeverly2019-06-071-0/+35
| | | | | | | | So plugins can receive this information without an IPC call Test: manual Bug: 133783909 Change-Id: I716ed6af78ab5a80a36fb680bc5d42758766523d
* Implement Dumpable on StatusBarStateControllerEvan Laird2019-03-051-1/+72
| | | | | | | | | | | | We need a good way of viewing some recent historical state for StatusBarStateController in order to track down the failure mode for some tricky bugs Bug: 126967039 Test: adb shell dumpsys activity service SystemUI | grep StatusBarStateController -A10 #should have info about StatusBarStateController Change-Id: Ie5c6eded90c84439d071e51c6c012f15387c10e5
* Make StatusBarStateController available to pluginsBeverly2019-02-071-0/+284
Test: atest SystemUITests Bug: 115322193 Change-Id: I46e4b23c9839720a3eb10e381d7aaf79a74c6b33