summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/power
Commit message (Collapse)AuthorAgeFilesLines
* SystemUI: Switch to AOSP CHARGING_SOUNDS_ENABLEDMichael Bestas2016-02-121-2/+2
| | | | Change-Id: Ia2fe8cbce18a505b7137f17657f35359a4c0bdb6
* fw: Move Global settings to CMSettingsd34d2015-11-121-5/+6
| | | | | | | | | | | | | | | This moves all Settings.Global.* settings, that were added to CyanogenMod and not used in boot classpath, to CMSettings. * WAKE_WHEN_PLUGGED_OR_UNPLUGGED * BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX * POWER_NOTIFICATIONS_ENABLED * POWER_NOTIFICATIONS_VIBRATE * POWER_NOTIFICATIONS_RINGTONE * ZEN_DISABLE_DUCKING_DURING_MEDIA_PLAYBACK * WIFI_AUTO_PRIORITIES_CONFIGURATION Change-Id: I5a23971b278d150c633d2b4ade49a143c4423c26
* SystemUI: fix notification on chargerGianmarco Reverberi2015-11-111-16/+11
| | | | Change-Id: I92382d556f6224f46beb211bfa0c4a22f2179683
* [1/2] Forward port power connect/disconnect notification supportSam Mortimer2015-10-261-0/+52
| | | | | | | | | | | | | | | | | | | Original commit info: [1/2] Power connect/disconnect notification support part 1/2: frameworks/base PowerUI and Settings http://review.cyanogenmod.org/#/c/35241/ part 2/2: packages/apps/Settings Sound settings http://review.cyanogenmod.org/#/c/35242/ V-Old_Change-Id: I36a6b9f924d2cd52191a8e83a744745b37c5b068 OldChange-Id: Ib865e1c296cb8e1d957b2a48616c88ceaba5c008 Change-Id: I5db20ef23bdb644e2af06e8dcbc8fbd0cf7ce321 Signed-off-by: STELIX <ssspinni@gmail.com>
* Battery saver: limit notification intents to system UI.John Spurlock2015-06-011-1/+2
| | | | | | | Ensure the actions taken by the HUN warnings came from sysui. Bug: 20918350 Change-Id: I8dc02ebdfcc1f60d068bea43e10e350dc566728d
* Replace usages of deprecated Resources.getColor() and getColorStateList()Alan Viverette2015-03-181-3/+3
| | | | Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
* Standardize notification IDs in the sysui package.Chris Wren2015-01-161-5/+4
| | | | | | | | Use the resource system to assign IDs for notifications, so that we know there will be no collisions. Bug: 10671709 Change-Id: I403e89f6ec953f6e2e63520b86e2cd464ebce6b3
* PowerUI: Suppress warning on incremental drops.John Spurlock2014-10-291-0/+5
| | | | | | | | If the user explicitly dismisses the warning notification, don't update the notification until the next threshold value. Bug: 17691122 Change-Id: I840f33f787f1dd6f217de543a291bc9f65b1b046
* PowerUI: Post/cancel notification as UserHandle.ALL.John Spurlock2014-10-222-5/+14
| | | | | | | | | - Post power-related notifications for all users. - Update the pending intent actions on user switch. - Listen for the intent actions for all users. Bug: 17300571 Change-Id: I956f09ecf5395f31ae1c1ec0409ee251839fcef4
* PowerUI: Uncategorize battery notifications as _SYSTEM.John Spurlock2014-10-171-3/+0
| | | | | | | So they don't interrupt in priority mode. Bug: 17691121 Change-Id: I51757c0275ec461a786d1e254b0e71f7b27b5029
* Fix percentage formatting in SystemUI.Elliott Hughes2014-10-031-1/+3
| | | | | | | | | | Also remove some orphaned strings that tried to format percentages wrongly. (The ar and fa localizations will be clobbered, but this lets you test this change independently.) Bug: 15476051 Change-Id: Ifd97d47446bdd2e95298b04e1a11542dfed7f9a1
* Saver: PowerManager call to set low power mode.John Spurlock2014-09-141-5/+7
| | | | | | | | | | | | | | | | | - Add an explicit power manager call to set the low power mode state, instead of trying manage everything around a single setting. - When low-power mode is triggered by falling below the configured threshold, it does not update the setting. - The "is-enabled" api returns setting || below configured trigger. - Move the snooze management into the new api call. - Callers (sysui + settings) updated to use the api instead of the setting. - Handles the case where the level does an unpowered leap out of the low battery level. (Possible if powered in-between while the device is off) Bug:17460535 Change-Id: Ic030504c9cad9868a7137abbe837b170da37852b
* PowerUI: Don't play sound on every update below level.John Spurlock2014-08-251-1/+2
| | | | | | | | There are many paths to update the power notification. Use PowerUI's playSound as a tripwire, and reset the value once applied. Bug:17253062 Change-Id: Ica6a4c621f7047f8b52dee82cbfe1db5bc08247e
* PowerUI: Remove the fallback dialogs.John Spurlock2014-08-202-251/+3
| | | | | | | | | | | - Low battery notifications are now always notifications, even if not HUNs. - Remove obsolete dialogs used only as HUN fallbacks. - Extend the default HUN timeout to 10 seconds and remove the ongoing hack for the warning notification. Bug:17070231 Change-Id: I29069c3d90dcca6f9bce512e5a0ccbd983704de5
* Added notification color to all system notificationsSelim Cinek2014-08-201-3/+9
| | | | | Bug: 17128331 Change-Id: I81a94510ef51b99916f314c0dd65852426a1fbeb
* Lockscreen launch animationsJorim Jaggi2014-08-123-13/+10
| | | | | | | | | | | | | | | | | | | - Get rid of ActivityManager.dismissKeyguardOnNextActivity, which was used for two different things: Dismiss keyguard from somewhere else (not really necessary anymore), wait to actually dismiss keyguard after the window behind is drawn. Instead, introduce keyguardWaitingForActivityDrawn(), and change the semantics where necessary. - Make wallpaper_close_enter consistent with task_open_enter and the Keyguard launch animation. - Close the panel even on lockscreen when launching a notification. - Block notification shade updates during the collapsing motion so notification don't play the disappear animation immediately after having launched a notification. Bug: 15991916 Change-Id: I133c177b84e926c87c1a404ba93d633593fec3ab
* PowerUI: Remove notification action icons.John Spurlock2014-08-061-2/+2
| | | | | Bug:16839950 Change-Id: I1f8c1c80a2c849e115396e1e22d344a52a2dbe3f
* Battery saver: new policy changes + SystemUI tweaks.John Spurlock2014-08-023-71/+57
| | | | | | | | | | | | | | | | | | | | | | - Service policy changes: allow the user to turn off (snooze) saver mode below the auto-trigger level. Plugging in the device always exits saver mode. - Default trigger level is now 0 (never) instead of 15. - SystemUI now also listens to a new POWER_SAVE_MODE_CHANGING, since waiting for _CHANGED can take seconds. - Move shared feature description text into the framework so it can be shared. - Tweak dialog title + action strings. - Remove trigger-level from SystemUI, it no longer needs it. - Add the ability to turn off saver mode directly from the notification. - Migrate saver confirmation dialog to common system UI dialog helper, and add a few convenience methods. - Fix bug where the status bar area would be orange over the keyguard in SHADE_LOCKED mode. Bug:16214395 Change-Id: I3d1ded1eec9e63e7d97469486f6a320e1bebbccd
* Avoid upranking battery level/saver notificationsChristoph Studer2014-06-271-0/+11
| | | | | Bug: 15884933 Change-Id: Ia1a61c8b3d3f70feaa0a68702c1a8902b0c15bb7
* Battery saver notifications should be public.John Spurlock2014-06-181-1/+4
| | | | | Bug:15713445 Change-Id: I2ed0e47bcc3120baf85c8529b7ef15756e215ea7
* PowerUI: Dial down logging.John Spurlock2014-06-161-4/+4
| | | | | | | Only log notification dismissals on state changes. Bug:15611493 Change-Id: Id304f7aed58e3584235513677abe97dd85595009
* Merge "PowerUI: dismiss warning notifications when falling back." into ↵John Spurlock2014-06-101-2/+9
|\ | | | | | | lmp-preview-dev
| * PowerUI: dismiss warning notifications when falling back.John Spurlock2014-06-121-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The full-screen intents simply fire broadcasts to open fallback dialogs. This means the warning notifications are left visible under the dialog on the lockscreen, or after the dialog is quickly dismissed. Once we launch the fallback dialogs, there is no reason for the notification form to exist. Bug:13329308 Change-Id: I5735c65d7e8eb620493d3ef3a2cfc27f75cecbb5
* | PowerUI: Remove obsolete workaround.John Spurlock2014-06-121-9/+0
|/ | | | | | | | No longer need to cancel and repost notifications when transitioning from/to heads-up. Bug:15534198 Change-Id: I93e5433e51410c80c2e183976e0041ca1bfeb3c7
* Heads-up notifications for low battery warnings.John Spurlock2014-06-113-41/+493
| | | | | | | | | | | | | | Falls back to dialogs when heads-up are N/A. Add new ongoing notification if battery saver mode is active. Offer to start battery saver on warnings, if not already started. True up BatteryMeterView's levels to the latest threshold levels. 15% for first warning. Bug:13329308 Change-Id: Id8ad11a1997079ee7165ae003a8fa1c744462ab3
* Implement control of auto power save mode.Dianne Hackborn2014-06-111-8/+39
| | | | | | | | | | | | | | | | | | | Follow the setting for auto power save mode in both battery service and battery UI. Default level is 15 when setting is not set; otherwise it is whatever the setting gives, with 0 meaning auto battery save is off. Change how we define the "turn off warn" level to be an adjustment from the warn level, so we can have a good value for whatever auto setting is set. Fix power manager to never go in to power save mode when plugged in, even if the user has manually turned it on. Add new delete option to settings command, because I needed it for testing. Change-Id: I512b691df84399d50b8e751fd50732c6093ebe85
* Separate power warnings UI from state calculation.John Spurlock2014-03-062-164/+248
| | | | | | | Move the existing dialog-based implementation into another class. Bug:13329308 Change-Id: I87beac1593fd4eea2ea8a498381f7fcc289e0bc0
* Don't wake users up with low battery sounds.Daniel Sandler2013-10-081-16/+51
| | | | | | | | | | | | | | | | | | | | Battery sounds will always play when the screen is on, and then for Settings.Global.LOW_BATTERY_SOUND_TIMEOUT milliseconds after the screen goes off. After that, low battery alerts will be pushed out the airlock until the screen comes back on again. If battery sounds are suppressed via this mechanism you'll see a log line like: V/PowerUI ( 3161): screen off too long (5779ms, limit 5000ms): not waking up the user with low battery sound The default value of LOW_BATTERY_SOUND_TIMEOUT is a settings provider resource: R.integer.def_low_battery_sound_timeout. Bug: 10487557 Change-Id: Iddd42038aa630631dc8f1833f20fcc5a0c646681
* Remove trailing whitespace from system ui.John Spurlock2013-07-171-1/+1
| | | | | | Baseline existing .java files, no excuses going forward. Change-Id: I4bd0f25bbda6f2ec832e34ef5c70d4830bf07f99
* Organize the imports in systemui.John Spurlock2013-06-121-7/+7
| | | | | | | To follow android conventions, more importantly to remove the unused. Change-Id: I75881718e84360a579a3b02c26489ad250bc9227
* Migrate systemui Slog calls to LogJohn Spurlock2013-06-061-14/+14
| | | | Change-Id: Ib6734c85960f06fed646599565b8eeba26b9e98e
* Low battery dialog should use UserHandle.CURRENT.John Spurlock2012-11-071-1/+2
| | | | | Bug:7493313 Change-Id: Ie753633c550e4ce679fbb6f9e0c6adf56392ec87
* More migration to Global settings.Jeff Sharkey2012-10-181-3/+3
| | | | | Bug: 7375796 Change-Id: I3954ce141ad30073896090a28eee743ba15fd736
* Add flag for displaying non-user's Windows to user.Craig Mautner2012-10-051-0/+4
| | | | | | | | | | | | | | | | Created a new flag that indicates that a window should be shown to all users. For the flag to be valid the owner of the window must have system permissions. Also separated system window types into those that show to all users (e.g. StatusBar, Keyguard, ....) and those that appear only to the owning users (e.g. Drag, ANR, TOAST, ...). Those that appear only to their owner can override their default behavior using the new flag (e.g. LowBattery). Fixes bug 7211965. Change-Id: I1fdca25d57b7b523f0c7f8bceb819af656c388d4
* system and UI sounds volume policyEric Laurent2012-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Implement a more consistent policy for system and UI sounds (key clicks, lock/unlock, camera shutter, DTMF, low battery...): - All system sounds are played over STREAM_SYSTEM stream type. - The STREAM_SYSTEM volume that was previously fixed now tracks the volume of a "master" stream type. This "master" stream type is STREAM_RING for phones and STREAM_MUSIC for tablets which corresponds to the stream whose volume is modified by default by the volume keys. - The STREAM_SYSTEM volume ranges from -24dB to -6dB (-24dB to -12dB over headphones) when the "master" stream volume ranges from its min to its max. - DTMF tones are played over STREAM_DTMF that tracks the "master" stream volume in the same manner with the following exception: when in call, DTMF stream tracks STREAM_VOICE_CALL volume. - Camera shutter sound is played over STREAM_SYSTEM_ENFORCED stream that tracks the "master" stream volume except in countries where regulation enforces this sound. In this case its volume is fixed and cannot be muted. - Low battery sound is played over STREAM_SYSTEM and therefore has a tunable volume and is heard while in call. Issue 6344620. Issue 6069229. Issue 6213100. Change-Id: I53a237878ead596e706c5dbbb1420e62cde32bd7
* Play the low-battery sound only at certain discharge events.Daniel Sandler2011-07-261-6/+22
| | | | | | | | | | | | | | | | | | | | That is, only play it when the device is running on battery and the remaining charge level descends into a new low-battery regime: * when the device hits the first threshold, for example 15% (the dialog is first shown at this time) * when the device hits the second threshold, e.g. 4% (the dialog will be redisplayed if necessary) * when the device has been charging but AC power is removed, returning the device to a low-battery regime (the dialog will be redisplayed if necessary) The sound will no longer be replayed as the battery level descends within these regimes (say, 4% --> 3%). Bug: 4981280 Change-Id: I049d60f39ae556241a23f8664e61be3d70d937e5
* more targeted loggingJoe Onorato2011-04-061-3/+3
| | | | Change-Id: Id440a0f20ae360cd6863aa198d82b5ff2dd2f3b7
* Move the low battery sound to the notification stream.Daniel Sandler2011-02-031-1/+1
| | | | | | | | This will allow its volume to be governed by the user's chosen notification volume. Bug: 3409396 Change-Id: I1bc59fd76f4b5250beac530b2711dd59d79b5384
* Revert "getRingtone is causing an anr. Turn it off for now."Mike Lockwood2011-01-261-2/+0
| | | | | | | | | | | ANR doesn't seem to be happening any more. BUG: 3142881 This reverts commit c597ba8e9ad08ac628271b4498c27eda74c6c86c. Change-Id: Ib6eb407c700bc9a8460f49394ec71d75d14588e2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Fix bug 3245465 - Themed dialog iconsAdam Powell2011-01-081-2/+2
| | | | | | | | | Added light/dark versions of holo dialog icons. Apps using AlertDialogs that wish to use the system dialog icon should use setIconAttribute(android.R.attr.alertDialogIcon) instead of setIcon(android.R.drawable.ic_alert_dialog). Change-Id: I40793a3164478be5ffa045ededfcab8210753a4b
* Slightly easier to readJoe Onorato2010-10-301-1/+1
| | | | Change-Id: I818d885999150333ec326a283f4574571c09add1
* Implement reminder power dialog and invalid charger dialog.Joe Onorato2010-10-271-61/+165
| | | | | | Bug: 2510318 Bug: 2974431 Change-Id: I92eb419eeffb657e5572a35a490735a96b303d6b
* getRingtone is causing an anr. Turn it off for now.Joe Onorato2010-10-271-0/+2
| | | | Change-Id: Ia002c9be1cd203e5e989f2a9e49c49b97778ec1b
* Make the low battery dialog work again.Joe Onorato2010-10-271-0/+183
Change-Id: I97232a3645e6a817c9c5f5f90b88a7e925d36d13