ChannelEditorDialog now only uses the word "apply" when there are edits
to be made by pressing the button. Otherwise use "done"
Also removed ChannelEditorDialog from Dependency to allow for better
testing / initialization of the class
Test: atest ChannelEditorDialogControllerTest
Fixes: 138957374
Change-Id: Idc111ccb0bee50df65f4037d3e552b498e135660
Previously, it was difficult to tell when a notification was inflated
before trying to show the heads up, and we got around it with a (now
flawed) heuristic based off if a notification was just inflated and
it has a heads up view.
This issue stems from having two control classes that are not really
communicating with each other. By combining these classes into one
heads up controller, the logic becomes more readable and we can directly
put a callback to show the HUN when the HUN content is inflated.
Bug: 149028421
Test: HUN smoke test
Change-Id: Ibb75597cfe26ccaf7e4d5247dc69d69bdf421ee6
Take #2
Original CL disabled HUNs because NotificationAlertingManager was
removed from the StatusBar constructor (but never injected elsewhere;
therefore it was never instantiated).
bcb499478a
Test: atest SystemUITests
Bug: 151050224
Bug: 150797570
Change-Id: I601d58bfff4422bd0c52e56ebdb4192ce9a8f880
- Remove calls to Dependency.get(NotificationInterruptStateProvider)
- Fix style errors in touched kt files
- Remove some unused injects
- Adjust Car components to match new interface
Bug: 150797570
Test: atest SystemUITests
Change-Id: I13be75809831656bf7eaf136f18aaa8b9b6225d2
Introduces DumpManager, a unified dumping system that supports dumping
at different priority levels.
Currently, when a bug report gets taken, SystemUI is only dumped during
the CRITICAL section. This has its advantages (we get to go first!) but
also imposes a strict limit on how much we can dump. To get around this
restriction, we need to *also* dump SystemUI during the NORMAL section,
which has much more forgiving constraints.
This CL simply creates the mechanism for systemUI to dump at different
priority levels, but doesn't actually cause us to participate in the
NORMAL section (yet, see later CLs).
It introduces the DumpManager, unified replacement for DumpController &
various logic in SystemUIService and Dependency.java. See kdoc in
DumpManager for usage notes.
Migration of current users of DumpController coming in a later CL.
Test: atest, manual
Change-Id: If4f41ed496c0c64024a83aad812b77f60fe27555
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.
This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.
This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.
Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.
Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.
Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.
IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.
Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I7133e151a1037c42b275b97857936437a7a6725f
CarStatusBar had one last reference in its dump method.
FalsingManager, however, directly registers itself with the
DumpController, so this call is redundant.
Bug: 136279712
Test: atest SystemUITests
Change-Id: I3731e7ecac2f147e5d3967d4219f22d17e810843
This is the first step to create another new window for status bar.
Small window => TYPE_STATUS_BAR: The bar on top of screen.
Large window => TYPE_NOTIFICATION_SHADE: Anything else.
Bug: 136993073
Test: build then flash
Test: atest WmTests SystemUITests
Test: atest RegisterStatusBarResultTest InsetsFlagsTest
Manual Test:
- Bouncer can show when leave showWhenLocked activity.
- StatusBar can show when comes HUN in fullscreen mode.
- StatusBar can play enter/leave animation in fullscreen mode.
- Able to drag notification panel when bubble/glow existing.
- Switch to market launcher, and run above tests.
- Drag notification panel from launcher several times and observe it
works fine.
Change-Id: Id9f72cd0e21f01b50d57f02ea60f97c6460926b7
Currently defaults to no taps, no audio. This adds a 3s countdown before
actually launching the recording, which can be stopped from either the
notification or the tile.
Bug: 137153302
Test: manual
Change-Id: I0e194dc8d43d8834e07e1f6d8de90a2c703a4c3a
Re-route ime-control to SystemUI when it isn't driven by an app.
This allows multi-window system-ui components to synchronize
with the ime (eg. adjusting for split-screen).
Ime control goes through a new interface IDisplayWindowInsetsController.
This gets set on WM and there is only 1 per display. All of this
is currently handled in DisplayImeController which will also
drive the animation of the IME and dispatch to ImePositionProcessors.
On the server-side, InputMethodControlTarget is separated from
InputMethodTarget so that IME can be controlled by a different
client than the IME target.
Bug: 133381284
Test: Existing IME tests pass
Change-Id: I8e8ed2e09c45998c228df72e52a671fa327308f2
It was only called in StatusBar so that StatusBar could pass itself in.
Instead, inject StatusBar directly (as an Optional).
If we ever want a different implementation, we can handle that in the
future, but right now, StatusBar was the only one ever set.
Bug: 141882822
Test: atest SystemUITests
Change-Id: Ia23b8f678ea2ac0eb4e8114f700bf703f48740e7
Enables SystemUI to create/position its own ui elements.
First of all, this adds, to WM, the concept of a ShellRoot
which represents a piece of the hierarchy that a client shell can
do whatever it needs with. For now, multiple of these roots can
be registered at various "levels" (which correspond to window
types for now). This is needed because not everything will live
in this piece of the hierarchy, so handling z-order will still
be a shared effort between the Shell and WM for a while.
On the SystemUI side, a new Dependency called SystemWindows
provides simplistic window management for these system-ui
windows via WindowlessWindowManagers per-display-per-layer.
The benefit of this is that manipulation of these windows lives
entirely in SystemUI making synchronization easier and making
it possible to move a lot of the special handling code out
of wm (eg. DOCK_DIVIDER). As a result, SystemUI becomes
more customizable and WM becomes simpler.
Early clients of this are going to be display-level IME
handling and Split-screen.
Bug: 133381284
Test: manual test after later CLs
Change-Id: I1602d9b9b69d38b9ff15806e509cc8128c837748
ConfigurationChangedReceiver is removed. Classes that want to be
notified of configuration changes should implement
ConfigurationController.ConfigurationListener instead and register
themselves with the ConfigurationController.
Bug: 144782965
Test: atest SystemUITests
Change-Id: Id2c3fe5ae2729b181769fb31b8050da264299d72
Ye olde NotificationData class was responsible for a few general things:
- Keep a list of visible `NotificationEntry`s
- Filter / sort the visible entries
- Keep a sorted / filtered list of those entries
- Answer lots of questions about the entries themselves (rank,
isAmbient, list of entries for current user, etc.)
- Keep track of the current RankingMap
- Set priority buckets on entries
- Tell the group manager when things changed
The basic idea here is to remove NotificationData in favor of 3 other
changes:
1. Any place which needed to query NotificationData for info about the
entry (in particular its ranking) can just ask the entry for it now.
Entries all keep a reference to their rank
2. NotificationEntryManager now just maintains its own list of visible
notifications. It was already the point of contact to get a handle to
NotificationData so this makes call sites simpler.
3. Create a simpler NotificationRankingManager (maybe delete this
eventually) to encapsulate the sorting logic and hang on to the latest
RankingMap
Test: atest SystemUITests
Change-Id: I14073e103c6d50da37207ca8fd86828da0aaaff9
This adds support for registering a single DisplayRotationController
to WMS. It gives a chance for the controller to suggest some
task changes to be executed along with a display rotation. There
is only one because it's a 2-way communication and there is only
intended to be one client for now.
This allows us to move Split and PiP presentation/layout logic out
of WM into systemui because WM no-longer needs to be the one
calculating the new bounds of everything during rotation.
This uses the windowcontainer transaction because all the
configuration changes and the display rotation need to happen
synchronously; otherwise, relayouts can occur after the display
is rotated, but before the configuration changes are applied.
When this happens, apps get incorrect bounds/insets which can
trigger erroneous lifecycle events in the app.
The flow is like this:
1. DisplayContent/Rotation freezes screen
2. DisplayRotationController is notified of a rotation and provided a
callback.
3. The Controller then evaluates/queues some task changes in
a transaction and, when done, fires the provided callback.
4. The callback applies the config change transaction and continues
the rest of the rotation synchronously.
The DisplayWindowController is sys-ui piece that serves as an
interface between system-ui components and display-related wm
logic. For now it just facilitates the rotation calculation, but
in the future it will have more general utility for display logic
like inset/bounds calculation.
Bug: 124011688
Bug: 133381284
Test: Added some wmtests and coretests.
Change-Id: If10695f44fa076725ba17746842f6fbd64da5d20
Had to reformat a block of code because linter was complaining.
Bug: 143972303
Test: atest SystemUITests
Change-Id: I96c163b09217671fcbd3f20133c3a13b696afc75
Makes AuthController, GlobalActionsComponent, InstantAppNotifier,
SizeCompatModeActivityController, and TvStatusBar all injectable.
Prior to this CL, CommandQueue contained within it a SystemUI object
that it used to start itself up and add itself to components. With
this change, the SystemUI object is no longer necessary, as Dagger
will ensure that a CommandQueue is available to those who need it.
Bug: 143702229
Test: atest SystemUITests
Change-Id: I2763a6d918b41fe27a2370fdd820da476654e14f
This adds new Dagger qualifiers for BgHandler, BgLooper, MainHandler,
MainLooper, and MainResources, replacing the use of @Named for them.
Bug: 142954072
Test: atest SystemUITests
Change-Id: Ibbda8998e587474c26740ba8d49a8b3f90d89efa
This adds providers for some of the system level objects that we rely
on as well.
A handful of calls for Dependency.get() have been removed in this
cl, (though others are added where necessary).
Bug: 142536902
Test: atest SystemUITests && manual
Change-Id: Id9cb62deba5229895d487803124dd115b7288466
The view is just proxying to an underyling object. Query the object directly.
Bug: 140059518
Test: atest SystemUITests.
Change-Id: I797f7c6a3d8734795d8a34a3709eaeed2e571dfa
Merging UnlockMethodCache and KeyguardMonitor into KeyguardStateController,
making it injectable and introducing KeyguardStateController#isUnlocked
in order to make it easier to keep track of the lock screen state.
Test: atest SystemUiTests
Test: unlock with face, lock again
Test: unlock with password, lock again
Bug: 139363827
Change-Id: I37ac8c7826101852c61382559be9868125c15fac
Mocks out KeyguardUpdateMonitor in all tests, as our unit
tests shouldn't care about it (unless they're testing it directly).
Bug: 140430268
Test: atest SystemUITests
Change-Id: I6a2b5231c434d0f26319090340b9c2a0e903f4b6
This CL takes the features used in DozeSensors and applies
them to the publicly available util.sensors.ProximitySensor class.
It introduces a RateLimiter class for temprorarily suspending the
ProximitySensor as requested.
It introduces a ProximityCheck class for a quick, one time test
of the proximity sensor.
There is some reshuffling of Sensor related code to its own package
as well.
Bug: 141122220
Test: atest SystemUITests
Change-Id: If126be9a56c6966c1678ee70fa6f4623e51361a7
Test: presubmit setup on source branch
Bug: 130289146 Create a Gradle build for SystemUI
Bug: 136279712 Daggerize FalsingManager
Bug: 137324767 "Unable to instantiate service com.android.systemui.doze.DozeService" exception breaks launcher tests
Bug: 137563419 Remove Bouncer reveal delay from bypass flow
Bug: 138787339 Allow Services and Activities to be injected into directly.
Bug: 139128921 [AS 3.5 RC2, SDK API 29 rev 2] Overload resolution ambiguity: while removing element from HashMap
Bug: 64712476 Import translations for dev branches
Change-Id: Ib7fd4706c070907fd556c3532957f3b1b046de6d
Move all sysUi state flag handling into a
separate class.
fixes: 138601608
Test: atest SysUiStateFlagsContainerTest
Checked that callbacks were being sent in
OPS, EdgeHandler and in Launcher codebase via
debugger.
Change-Id: Ie8f7ef2e647db88d244af1062eb95dbb69a46919
Implements a UBR for SystemUI. All classes subscribing to Context should
subscribe here instead to reduce number of IPC into SystemUI.
Test: atest
Bug: 134566046
Change-Id: I6be24f62bd9b9b3a49a4efdf712e2e73c0d8d0ac
We only want a single pulse manager since notifications
need to dynamically switch from pulsing to heads up
in the future.
Bug: 130327302
Change-Id: I0cbf23a69f33850776df81c4616932409670fe67
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