Commit Graph

159 Commits

Author SHA1 Message Date
Yuri Lin
db04053cb8 Add UiEvent logging for NOTIFICATION_REMOTE_INPUT_(OPEN|CLOSE|SEND|FAILURE).
This adds the logging to RemoteInputView.java, where ACTION_REMOTE_INPUT_* were logged for Tron, in the same places as the existing Tron logging that this will eventually replace.

Test: atest RemoteInputViewTest; statsd_testdrive verified that events were logged with new IDs
Bug: 159697717
Change-Id: Ice4c274bfb114f90006a02dd895d92bbb701ecae
2021-05-05 11:34:17 -04:00
Dave Mankoff
09f9028786 Recognize the Back Gesture in the FalsingManager.
Remove calls to Dependency.get from EdgeBackGestureHandler,
making it injectable.

Bug: 186011223
Test: manual
Change-Id: I3d5e6b27f6afa46dcee88b6818f0b19722181421
2021-04-27 17:48:43 -04:00
Evan Laird
1b73896e5a Phase 1 of status bar system event animations
Sketch of how things might work:
    - SystemEventCoordinator ties together arbitrary events and funnels
      them to the scheduler
    - Scheduler - a very simple prioritization and scheduling utility,
      since we don't want a spammy status bar
    - Animation controller - this class is probably going to evolve the
      most. Once an animation has a clear path, this class will actually
      make sure views are visible and allow individual view to animate
      in and out properly. It also potentially keeps the status bar open
      in immersive mode

This CL stands up a couple of things meant to achieve system animations
(currently only privacy items) that live in the status bar:

  1. SystemStatusAnimationScheduler - simple prioritization queue
     which can take requests to play system status animations. It also
     handles the running of said animations by maintaining
     ValueAnimators and providing callbacks for the system to get out of
     the way while animations are happening.

  2. SystemEventCoordinator - This is the front end for generating
     system events which trigger animations. Pretty simple, it sends
     StatusEvent objects to the scheduler to maybe play the relevant
     animation.

  3. StatusEvent - Events are sent to be scheduled, and wrap a priority
     int. They also create the view that is to be animated (still WIP)

  4. SystemStatusChipAnimationController - handles the presentation of
     the chip view. Still needs to be updated with prettier animations

  5. PrivacyDotViewController - the most bespoke of classes added here.
     controls the location of the privacy dots (more on this below)

System spaces are expected to listen for callbacks from the scheduler
and do whatever is appropriate to get out of the way. E.g., hide the
status bar system elements, keep the status bar window open in immersive
mode, or hide keyguard elements.

And finally, a note on the dot: for reasons(tm), the dot lives in
ScreenDecorations. But since screen decorations creates very special
windows that don't "just rotate", the locations are controlled by the
PrivacyDotController. However, to create the illusion that the dots are
in the status bar, they are always positioned on either side of where
the status bar happens to be.

Bug: 177323724
Test: coming soon to a theater near you
Change-Id: If528bd7e9d1e0ca3be7391f83f7416fa10e7a41b
2021-04-14 22:55:02 -04:00
Dave Mankoff
deca9ea898 Create central TelephonyListenerManager.
The TelephonyManager doesn't like have "too many" listeners
registered on int at any given time. It will actually throw
exceptions when this happens. To lighten the load from the SystemUI
side, TelephonyListenerManager now ensures that only one listener is
ever subscribed at any point.

SystemUI can now use this class instead, piggy-backing on the
possibly already subscribed listener to retrieve the events it cares
about.

Also, use Executors in CarrierTextController instead of Handlers.

Bug: 179775696
Test: atest SystemUITests
Change-Id: I626e80a91396161022e1fc6387598521f77bf4fc
2021-03-23 10:48:18 -04:00
jasonwshsu
5154c4cfae Handle the basic logic to show or hide accessibility floating menu
* AccessibilityFloatingMenuController will listen to the changes from AccessibilityButtonTargetsObserver and AccessibilityButtonModeObserver then handle the visibility of FloatingMenu
* Add abstract class SecureSettingsContentObserver to handle a registry of listeners of specific types and dispatch changes to child

Cherry picked from commit 523514fd24

