summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/SystemUIService.java
Commit message (Collapse)AuthorAgeFilesLines
* Proto dump from SystemUI.Fabian Kozynski2022-10-201-1/+1
| | | | | | | | | | | | | | Needs to be called by doing `adb shell dumpsys statusbar --proto` because using `dumpsys activity service` adds text to the dump. Will also be dumped as part of the BR Test: atest SystemUITests Test: Used in CTS Test: manual dump and BR Fixes 237786667 Change-Id: I74abf65a76c059ea9bb5a14728192b6b683b7fc7
* Ensure log buffers are dumped to file on uncaught exceptionsJustin Weir2022-05-021-0/+1
| | | | | | | | | | | Move the functionality for wrapping an uncaught exception pre-handler from PluginManager to a standalone manager. Make DumpHandler register another uncaught exception pre-handler that will tell the log buffer eulogizer to dump contents to a file. Fixes: 213884413 Test: manually verified, added tests, and ran atest Change-Id: If829fc33769819624530f766178689ecf0374926
* Remove FileDescriptor from systemui.Dumpable.Dave Mankoff2022-04-051-1/+1
| | | | | | | | | | This is the first step in moving over to the new public android.util.Dumpable api. Bug: 217567642 Test: m SystemUI Merged-In: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0 Change-Id: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0
* Listen for EXTRA_PRESENT changesEvan Laird2020-10-191-1/+10
| | | | | | | | | | | ACTION_BATTERY_CHANGED can pass a boolean EXTRA_PRESENT which would alert listeners that a battery may or may not be present. SystemUI now wants to show an error battery state instead of a potentially misleading status in this situation. Bug: 169935148 Test: adb shell cmd battery set present 1 Change-Id: I7d576248bb9931059100facb67ca6b46e81e554e
* Freeze log buffers when a bug report is takenNed Burns2020-06-011-1/+14
| | | | | | | | | | | This prevents us from polluting the log buffers with logs generated by the bug report-taking process itself (notable, bug reports post a lot of notifications, which overwhelm the NotifLog). Bug: 112656837 Test: atest Test: manual Change-Id: I070ebc99a04d854b6aacb39da1cc311307ed0653
* Split DumpManager into twoNed Burns2020-05-191-7/+7
| | | | | | | | | | | | | | | Splits DumpManager into two pieces: [1] DumpHandler, which is responsible for parsing input args from either of our dumpable services and triggering the right kind of dumps. [2] DumpManager, which is now largely just a registry of dumpables that exposes methods for dumping those dumpables. This change is necessary to allow other clients to use the DumpManager to dump to things other than bug reports. Test: manual, atest Bug: 112656837, 151317347 Change-Id: I6dcef9773c204c50fb4101f8fc355767b54f39bc
* Add service for dumping at NORMAL priorityNed Burns2020-02-201-0/+7
| | | | | | | | | | | | SystemUIService is hard-coded to dump at CRITICAL priority and so can't dump very much (and, most importantly, can't handle dumping our length log buffers). So instead we create a new service, SystemUIAuxiliaryDumpService, which will dump alongside all other services in the NORMAL section. Its dump method calls straight into the DumpManager. Test: atest, manual Change-Id: If76f206081a1663e23fc14076b50bef7396e517f
* Introduce DumpManagerNed Burns2020-02-201-59/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Conslidate @MainHandler and similar to @Main (and similar).Dave Mankoff2019-12-201-2/+2
| | | | | | | | | | | | @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
* Remove Dependency.get(MAIN_HANDLER) from SystemUIServiceDave Mankoff2019-11-191-1/+13
| | | | | | Bug: 144503618 Test: atest SystemUITests Change-Id: Ia75498b500333ac4924f1b1e3f7831f7ff7754e3
* Don't dump SysUI config if other args are providedNed Burns2019-10-291-5/+3
| | | | | | | | This was polluting the output of selective dump from adb shell dumpsys activity service com.android.systemui/.SystemUIService dependency DumpController <tag> Test: manual Change-Id: Ifcfb97e3edf2005e16a1433862fe9094927c0761
* Merge "Dump the system UI components config, so we can check if OEM ↵Felipe Leme2019-10-181-0/+31
|\ | | | | | | | | | | | | | | redefines them." into qt-qpr1-dev am: 305a6bd1d9 am: cc2e228cb7 Change-Id: I6926201f1c81dc3d76c72f1102dd7061bd1f1f22
| * Dump the system UI components config, so we can check if OEM redefines them.Felipe Leme2019-10-111-0/+31
| | | | | | | | | | | | | | | | | | Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService --config Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService Bug: 141631055 Change-Id: I157824b69e57ea133be666194b2f11c0e1ba36e8 (cherry picked from commit adff0b052d032cd779383a7e518b96acb16f3e44)
| * Initialize Dependency with the Application when Dagger starts.Dave Mankoff2019-08-091-1/+10
| | | | | | | | | | | | | | | | | | | | Dependency is no longer a subclass of SystemUI. It gets initialized directly as part of the application, just like the rest of Dagger. It was an awkward implementation of SystemUI anyways. Bug: 137324767 Change-Id: Icf49e9262e8c0710210a8bc0231c4d16396ffdf3 Test: atest SystemUITests
* | Fix dump DependencyFabian Kozynski2019-09-171-1/+1
| | | | | | | | | | | | Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService Dependency Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService dependency Change-Id: I6c7fa060ab48321ae86f93ad14ff9621d2f498b1
* | [DO NOT MERGE] qt-qpr1-sysui-dev @ build 5814791Hyunyoung Song2019-09-011-1/+10
|/ | | | | | | | | | | | | | | 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
* Add ability to dump specific dependency controllerWinson Chung2019-04-181-2/+2
| | | | | | Bug: 130804868 Test: adb shell dumpsys activity service SystemUIService Dependency OverviewProxyService Change-Id: Ie88f62d0d0b17ded6f8ff5d3d850f1f444eed444
* Fixes import ordering.Gus Prevas2018-11-141-3/+3
| | | | | Test: n/a Change-Id: I432e11b52deb7974e50f62076af3b7aa07e364b6
* Move plugin support to shared libTony Wickham2018-09-281-2/+2
| | | | | | | | | | | | | 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
* Clean up DozeService plugin listeners.Dan Sandler2018-02-151-0/+6
| | | | | | | | | | | | | Also adds some additional debugging: `adb shell dumpsys activity service SystemUI` will now dump the plugin map. This will help us discover leaks that happen to interact with plugins, or leaks in the plugins themselves. (Note that plugins only work on debuggable builds.) Bug: 72138063 Test: adb shell dumpsys activity service SystemUI Change-Id: I328aeb9a0940404760e9121ef26a0518371b8319
* Add BinderProxy tracking code to SysUI.Dan Sandler2018-01-241-0/+19
| | | | | | Bug: 71353150 Test: runtest systemui Change-Id: I48fbee833fb1c9e70c6efa8c0b232abbc340dce3
* Introduce RescueParty.Jeff Sharkey2017-01-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When a device gets stuck in a crash loop, it's pretty much unusable and impossible for users to recover from. To help rescue devices from this state, this change introduces a new feature that watches for runtime restart loops and persistent app crash loops, and escalates through a series of increasingly aggressive rescue operations. Currently these rescue levels walk through clearing any experiments in SettingsProvider before finally rebooting and prompting the user to wipe data. Crash loops are detected based on a number of events in a specific window of time. App stats can be stored in memory, but boot stats need to be stored in system properties to be more robust. Start up RecoveryService much earlier during the boot so we can reboot into recovery when needed. Add properties tha push system_server or SystemUI into a crash loops for testing purposes. Test: builds, boots, forced crashing walks through modes Bug: 24872457, 30951331 Change-Id: I6cdd37682973fe18de0f08521e88f70ee7d7728b
* Fix crash when taking screenshot.Jorim Jaggi2014-04-051-0/+6
| | | | | | | Start SystemUI services only if needed. Bug: 13635952 Change-Id: I76a5e3333ed8f51a267e33b2cf172d6c775ac914
* Wait for Keyguard to be drawn after boot.Jorim Jaggi2014-04-021-54/+3
| | | | | | | | | | | | | | | | | The old logic with waiting for the Keyguard to be drawn assumed that it is in an own window, and just checked for the visibility. This is no longer possible as the Keyguard is in the status bar, and the status bar might have been drawn without the Keyguard. So we have to wait explicitely until Keyguard told PhoneWindowManager that it has now been drawn and we can turn on the screen. In addition, the starting logic of SystemUI is moved into SystemUIApplication such the we can make sure that the status bar already exists when the callbacks from PhoneWindowManager reach KeyguardService. This simplifies the logic a lot. Bug: 13635952 Change-Id: Ifd6ba795647edcf3501641e39052e4d04bc826fb
* Decouple storage notification from status bar.John Spurlock2013-06-251-0/+1
| | | | | | | Hoist the usb storage notification listener to a top-level system ui service, not dependent on a status bar implementation. Change-Id: Ic9e7fba1e5bfd758d72226f6d796c2f04f6b17e6
* Decouple recents from status bar.John Spurlock2013-06-241-0/+4
| | | | | | | | | | Remove remaining references to recents package from status bar. Introduce in-process "components" to the existing SystemUI base class to make component boundaries explicit, and implement Recents as the first component. Change-Id: Ieefd386379a1f46806b31f68a4cacd76c093aea4
* Introduce SystemUI-managed alternative system bars.John Spurlock2013-06-211-25/+6
| | | | | | | | | | | | | | | | | | | | | | | If a service component is defined in a new secure setting, SystemUI will attempt to use that service as the status bar provider. Falls back to the existing in-process implementation configured in the product config if the setting is missing or invalid. Nothing changes yet from a permission point of view. Alternative system bar implementations still require the status bar permission. Also nothing changes from an api point of view. Alternative system bar implementations use the existing IStatusBar interface. This simply enables testing alternative system bar implementations installed from other trusted, platform-signed packages. Known caveat: the setting is stored per user, multi-user changes will be handled in a future CL. Change-Id: I0413df185f7e75f77ad2ae1bc3689306d5e6e0fb
* Remove TabletStatusBar from systemui package.John Spurlock2013-06-121-14/+4
| | | | Change-Id: Ie8b556dbba8751617582f8c717ee83e480938b27
* Organize the imports in systemui.John Spurlock2013-06-121-3/+3
| | | | | | | To follow android conventions, more importantly to remove the unused. Change-Id: I75881718e84360a579a3b02c26489ad250bc9227
* Migrate systemui Slog calls to LogJohn Spurlock2013-06-061-4/+4
| | | | Change-Id: Ib6734c85960f06fed646599565b8eeba26b9e98e
* Remove a workaround for accessibility managers that works across users.Svetoslav2013-02-281-10/+0
| | | | | | | | | | | | | | | | | | The system and some processes such as the keyguard and system UI run across users. Hence, the local accessibility manager should call into the backing system service with the id of the current user. For all other processes the local manager uses the current user id. There was a method that is to be called before the local accessibility manager has been accessed to initialize it to work across users. This had to be done for keyguard and system UI. This change removed the workaround and now the local accessibility manager determines under the hood which user id to use while calling into the system. If the local manager is in the system process or its process has permissions to work across uses, the manager uses UserHandle.USER_CURRENT, otherwise it uses the user if its process. Change-Id: I3e97fe98805adca01c1a0127a276828e90926f95
* Add brightness dialog to SystemUIMichael Wright2013-02-201-0/+1
| | | | Change-Id: If31406c9144bb2583876f08dd54b259d1dfa3601
* Multi-user support for the accessibility layer.Svetoslav Ganov2012-09-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. This change converts the accessibility manager service to maintain a state per user. When the user changes the services for the user that is going away are disconnected, the local accessibility managers in the processes for this user are disabled, the state is swapped with the new user's one, and the new user state is refreshed. This change updates all calls into the system to use their user specific versions when applicable. For example, regisetring content observers, package monitors, calls into other system services, etc. There are some components that are shared across users such as UI created by the system process and the SystemUI package. Such components are managed as a global state shared across all users and are updated accordingly on a user switch. Since the SystemUI is running in a normal app process this change adds hidden APIs on the local window manager to allow the SystemUI to notify the accessibility layer that it will run accross users. Calls to AccessibiltyManager's isEnabled(), isTouchExplorationEnabled() and sendAccessibilityEvent return false or a are a nop for a background user sice he should not send accessibility events, and should not perform touch exploration. Update the internal accessibility tests due to changes in the AccessibilityManager. This change also fixes several issues that were encountered such as calling out the accessibility manager service with a lock held. Removed some incorrect debugging code from the TouchExplorer that was leading to a system crash. bug:6967373 Change-Id: I2cf32ffdee1d827a8197ae4ce717dc0ff798b259
* Refactor for multi-display support.Jeff Brown2012-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Split WindowManagerImpl into two parts, the WindowManager interface implementation remains where it is but the global communications with the window manager are now handled by the WindowManagerGlobal class. This change greatly simplifies the challenge of having separate WindowManager instances for each Context. Removed WindowManagerImpl.getDefault(). This represents the bulk of this change. Most of the usages of this method were either to perform global functions (now handled by WindowManagerGlobal) or to obtain the default display (now handled by DisplayManager). Explicitly associate each new window with a display and make the Display object available to the View hierarchy. Add stubs for some new display manager API features. Start to split apart the concepts of display id and layer stack. since they operate at different layers of abstraction. While it's true that each logical display uniquely corresponds to a surface flinger layer stack, it is not necessarily the case that they must use the same ids. Added Display.getLayerStack() and started using it in places where it was relatively easy to do. Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
* Migrate ringtone playback to SystemUI.Jeff Sharkey2012-04-271-0/+1
| | | | | | | | | | | | | Introduce IRingtonePlayer, which handles playback for both Ringtone objects and Notifications. SystemUI now hosts this player, which it registers with AudioService. It also keeps MediaPlayer instances warm, and cleans them up after stop() or Binder death. Move both Ringtone and NotificationManagerService to play back audio through this new interface. Bug: 6376128, 6350773 Change-Id: I1dcb86d16ee3c4f07cdb2248d33dcff4ead3609a
* Protect system services with DUMP permission.Jeff Sharkey2012-04-261-8/+0
| | | | Change-Id: I5e53859f8b8e5473e54eca43ebd7de841f1a05ff
* Clean up status bar, system bar, navigation bar management.Dianne Hackborn2012-04-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | The status bar and navigation bar are two completely separate elements, with their own semantics. The system bar now classifies itself as a navigation bar, since that is really how it behaves. This required rewriting the HDMI resizing code, so that it is all done by PhoneWindowManager since that is what is responsible for the size of the navigation bar (and thus now system bar). This actually gets rid of a fair amount of code, and means we can also do the same thing for a pure navigation bar. Likewise the system bar now has the navigation bar ability to be hidden when requested by system UI flags. To get the behavior we want on Xoom, we only allow the nav bar to be hidden when it will help provide a better aspect ratio for showing widescreen videos. Finally the nav/system bar now animates when hidden and shown. Change-Id: Ie927154b68376a0b61802f99171ff56b8da92e7a
* Rework how we decide whether to use system or status bar.Dianne Hackborn2011-05-261-1/+15
| | | | | | | | | | | The PhoneWindowManager is now responsible for determing this, since it needs to do this before we can generate the configuration since we need to take into account the system bar size we will use. Also the Display should now report the screen height without including the system bar. Change-Id: I82dfcc5e327e4d13d82c373c6c870f557a99b757
* Look again; the system bar is now diamonds.Daniel Sandler2010-12-151-0/+8
| | | | | | | | | | | | | | | | | | | | Lights Out 3.0 (bug 3241144) - new artwork - new transition animations - new interaction (tap anywhere to dismiss & interact) - much simpler overall design and implementation Layout (bug 3242949) - fine-tuned spacing on navigation and notification icons - notification icon spacing compresses in portrait Shirt Pocket (bug 3203179) - disabled for now Bug: 3241144 Bug: 3242949 Bug: 3203179 Change-Id: I6e9b7f9ebe07317d07609f11d5f03f22269bc7bb
* Make the low battery dialog work again.Joe Onorato2010-10-271-3/+14
| | | | Change-Id: I97232a3645e6a817c9c5f5f90b88a7e925d36d13
* Refactor SystemUI so the status bar isn't a Service of its own.Joe Onorato2010-10-211-0/+105
There is now one SystemUIService, which starts the status bar service. Pretty soon there will be other things running in here too. This way we don't need to have each of them started by something individually. This also moves the choice between tablet and phone status bar into SystemUI.apk, which seems like a much better place for it. Change-Id: Ib69ef2f43d648764f8dbb52008f5d036a1ee07d9