diff options
author | Evan Charlton <evan@evancharlton.com> | 2010-09-09 22:17:19 -0400 |
---|---|---|
committer | Evan Charlton <evan@evancharlton.com> | 2010-09-09 22:54:37 -0400 |
commit | bfedf0b8c452aded39df9841ec6e4bc0bf770d50 (patch) | |
tree | 4344331ebf0228e5781e9da9748648909ff98655 /core/java/android/provider/Settings.java | |
parent | c372719047bd3c1486d26037d43c42a7ce41b2f6 (diff) | |
download | frameworks_base-bfedf0b8c452aded39df9841ec6e4bc0bf770d50.zip frameworks_base-bfedf0b8c452aded39df9841ec6e4bc0bf770d50.tar.gz frameworks_base-bfedf0b8c452aded39df9841ec6e4bc0bf770d50.tar.bz2 |
Allow the user to define 'quiet hours' for notifications.
Introduces a notion of user-defined 'quiet hours'. During this period,
notifications will be: (1) silenced, (2) have vibrations removed, and
(3) have their requested colors muted (to dim the LED on capable hardware).
Note that (3) works well on Nexus One and gracefully degrades on sapphire.
That is, LED colors are reduced, but hardware still displays them the same.
Bug: 2164
Bug: 2252
Change-Id: I66b4dbab8ccc30741b15629fb713ff18b4511b47
Diffstat (limited to 'core/java/android/provider/Settings.java')
-rw-r--r-- | core/java/android/provider/Settings.java | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index c04f4d9..ab5459d 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2199,6 +2199,42 @@ public final class Settings { public static final String HDPI_BATTERY_ALIGNMENT = "hdpi_battery_alignment"; /** + * Whether to enable quiet hours. + * @hide + */ + public static final String QUIET_HOURS_ENABLED = "quiet_hours_enabled"; + + /** + * Sets when quiet hours starts. This is stored in minutes from the start of the day. + * @hide + */ + public static final String QUIET_HOURS_START = "quiet_hours_start"; + + /** + * Sets when quiet hours end. This is stored in minutes from the start of the day. + * @hide + */ + public static final String QUIET_HOURS_END = "quiet_hours_end"; + + /** + * Whether to remove the sound from outgoing notifications during quiet hours. + * @hide + */ + public static final String QUIET_HOURS_MUTE = "quiet_hours_mute"; + + /** + * Whether to remove the vibration from outgoing notifications during quiet hours. + * @hide + */ + public static final String QUIET_HOURS_STILL = "quiet_hours_still"; + + /** + * Whether to attempt to dim the LED color during quiet hours. + * @hide + */ + public static final String QUIET_HOURS_DIM = "quiet_hours_dim"; + + /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. * @hide @@ -2268,7 +2304,13 @@ public final class Settings { HAPTIC_UP_ARRAY_DEFAULT, HAPTIC_LONG_ARRAY_DEFAULT, HAPTIC_TAP_ARRAY, - HAPTIC_TAP_ARRAY_DEFAULT + HAPTIC_TAP_ARRAY_DEFAULT, + QUIET_HOURS_ENABLED, + QUIET_HOURS_START, + QUIET_HOURS_END, + QUIET_HOURS_MUTE, + QUIET_HOURS_STILL, + QUIET_HOURS_DIM }; // Settings moved to Settings.Secure |