Bug: 173940864
Test: atest AccessibilityButtonTargetsObserverTest AccessibilityButtonModeObserverTest AccessibilityFloatingMenuControllerTest
Change-Id: I07fded55340644bce84a3f17a7a4da950268d2d2
Merged-In: I07fded55340644bce84a3f17a7a4da950268d2d2
2021-03-19 13:40:45 +08:00
Sally
375780781e Auto-add ReduceBrightColorsTile to QS panel.
Test: Manual, AutoTileManagerTest
Bug: 128465252
Change-Id: I735724658be186415604c89e66cf2ca3d586d719
2021-02-24 17:33:11 -08:00
Peiyong Lin
0eebce6a53 Add NavigationBarOverlayController.
A NavigationBarOverlayController is used to create and control buttons
floating as an overlay with the navigation bar.

Minor: Fix import order per lint error.

Bug: b/176190597
Test: manual
Change-Id: I9ce574f7a1c38baad12b4fc45a7799e07127fe87
2021-01-11 18:24:26 -08:00
Tony Huang
e23aad5157 Migrate Bubbles to wm-shell (4/n)
Move BubbleController sysui dependent code to new class
BubblesManager and remove using of Dependency of Bubbles.

TODO: Tests still need to be remain on sysui, find suitable
      method to test both classes independently.

Bug: 161980186
Test: atest SystemUITests
Change-Id: I7be1dfb81f7ddfb5fc20b180fc5affb7a1d8e93c
2020-10-28 13:15:37 +08:00
Winson Chung
f56eee702a Isolate shell dependencies
- Add initializer path for required shell dependencies
- Move shell dependencies into WMComponent scope, and expose shell
  features to SysUIComponent explicitly
- Moved temporary Bubble's specific dependencies to global scope until
  the migration finishes

Bug: 162923491
Test: atest WMShellUnitTestsWMShellUnitTests
Test: make SystemUIGoogle CarSystemUI ArcSystemUI AAECarSystemUI
Test: Verify pip/split/onehanded/bubbles still works

Change-Id: Ibaa8b5a718f32a1fff49d1756a18a009d6ad164f
Signed-off-by: Winson Chung <winsonc@google.com>
2020-10-19 09:18:30 -07:00
timhypeng
4ceacb30ce Update OutputSwitcher from SettingsPanel to MediaOutputDialog in SystemUI
-Put MediaOutputDialogFactory in Dependency provider
-Inject MediaOutputDialogFactory in MediaControlPanel
-Use Dependency.get() to get MediaOutputDialogFactory in MediaTransferManager
-Use MediaOutputDialogFactory.create() to launch dialog in MediaControlPanel and MediaTransferManager

Bug: 155822415
Test: atest MediaControlPanelTest DependencyTest
Change-Id: I1b393d43bf4c7c869a3066404c9755ebef5f9c76
2020-10-06 14:40:01 +08:00
Treehugger Robot
5bbd3ef39d Merge "Add Executors to Dependency" am: 40ecd434e4 am: 5565ad41ef am: b3af577b3d am: 47a73ac9ac am: f3bcbd5bd2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1437251

Change-Id: I0668fc6154541bdf36ab9005f606ec2a76858193
2020-09-25 05:52:34 +00:00
Treehugger Robot
f3bcbd5bd2 Merge "Add Executors to Dependency" am: 40ecd434e4 am: 5565ad41ef am: b3af577b3d am: 47a73ac9ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1437251

Change-Id: Ieb63a9be346d1855e1f39c4a3f15ea969e6518dc
2020-09-25 05:36:32 +00:00
Fabian Kozynski
36cbc4ac67 Add Executors to Dependency
Test: manual, trigger KeyguardBottomAreaView#launchVoiceAssist
Fixes: 167421921
Change-Id: I9b366f2fb69f47e0fb7bf19ced0c5382d0bb9c7c
2020-09-24 12:13:55 -04:00
Tony Huang
425e5afa6d Migrate Bubbles to wm-shell (1/n)
Create Bubbles interface and optional mechanism

The Dependency using still remain in some class will remove or
refactor in follow-up CL.

Bug: 161980186
Test: atest SystemUITests
Test: manual
Change-Id: I88e5cc6ead1c56985aac07fe8eac39f08f114248
2020-09-22 15:35:25 +08:00
Steve Elliott
e87e3fd24d Remove NotificationBlockingHelper
Test: manual, atest
Change-Id: I807ff02212a5a4c9cffd5d19f79a70f5a980e2bb
2020-09-17 13:38:15 -04:00
Beverly
bc64fb040f Create NotifGroupManagerHelper interface
This fixes group expansion for the new notif pipeline.

Creates a new interface, NotifGroupManagerHelper, which helps
controllers determine group information (ie: summary, parent, children)
given a notification entry. This is necessary for parts of the
notification pipeline that are shared between the old and new pipelines
that require querying group information (ie: HighPriorityProvider,
PeopleNotificationIdentifier).

