Commit Graph

200 Commits

Author SHA1 Message Date
Evan Laird
70fd75a4f1 Enable dumpsys logging for BatteryController
After having been fully removed from Dependency.java, BatteryController
lost its dumpsys entries. This CL adds it manually, and removes the
entry from Dependency.java.

Test: atest SystemUITests
Test: adb shell -n dumpsys activity service com.android.systemui/.SystemUIService | grep "BatteryController:"
Fixes: 245739044
Change-Id: Ib1d6559cb1980f73bd98ab233ca012b4d12ac9a5
2022-09-20 19:59:48 +00:00
Steve Elliott
d4f52ca282 Remove NotifEntryManager
Bug: 200269355
Test: atest SystemUITests
Change-Id: I3e418dfd7d3512ac811e67733e32818622a0a415
2022-08-31 15:43:16 +00:00
Steve Elliott
b8ea5216b8 Delete VisualStabilityManager
Bug: 200269355
Test: atest SystemUITests
Change-Id: Iaa58c8031e6823037e60b280875841bcb015a939
2022-08-29 12:20:12 -04:00
Steve Elliott
334cd29e02 Delete NotifGroupManagerLegacy
Bug: 200269355
Test: atest SystemUITests
Change-Id: Id715aa8eedd6177d7afb356c215ee9d9740d0160
2022-08-29 12:20:12 -04:00
Steve Elliott
2fa47f38dd Remove dead code from NotifEntryManager
All removed code is unused; since all changes are relegated to
NotificationEntryManager.java, if this CL still builds, it is proof that
the code in question was not referenced anywhere (assuming no
reflection).

Bug: 200269355
Test: atest SystemUITests
Change-Id: If24a9a92c6af5c2edd4fe1b628bb720a6a12a311
Merged-In: If24a9a92c6af5c2edd4fe1b628bb720a6a12a311
2022-08-12 16:46:31 +00:00
Steve Elliott
c4da37be31 Inline notif pipeline flag in NotifEntryManager
This change is a no-op; the flag is now enabled-by-default, so all
removed code paths here are effectively dead.

Bug: 200269355
Test: atest SystemUITests
Change-Id: I6a04d1c238ea938a60cc2bb1f28d780480ad67fd
Merged-In: I6a04d1c238ea938a60cc2bb1f28d780480ad67fd
2022-07-29 21:20:12 +00:00
Justin Weir
56b7c817ae Move ShadeController to the shade package
Bug: 238333941
Test: atest SystemUITests SystemUIGoogleTests
Change-Id: Ibf332e4f8ca6af7ed22655cd5669ab36e9a41fbe
2022-07-27 19:48:19 +00:00
Peiyong Lin
4092bba7f1 Remove NavigationBarOverlayController.
Bug: b/219563602
Test: manual
Change-Id: If0a0896f10fa4eecd953e2aca110ee3bf7d09c8a
2022-04-28 22:34:36 +00:00
Jordan Demeulenaere
caa4ecedcb Enable back gesture when a SysUI dialog is showing (1/2)
This CL ensures that back gesture is not disabled when a SysUI dialog is
shown, so that the dialog can be closed by swiping back or swiping home.

Test: Manual
Bug: 210270549
Change-Id: Id7d597105b3a44ca20c5aef42dd0a7318e5d91b7
2022-02-22 11:08:05 +01:00
Michal Olech
6f1aecf1bf Add system prompt for system language change after <Set Menu Language> CEC message
Requires ro.hdmi.set_menu_language=true

Test: build; flash; manual test
Bug: 190810909
Change-Id: Ic0664e077e975bba0929dd871c3a4c9ab385814c
2022-02-01 12:39:53 +01:00
Nick Chameyev
068913a8dd Fold to AOD animation: add screen off animation controller
Adds generic ScreenOffAnimationController that controls
different screen off animations. Currently it delegates
everything to unlocked screen off animation controller.
I will add fold to aod animation controller in the
next CLs.

