From NotificationGuts, tapping "Turn off notifications" will now present
a half-shelf allowing the user to directly block up to 4 channels (the
one given from the notification guts + up to 3 other channels from
that app) or the app itself.
Test: visual (for now)
Bug: 130307442
Fixes: 131432719
Change-Id: I7e82928dfd56b9e25e5bef02607eede55b11d9e3
- Load resources from the current user's context to ensure the right
overlays are read
- Create a controller in sysui to dispatch mode change to prevent callers
from calling with the wrong user's context
- Clean up the quickstep contract to prevent launcher from calling methods
using the baked in fw resource ids
Bug: 130185871
Test: Switch to secondary user, ensure the mode is read correctly
Change-Id: I00d9276185777e340b3e758345a00d2e9b3e3e64
The DumpController allows any SystemUI Dumpable class to subscribe to it
and be dumped during dumpsys of Dependency.
Test: manual (dumpsys Dependency shows "DumpController state)
Test: atest DumpControllerTest
Bug: 129544734
Change-Id: If8d3ec667d99a523e5ae25db84173d9b04b6829c
This CL will replace the SensorPrivacyTile with a new tile that can be
enabled from the developer settings. When this new tile is enabled only
the camera, mic, and sensors controlled by the SensorManager will be
disabled; the location and airplane mode tiles will not be modified.
The user will be notified when this tile is enabled with the sensors
off icon in the status bar.
Fixes: 126618519
Test: Manually verified airplane and location are not modified when sensors
off is enabled; also verified icon is displayed when mode is active.
Change-Id: Iabf099d0d76c015015ce9859edc0b225ec554020
`grep -r "(class|interface) DependencyProvider" returns 3 separate
entities claming to be DependencyProvider, which is a little confusing
and unnecessary. Privatized and renamed Dependency.DependencyProvider to
Dependency.LazyDependencyCreator, since I think that's a little bit
closer to what it is
Test: build systemui; atest SystemUITests
Change-Id: I2eed5be889b6c75324c2cf5cfef5d55827dbd8c5
In lock task mode only apps from a specific whitelist can be started. To
avoid showing buttons that won't do anything when clicked we remove
smart actions linking to apps that are not whitelisted.
In this change we add several IPC calls during smart suggestions (in
notification) inflation - one in the common code flow, and several
others only for the case where lock task kiosk mode is enabled. This is
OK from a performance perspective because we inflate smart suggestions
on a background thread.
Bug: 117976013
Test: atest InflatedSmartRepliesTest
Test: start lock-task mode with 1. chrome whitelisted -> chrome actions
show up, 2. chrome not whitelisted -> chrome actions don't show up.
Test: ensure smart replies are still enabled in lock task mode.
Change-Id: I664ff2cdcfd1b212744d85d36d7a2b305bf4b3a9
NotificationEntryManager needs a NotificationRowBinder to inflate views
and bind them. Previously, it did this by calling Dependency.get(), but
this resulted in a circular dependency.
We can't fully break the circularity, but we can make it more explicit.
This CL inverts the dependency -- now the NEM needs someone else to give
it a row binder before it can function properly. Among other things,
this makes testing easier.
This CL allows us to isolate the interface between the NEM and NRB; in
later CLs we can make explicit the async inflation callback between the
NEM and the NRB and finally rewrite most of the NEM tests.
Test: atest
Change-Id: Ibb6ca4416456021a3c0a3679d1d74248fca18af6
with ColorDisplayManager, where possible
Bug: 123352608
Test: atest FrameworksServicesTests:ColorDisplayServiceTest
Change-Id: I4feb67197462d49002582931aee285abe85054e6
This makes sure that PIC is a Singleton and prevents memory leak.
Bug: 121388507
Test: atest PrivacyItemControllerTest
Change-Id: Ib5c2a8790157034e1937c8037650ac047478d005
This is in preparation for adding more logic related to docked state.
Bug: 122301289
Test: Used adb to switch between custom clock faces.
Change-Id: I0a13ef4e5894df1280a04c5a9df8bbed8054557b
NotificationData.Entry -> NotificationEntry
Both NotificationData and NotificationEntry moved
`notification.collection` package.
Test: atest
Change-Id: Ia7158eb732711ddb324e514edb9884d518edab87
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
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
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
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 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
This change introduces the NotificationInterruptionStateProvider
component, which contains all the logic around whether a notification
should heads-up or pulse previously contained in
NotificationEntryManager.
We also introduce the NotificationFilter component which extracts logic
about when to filter notifications from NotificationData, in order to
break a circular dependency that would otherwise be introduced. As part
of this, some additional fields from the notification ranking map are
denormalized on to the NotificationData.Entry object.
Test: atest SystemUITests, manually
Change-Id: Ic61edca966a3c3e0b01f1a6a9e7ce79c8701da4e
This change introduces the NotificationRowBinder component, which
contains the logic around inflating and binding notification row views
which previously lived in NotificationEntryManager. Separating this out
to its own component allows us to make the dependencies from other logic
in NEM explicit, and eventually to decouple them once we're not
immediately inflating views for every notification.
Test: atest SystemUITests, manually
Change-Id: Ic74108e92abb402c7aa9524b7a7c5f504879546c
Early days as we start migration, so lots of duplication between
Dependency and dagger2, but can be removed when migration is done.
Test: existing tests.
Change-Id: I00c3da6ebbd46a26e512d8a7aa1e2b828e08f33f
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.
Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
- Disable rotation suggestion button if the navbar is on
non-default display because there is no accelerometer sensor.
- Avoid leakage by removing navbar fragment from fragment
host when display is removed.
Bug: 117746225
Bug: 117744614
Test: atest SystemUITests
Test: manual - create a virtual display with system decoration.
The navbar on the virtual display should not change when
rotating or changing density of default display.
And after releasing the display, use command "dumpsys
activity service com.android.systemui/.SystemUIService |
grep NavigationBarFragment" to check the number of instances.
Change-Id: Icdc8634628ace21395b7eb9d77c6b1067850d1b2
DisplayNavigationBarController is a class to control everything related
to external navigation bars. Belows are its tasks:
1. create external nav bars when:
a. StatusBar.createNavigationBar()
b. A system decoration supported display added
2. remove external nav bars when display is removed.
3. remove all external nav bars when StatusBar.destroy()
(Following Tasks)
1. Support SystemUiVisualibility for external nav bars
(corresponding to b/117478341#3)
2. A design doc for refactor
Bug: 115978725
Bug: 117478341
Test: atest SystemUITests
Test: Manual - external nav bars still works
Change-Id: I17084c1be287ae7ccfb94b2d1302072a5d620e29
- Move all legacy recents code out of the core sysui code
- Add separate target for products which still depend on it
- Move overview proxy implementation into another implementation of the
recents interface
Test: atest SystemUITests
Test: Push SystemUiWithLegacyRecents to the system image
adb shell pm disable com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
and ensure that the old recents implementation still works (and split
screen)
Change-Id: Iad67218ec37c13c79b6393d87f6bdc4f3996e2c6
Signed-off-by: Winson Chung <winsonc@google.com>
It enables LocalBluetoothManager to receive broadcasts for a specific
UserHandle, not just the one that created it, by exposing an additional create
method.
To pass in UserHandle different from the one returned in context.getUser(),
one must have INTERACT_ACROSS_USERS_FULL permission.
Should be used by singletons with adequate permissions to be able to monitor
bluetooth state across all users.
For monitoring the state across all users, pass in UserHandle.ALL.
Change-Id: Id89d73b05bfebc2f9e8673c5610b3ff8f70dba0c
Fixes: 117517726
Test: working on them
This is a dependency that replaces AppOpsListener asuming all its
responsibilities and functions. Additionally, it can handle arbitrary
callbacks for an activeChanged notification indicating the uid that had
a change.
In the case of location updates, they are removed if they haven't been
updated in 5 sec.
Test: atest
Change-Id: I647e86418e552721f1a1098d611538ef09654243
Break the NotificationPresenter out of the StatusBar and most of
the logic with it.
- Break RemoteInput Callbacks out of NotificationPresenter
- Break Environment Callbacks out of NotificationPresenter
- Add ShadeController interface for StatusBar (abstraction
layer from StatusBar)
- Add InitController to allow for post-init tasks (dependency
resolution should not go here)
- Make some dependencies (ShadeController, NotificationEntryManager,
NotificationLockscreenUserManager usually) lazily-resolved to break
some dependency cycles
- Lots of other cleanup
Test: Existing tests do not pass
Change-Id: Ic043c6b15a4ffe551fc27f99b25d5c3caa1be582
In addition to changing imports, this required some changes to use java
7, since that's what the shared lib needs to be for launcher.
See bug for more details on this project.
Test: "atest com.android.systemui.shared.plugins"
build succeeds and all tests pass
Bug: 115877296
Change-Id: Ib79ede0a61664df0ba1a194632a345d2229777fc
Make BluetoothEventManager fields final and remove the method to
unregister receivers unnecessarily (introduced in b/35415158).
Bug: 113122466
Test: runtest systemui && make RunSettingsLibRoboTests
Change-Id: I8f34ab1a809638959ab4096a829c72b3d1ac3a23
Try to move as much logic up over into stack scroller as possible.
Things that can't move, funnel through NotificationPanel to make the
interface between StatusBar and NotificationPanel more explicit.
Test: Existing tests
Change-Id: I5fa36a9d5d0a8c7f76b9d1843c0733a5758b5838
For consistency with the rest of the system since StatusBarWindowManager
isn't neither a system service or part of Window Manager.
Test: sysuitests
Change-Id: I22f9b929cb3e2fb0c68e1960267855f5e56b2a01
No functional changes. Reorganized logic under either row, stack,
logging, or row/wrapper. Haven't moved all classes over since there's
some classes that create conflicts due to weird use of
package-private/protected (primarily waiting for HUN and shelf classes).
Test: built, ran, used notifications
Bug: 110802404
Change-Id: Ia2152603bdbeb12c522360193511946c843b9266
Adding the tile to your active set will start a continuous memory tracker,
updating the tile every minute with the latest pss value. Tapping the tile
will pull a full heap dump, zip it, and share it via ACTION_SEND.
Additionally, @integer/watch_heap_limit can be set to the heap size (in KB)
at which ActivityManager will automatically generate a heap dump and notify
the user when it's ready.
Available only on IS_DEBUGGABLE builds. Supplies limited. Order now!
Bug: 76208386
Test: atest com.android.systemui.util.leak.GarbageMonitorTest
Test: runtest systemui
Change-Id: I0434dd7dc330784c750469b013e40b31ef92638d
Add a spinner to MessagingGroup that is enabled
when the user has clicked on a smart reply.
Bug: 73607490
Test: atest SystemUiTests
Change-Id: I4d892c19b5df2b443761819929a83f016967e217