Many parts of the old pipeline directly inject
NotificationGroupManagerLegacy. This indicates that when migrated to the new pipeline,
we can delete the old group manager's functionality since the new
pipeline handles the logic elsewhere (most likely in ShadeListBuilder)
For example, the new pipeline no longer needs to
track isolated entries nor suppressed summaries.

Test: test SystemUITests
Change-Id: Id716f881aa7122c08be6dada8fb43058594d89f1
2020-08-26 18:26:22 -04:00
Jerry Chang
ad61a28f27 Migrate splitscreen to WM shell lib (2/n)
Removes Divider from SystemUI component list since it is no longer
needed after the split screen feature migrated to WM shell library.

Provides optional controller of split screen for sysui components to
use. Different varients of SystemUI could leverage dagger module to
decide whether to load the controller or not.

Implements WMShell component in SysUISingleton scope to help delegating
sysui specific events to WM shell controllers.

Detached DisplayImeController's initialization step from split screen
feature with the reason that some of SystemUI varients might not have
split screen feature.

Bug: 161116823
Test: atest SystemUITests
Test: atest SystemUIGoogleTests
Test: atest CarSystemUITests
Test: manual verified spliscreen behavior
Change-Id: I4220b5ce53bc7b793b95cfca34100e808b9f052c
2020-08-20 15:30:14 +08:00
Beverly
3d8fc64290 Add visual stability manager to data-layer
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
2020-08-17 10:15:24 -04:00
Dave Mankoff
ecfbd9b3aa 6/N Move everything into SysUIComponent.
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
2020-08-16 16:08:25 -04:00
Heemin Seog
6e792cce63 Separate UI and StatusBar from BiometricUnlockController
Bug: 162744974
Bug: 155711562
Test: manual, atest SystemUITests, atest :carsysui-presubmit
Change-Id: I1a8b6a31e6d965f849d678af0e4c46f236641aac
2020-08-13 23:35:53 -07:00
Winson Chung
ceb953fb13 Clean up navigation bar
- Move off fragments, now we have direct ownership of
  NavBarController -> NavBar (per display) -> NavBarView
- Move the nav bar components to its own package
- Removed some unused files
- Can finally dump NavigationBarController instead of FragmentService :)
- Clean up some of the dumps to be more consistent

Bug: 163690441
Bug: 158605244
Test: atest SystemUITests
Test: Test bar in various nav modes

Change-Id: I21130899df560f6cf8b7f38d4d86edca6d8f920e
2020-08-12 22:31:37 -07:00
Dave Mankoff
a0d8ef8a26 Streamline Dagger Initization.
This simplifies the dagger initilization, removing constructs that
provided no value to the process, but did serve to make the code
more complex to analyze.

Update dagger.md while we're here.

Fixes: 161911916
Test: manual
Change-Id: I84ced47d7cd6ce90664b68339acb7d7db765d56f
2020-07-24 16:17:08 -04:00
TreeHugger Robot
dd349767cb Merge changes from topic "privacy_chip_master"
* changes:
  Restricts notified app ops based on flags
  Add back privacy chip
2020-07-22 20:03:10 +00:00
Fabian Kozynski
882116eea1 Add back privacy chip
This adds back the privacy chip classes (Controller and view).

Change to using Executors and DeviceConfigProxy, also fix tests that
were flaky before.

Test: SystemUITests
Test: enabled hub and see chip appear (after re-opening QS)
Bug: 160966908
Change-Id: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
2020-07-22 10:34:17 -04:00
Jerry Chang
919d1d280e Migrate wm package in sysui to WM shell lib (1/n)
Bug: 161655636
Test: atest WindowManagerShellTests
Test: atest SystemUITests
Change-Id: I42f13ee7fbb14ba3b7f33ed5654ec72454dc6dba
2020-07-22 11:46:04 +08:00
Fabian Kozynski
d074a54435 Add back privacy chip
This adds back the privacy chip classes (Controller and view).

Change to using Executors and DeviceConfigProxy, also fix tests that
were flaky before.

Test: SystemUITests
Bug: 160966908
Change-Id: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
Merged-In: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
2020-07-20 14:27:28 -04:00
Evan Laird
18bd6e676d Only use "apply" when there are changes
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
2020-04-30 18:23:41 -04:00
Kevin Han
46f1013eb9 Combine AlertingManager and HeadsUpBindController
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
2020-04-16 12:48:32 -07:00
Beverly Tai
d1e175c407 Create interface for NotifInterruptStateProvider
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
2020-03-11 21:11:18 +00:00
Beverly Tai
bcb499478a Revert "Create interface for NotifInterruptStateProvider"
Revert "Move HUNs and pulsing to interrupt package"