Bug: 202844967
Test: screen off/on animation when unlocked
Test: screen off/on animation when locked
Test: screen off/on animation when timed out
Test: fingerprint unlocking from aod
Test: show/hide percentage in battery indicator
Change-Id: I8ff65baf4f4052a09dad3892ff31c6e4208da9f6
2021-12-03 15:10:08 +00:00
Steve Elliott
c4ff8e2a28 [RemoteInputView] Introduce RemoteInputViewController
Add a new Controller for RemoteInputView that will eventually house
all of the non-View code currently located inside of RemoteInputView.

This CL establishes the new Dagger configuration needed to instantiate
the Controller, as well as the lifecycle management by the parent
Controller (in this case, NotificationContentView, which doesn't have
a Controller of its own; once a Controller is introduced for that
class, the reference to the RemoteInputViewController will move there).

Bug: 193539698
Test: mp sysuig, receive some notifications, nothing breaks
Change-Id: Ib5397abe03569d2285764b69136ef44b903b1247
2021-11-08 22:10:30 +00:00
Caitlin Cassidy
265a4f3477 Merge "[Status Bar Refactor] 3/3: Inject StatusBarWindowView instead of having the controller construct it." into sc-v2-dev am: b05878a190 am: ad1ad0d52c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16174902

Change-Id: Id6c34b3e269db48bd8a161c88733dc7ca1461ab2
2021-11-05 18:22:57 +00:00
Caitlin Cassidy
23e7618826 [Status Bar Refactor] 3/3: Inject StatusBarWindowView instead of having the
controller construct it.

This will allow us to pass in a fake view for testing the controller.

This CL also moves the window view and controller into its own package
for slightly better organization.

Fixes: 204583449
Test: atest SystemUITests
Test: manual once-over of key user journeys
Change-Id: I4c2cc3f0c3a18466b2d1a1012c999f530329d3f7
2021-11-05 14:47:02 +00:00
Dave Mankoff
5012c17215 Remove injected parametser from NSSL
This substitutes in calls to Dependency#get. While this feels like
a step backwards, it is the last step necessary before removing
acual view injection.

Removal of Dependency#get is ongoing and will include cleanup of this
class.

Bug: 149942757
Test: manual
Change-Id: I129f0751f101cdce7ae92554b2a09d2091b7c13b
Merged-In: I129f0751f101cdce7ae92554b2a09d2091b7c13b
2021-10-21 02:08:20 +00:00
Dave Mankoff
9fe67af49a Remove injected parametser from NSSL
This substitutes in calls to Dependency#get. While this feels like
a step backwards, it is the last step necessary before removing
acual view injection.

Removal of Dependency#get is ongoing and will include cleanup of this
class.

Bug: 149942757
Test: manual
Change-Id: I129f0751f101cdce7ae92554b2a09d2091b7c13b
2021-10-20 15:50:50 -04:00
Ned Burns
e8a7e97ff2 Manually register Dumpables to DumpManager
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
2021-09-09 15:50:14 +00:00
Ned Burns
3aca431b69 Manually register Dumpables to DumpManager
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
2021-09-08 15:41:13 +00:00
Zoey Chen
6bcb4ca128 [Provider Model] Cherry-pick from master ag/15008434, ag/15023697 and ag/15023698
Add InternetAdapter for Wi-Fi network in internet dialog

    - Set each Wi-Fi entry into recycle view
    - Add InternetAdapterTest for unit test

Add InternetDialog for showing current networks

    - Set mobile data layout
    - Set connected Wi-Fi layout
    - Set recycle view and adapter for Wi-Fi entries
    - Add InternetDialogTest for unit test

Launch InternetDialog from tile and onReceive

    - Call from SystemUI: Inject
    - Call from outside: Receiver

Bug: 187779230
Test: build pass
Change-Id: Ib127ad43831ada06fa6a07802b3648b30faac5b0
Merged-In: Ib127ad43831ada06fa6a07802b3648b30faac5b0
(cherry picked from commit 5dbe2af746)
2021-08-24 16:12:34 +00:00
Dave Mankoff
ce1ca4816c Merge changes from topic "b196625757-operator-name-view" into sc-v2-dev am: ebf67700c6 am: fbd417afef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15586189

