This change introduces the ForegroundServiceNotificationListener
component, which contains the logic formerly in
ForegroundServiceController for updating its state in response to
notification events. ForegroundServiceNotificationListener adds a
standard NotificationEntryListener to the NotificationEntryManager,
allowing us to remove the explicit calls from NotificationEntryManager;
splitting this out to its own class prevents us from introducing a
circular dependency since NotificationEntryManager still needs to use
the query methods on ForegroundServiceController.
Test: atest SystemUITests, manual
Change-Id: Iec72aa3a9fd90e3f0079db3b2a3c4f1882e59731
ForegroundServiceControllerImpl was the only implementation of
ForegroundServiceController; this change eliminates the interface so
that the class can be broken up into more granular components in a
future CL to help break circular dependencies. No functional changes.
Test: atest SystemUITests, manual
Change-Id: Iabe8ae1dbc42769d5b3e93ebe2249cdc5c3e4e77
This method always returned NotificationGutsManager::openGuts, and only
existed so that CarSystemUI could override it to disable long presses.
In this change we accomplish this by making
NotificationStackScrollLayout injectable and providing a named flag for
whether to enable long presses or not as a dependency. This means that
NotificationEntryManager is no longer involved in handling long presses,
and CarNotificationEntryManager no longer needs to exist.
Test: atest SystemUITests, manual
Change-Id: Iae78601fea498a37ed47ef9a114e50de1652b6a8
Previous nullcheck just caused another NPE. Actually checking the
null value and adding a test this time.
Bug: 122169343
Test: atest
Change-Id: I4acc055b8d5039ea65fded43526780be883eaf74
AutoHideController is a per-display controller and has following tasks:
1. Control all auto-hide logic in SystemUi
2. Update hide/unhide status to WMS
Bug: 117478341
Test: atest SystemUITests
Change-Id: I5066030c750f72e6e0b0d70cd377109458989c7d
By this CL, we could dispatch Callback to fragments on the specified
display. I also add some annotations for documenting.
TODO: 1. add tests for multi-display.
2. make registerStatusBar be an IStatusBar API to propagate the
information when a display is added or in the initial step.
3. Introduce AutoHideController
Test: atest SystemUiTests
Bug: 117478341
Change-Id: I864600f929c1d0c8aa39274f30c17b213b754d86
Since we don't have status bar on external displays, we need to saparate
the logic to make some animations or transitions just work on external
navigation bars. When we set System UI visibility on an external display,
we could make the flag only effect navigation bar. Also, it can simplify
StatusBar code by moving navigation bar related fields into
NavigationBarController.
Test: atest SystemUITests
Bug: 117478341
Change-Id: I1cdf61f6eeb2c377e04a073401efa0cdb45b65cd
This change moves the logic in NotificationEntryManager which logs
notification removal and inflation errors via the IStatusBarService to
the NotificationLogger, which is already logging visibility changes to
that service.
Test: atest SystemUITests, manual
Change-Id: I895a36db505a165c4e6684d1d6e66592e62ef1f7
This change moves the logic in NotificationEntryManager which was
explicitly handling changes in whether a row was minimized or not after
it was reinflated into the target components through the normal listener
mechanism. This involves VisualStabilityManager registering a
NotificationEntryListener and allows us to remove the dependency of
NotificationEntryManager on VisualStabilityManager.
Test: atest SystemUITests, manual
Change-Id: I4bfdbda49c1cdff4a78fabeb2343843edc509fb0
* changes:
Add link to dagger user guide
Make QSTileImpl a LifecycleOwner and make use of it
Remove Dependency.get usages from QS tiles
Switch QS tile creation to use injection
This change makes NotificationRemoteInputManager register itself as a
NotificationEntryListener instead of having NotificationEntryManager
separately and explicitly notify it of a notification being removed.
Test: atest SystemUITests, manual
Change-Id: Ib212de504430fd3f543d4c2919e5f434ce2f0aea
This change makes NotificationMediaManager register itself as a
NotificationEntryListener instead of having NotificationEntryManager
separately and explicitly notify it of a notification being removed.
This allows us to remove the dependency of NotificationEntryManager on
NotificationMediaManager. (The reverse dependency already existed.)
Test: atest SystemUITests, manual
Change-Id: I0577bf864668ccbecd70a3c3b13b610f981f7fc4
This change combines the onEntryRemoved() and
onPerformRemoveNotification() methods on NotificationEntryListener to a
single method. The latter method was called after the former method in
all cases where the removal of the notification was precipitated by user
action (swipe, bubble swipe, launching content intent), so it's replaced
by a boolean parameter to the former method indicating whether a user
action caused the removal.
Test: atest SystemUITests, manual
Change-Id: I448fdd68984e3c2489259940c4d3432ac5bfe320
This change combines the onEntryRemoved() and onNotificationRemoved()
methods on NotificationEntryListener to a single method. The logic in
NotificationEntryManager which calls these methods is rearranged and a
flag is added to the callback method in order to fully preserve the
previous behavior of all implementors.
Test: atest SystemUITests, manual
Change-Id: I6077e78005ed6c20b02f5fa21f213199384cc3b8
This change eliminates the mCallback field on NotificationEntryManager,
instead adding the listener which used to be in that field to the list
of listeners.
Test: atest SystemUITests, manual
Change-Id: I3b489ad87cf9d757c9ad9e49cf3c12c35972dee5
This change introduces the NotificationAlertingManager component, a
NotificationEntryListener which handles showing/hiding/updating alerts
(heads-up or ambient pulsing) in response to events from the
NotificationEntryManager. All code in the new component was moved out
of NotificationEntryManager proper.
Test: atest SystemUITests, manual
Change-Id: I46a046da6caf39b1d314b357e21ac6b4755c5796
Checks the machine is currently in one of the pulse states before
query the current pulse reason. Avoid incorrect undocked event cause
DozeService crash. And refines test case and javadoc.
Bug: 120464108
Test: atest SystemUITests
Test: manual
Change-Id: I3595217984ec7982de1f0f53765e7ae0a9d80fcf
Previously, StatusBar was unable to have any views with injection
due to dagger. We're now allowing for member injection in the
top level StatusBar class and any views inflated.
Once most members are migrated from Dependency we can fully migrate
to the new dependency injection.
Bug: 111414690
Test: atest SystemUITests
Change-Id: I988dc4426c2183955a467e9ea7f7ee7acf6f3019
* changes:
Remove Dependency.get usages from LightBarController
Remove Dependency.get usages from NotificationLogger
Remove Dependency.get usages from OverviewProxyService
Remove Dependency.get usages from BubbleController
Remove Dependency.get usages from BatteryControllerImpl
Remove Dependency.get usages from BluetoothControllerImpl
Remove Dependency.get usages from DeviceProvisionedController
Remove Dependency.get usages from HotspotControllerImpl
Remove Dependency.get usages from RemoteInputQuickSettingsDisabler
Remove Dependency.get usages from SecurityControllerImpl
Remove Dependency.get usages from UserSwitcherController
Remove Dependency.get usages from SmartReplyController
Reduce usages of Dependency.get in TunablePadding
Remove Dependency.get usages from TunerServiceImpl
Remove Dependency.get usages from GarbageMonitor