Revert submission 10548462-hun_interrupt_package
Fixes: b/151050224

Reason for revert: broke HUNs
Reverted Changes:
I5ad5546d6:Move HUNs and pulsing to interrupt package
I13be75809:Create interface for NotifInterruptStateProvider

Change-Id: I421a7906a87236fb18fc3d434d654fb18c35e6a2
2020-03-09 16:17:53 +00:00
Beverly
e73aea2e48 Create interface for NotifInterruptStateProvider
- 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
2020-03-06 13:49:18 -05:00
Ned Burns
aaeb44bf01 Migrate DumpController -> DumpManager
Unify "everything that needs to dump stuff" to use the DumpManager.

Test: atest, manual
Change-Id: Ib475aba4eeccb24bd49ab909896f7d779a8e1b04
2020-02-20 22:11:32 -05:00
Ned Burns
c7cfa69ffd Introduce DumpManager
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
2020-02-20 22:11:19 -05:00
Evan Rosky
af9f27cdc2 SystemUI Split via TaskOrganizer
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
2020-02-18 16:19:39 -08:00
Dave Mankoff
30a66e364f Remove final call to Dep.get(FalsingManager.class)
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
2020-02-12 13:59:12 -05:00
Winson Chung
a4d446fd23 Merge "Minor refactoring to support moving code to shell" 2020-01-29 17:56:39 +00:00
Winson Chung
95c9fcacde Minor refactoring to support moving code to shell
Bug: 148148105
Test: atest SystemUITests
Change-Id: I8614fe50cb87f66b1e403dfbfe8a68d1e043bd13
2020-01-29 04:55:45 +00:00
Winson Chung
a657ac9ca5 Add initial SysUI trace support
Bug: 144854916
Test: Take a sysui trace
Change-Id: Ia8a87c8c6756ecbb77beb06a60d5b46b883ed8d9
t stat
2020-01-27 10:06:03 -08:00
Charles Chen
eb0ebddc1a Merge "Split status bar window (1/N)" 2020-01-20 17:23:36 +00:00
wilsonshih
e832194dd0 Split status bar window (1/N)
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
2020-01-17 15:33:56 +00:00
Beth Thibodeau
77c2545dd9 Add screen recording QS tile
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
2020-01-10 15:05:49 -05:00
Evan Rosky
8d782e0c01 IME to systemui
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
2020-01-08 10:34:40 -08:00
Dave Mankoff
71fca1a856 Remove Dependency.get(InitController.class)
Bug: 141882822
Test: atest SystemUITests
Change-Id: I3a7fbee69b08abffefc56b722c1753cb733eb528
2019-12-23 13:04:04 -05:00
Dave Mankoff
00e8a2fa8d Conslidate @MainHandler and similar to @Main (and similar).
@MainHandler, @MainLooper, @MainResources -> @Main
@BgHandler, @BgLooper -> @Background.

Also, move the providers for Handlers and Loopers into the
ConcurrencyModule.

Bug: 146510722
Test: atest SystemUITests
Change-Id: I991735e1fdca397784427409a2ae696a7374f584
2019-12-20 16:35:42 -05:00
Dave Mankoff
d5cf4cf73f Remove all Dependency.get(ActivityStarterDelegate.class) calls.
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
2019-12-19 11:11:51 -05:00
Evan Rosky
22b6bbd8c5 Add support for SystemUI Window Management
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
2019-12-12 17:34:05 -08:00
Fabian Kozynski
228e310d19 Remove all Privacy chip classes.
Test: atest SystemUITests
Test: atest HistoricalAppopsTest
Test: adb shell device_config privacy permissions_hub_enabled true
Fixes: 144801684
Change-Id: I9c79ac6ac75b0197af0bfb6595b99a458916b761
2019-11-25 15:38:38 -05:00
Dave Mankoff
bba732de8a Remove Dependency.staticOnConfigurationChanged
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
2019-11-20 13:09:27 -05:00
Dave Mankoff
9b5ae1a3aa Dependency.get(BG_HANDLER) is dead. Long live @BgHandler.
Bug: 9755874
Test: atest SystemUITests
Change-Id: I3fd4f9e72e7917041786a4c823fe5824fa49916b
2019-11-19 17:43:12 -05:00
Evan Laird
181de6242c Remove NotificationData
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
2019-11-13 15:46:06 -05:00