Change-Id: Icc6cdd58df63fecfc6c1576c80bd5c2c0fe89bcb
2021-08-18 03:07:27 +00:00
Dave Mankoff
28f9c93386 6/6 Remove NetworkController from Dependency.
Fixes: 196625757
Test: atest SystemUITests
Change-Id: Ib29e405c80c3c96b2ee9040d6e4a222f17c04dc3
2021-08-17 14:21:55 -04:00
Dave Mankoff
651068c47b Move FeatureFlags to flags package.
Bug: 194781951
Test: compile
Change-Id: I851f941487985ddf5aebd0be39e9f8387e50933f
Merged-In: I851f941487985ddf5aebd0be39e9f8387e50933f
2021-07-30 21:29:16 -04:00
Dave Mankoff
cfac4b6587 Move FeatureFlags to flags package.
Bug: 194781951
Test: compile
Change-Id: I851f941487985ddf5aebd0be39e9f8387e50933f
2021-07-30 14:32:51 -04:00
Evan Laird
d91988e960 resolve merge conflicts of c5d6a8e70a to sc-v2-dev
Fixes: 194404564
Change-Id: I7403099aecad1251d489f7782394d40b8004bff1
Merged-In: I3dba7719ac4c4d178c9ec5265865961dbd0450f9
2021-07-28 16:16:42 +00:00
Evan Laird
d779288d86 Merge "Hook up the sysui backend for status bar content rects" 2021-07-21 13:29:13 +00:00
TreeHugger Robot
ba15251dcd Merge "Use a different context when constructing an EdgeBackGestureHandler." into sc-dev am: 16ff25f5a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15331207

Change-Id: I2eb4e379514ef2dff8bcded1dc02efc1d24e4395
2021-07-21 00:51:18 +00:00
Dave Mankoff
1cad82c3bc Use a different context when constructing an EdgeBackGestureHandler.
Fixes: 193758967
Test: atest SystemUITests

Change-Id: I7417ccd3899ffba05411ebb4e56c255f6ef09f54
Merged-In: I7417ccd3899ffba05411ebb4e56c255f6ef09f54
2021-07-20 17:27:49 -04:00
Evan Laird
24b99ef4e7 Hook up the sysui backend for status bar content rects
StatusBarContentInsetsProvider provides the sysui backend for the
windowmanager api to communicate the location of the privacy indicators
to apps.

This CL hooks up that backend to the dot view controller and the
PhoneStatusBarView, which provides us with a stronger guarantee that
things are working and codifies the places where status bar content
layout can be changed. Also in this CL is a better dot positioning
algorithm that will ensure there is no flickering when the dot needs to
rotate.

Test: manual
Bug 187973222

Change-Id: I3dba7719ac4c4d178c9ec5265865961dbd0450f9
2021-07-20 10:47:49 -04:00
Dave Mankoff
7d6516684e Use a different context when constructing an EdgeBackGestureHandler.
Fixes: 193758967
Test: atest SystemUITests

Change-Id: I7417ccd3899ffba05411ebb4e56c255f6ef09f54
2021-07-20 09:38:32 -04:00
TreeHugger Robot
21c5e52f3b Merge "Make Recents purely optional" into sc-v2-dev am: 809db6c873 am: b070ac4b8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15302254

Change-Id: I665857d6517b53fd91f33cf2fa31c6c472a4c54e
2021-07-19 16:47:07 +00:00
TreeHugger Robot
809db6c873 Merge "Make Recents purely optional" into sc-v2-dev 2021-07-19 16:37:18 +00:00
Dave Mankoff
7555f00f50 Merge "Use Provider for EdgeBackGestureHandler" into sc-dev am: 8981a5e756
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15303522

Change-Id: If25729b974e27831797284312da765df04ec9f3d
2021-07-16 19:36:06 +00:00
TreeHugger Robot
c577086e39 Merge "Use Provider for EdgeBackGestureHandler" 2021-07-16 16:45:30 +00:00
Dave Mankoff
78fd4b2303 Use Provider for EdgeBackGestureHandler
Ensures that EdgeBackGestureHandler is not a singleton.

Fixes: 193758967
Test: atest SystemUITests
Change-Id: I13f0130b57cf19d2ec8c3c4285a6785aba076486
Merged-In: I13f0130b57cf19d2ec8c3c4285a6785aba076486
2021-07-16 10:04:52 -04:00
Tadashi G. Takaoka
59028ba189 Make Recents purely optional
To be able to inject Optional.empty to Optional,Recents>, this CL
removes raw Recents references and replaces those with
Optional<Recents>.

Bug: 144309772
Test: atest SystemUITests
Change-Id: Ib63739cab8da345a479cc27b2c8b011231f5cfe5
2021-07-15 22:40:54 +00:00
Dave Mankoff
58de065b64 Use Provider for EdgeBackGestureHandler
Ensures that EdgeBackGestureHandler is not a singleton.

Fixes: 193758967
Test: atest SystemUITests
Change-Id: I13f0130b57cf19d2ec8c3c4285a6785aba076486
2021-07-15 18:12:32 -04:00
TreeHugger Robot
16c7fcbcfb Merge "Make StatusBar purely optional" into sc-v2-dev am: 248f0f42b8 am: 3a2e18b05f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15270708

Change-Id: I86fca0e41fa31fadfd0647268b944e4304729f6d
2021-07-15 22:10:36 +00:00
Tadashi G. Takaoka
fb134455ce Make StatusBar purely optional
To be able to inject Optional.empty() to Optional<StatusBar>, this CL

 - removes raw StatusBar references and replaces it with Optional<StatusBar>
 - replaces Optional<Lazy<StatusBar>> to Lazy<Optional<StatusBar>>

Bug: 144309772
Bug: 138625582
Bug: 187111275
Bug: 187111293
Test: atest SystemUITests
Change-Id: I07b63e417dd4cc75a17951619065ba0f234bc2aa
Merged-In: I07b63e417dd4cc75a17951619065ba0f234bc2aa
2021-07-15 08:02:34 +09:00
Evan Laird
30a2c5b007 Revert systemui status bar provider model behavior
This CL reverts the status bar provider model behavior. It removes the
logic to show only one icon at a time, and removes showing the call
strength indicators.

This change keeps the Internet tile, and decouples SystemUI from the
system setting SETTING_PROVIDER_MODEL.

Bug: 191903788
Test: atest SystemUITests SystemUIGoogleTests; manual
Test: test with a SIM and a Wi-Fi connection and there should be both
      icons in the status bar and quick settings with this change. As
      well as the Internet tile should stay (rather than going back to
      the Cell and Wi-Fi tiles).
Change-Id: I017c10e4d7c1b15b152c44d092695dbc77e4a0ec
Merged-In: I017c10e4d7c1b15b152c44d092695dbc77e4a0ec
2021-07-01 15:02:00 +00:00
Evan Laird
f7d9770af9 Revert systemui status bar provider model behavior
This CL reverts the status bar provider model behavior. It removes the
logic to show only one icon at a time, and removes showing the call
strength indicators.

This change keeps the Internet tile, and decouples SystemUI from the
system setting SETTING_PROVIDER_MODEL.

Bug: 191903788
Test: atest SystemUITests SystemUIGoogleTests; manual
Test: test with a SIM and a Wi-Fi connection and there should be both
      icons in the status bar and quick settings with this change. As
      well as the Internet tile should stay (rather than going back to
      the Cell and Wi-Fi tiles).
Change-Id: I017c10e4d7c1b15b152c44d092695dbc77e4a0ec
2021-07-01 14:58:08 +00:00
Zoey Chen
a79403f112 [Provider Model] Launch InternetDialog from tile and onReceive
- Call from SystemUI: Inject
    - Call from outside: Receiver

Bug: 187779230
Test: build pass
Change-Id: Ib127ad43831ada06fa6a07802b3648b30faac5b0
2021-07-01 06:22:10 +00:00
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