summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2013-04-17 00:17:22 -0400
committerDaniel Sandler <dsandler@android.com>2013-04-17 10:59:50 -0400
commit3147523c107a5fecdccdc8083dea3124576331de (patch)
tree314ce4778841aa82675c190ea87c5f5fe40921e9 /services/java
parent37f58dccecd778f5af1f1f1db492c75ec5fcabd6 (diff)
downloadframeworks_base-3147523c107a5fecdccdc8083dea3124576331de.zip
frameworks_base-3147523c107a5fecdccdc8083dea3124576331de.tar.gz
frameworks_base-3147523c107a5fecdccdc8083dea3124576331de.tar.bz2
Treat the default sound Uri the same as DEFAULT_SOUND.
For the purposes of deciding whether or not to invoke the "fallback vibrate", that is. (RingtonePicker will return content://settings/system/notification_sound when "Default" is chosen, so if the app pops this Uri directly into Notification.sound, we should treat it like DEFAULT_SOUND and look to see whether the system notification sound is not None before running the fallback vibration.) Bug: 8627641 Change-Id: Ia469b8e4d5d7647ce1a8a179f591ed7a3443b5c5
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/NotificationManagerService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index fa18e76..3bebf91 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -1676,8 +1676,12 @@ public class NotificationManagerService extends INotificationManager.Stub
.getSystemService(Context.AUDIO_SERVICE);
// sound
+
+ // should we use the default notification sound? (indicated either by DEFAULT_SOUND
+ // or because notification.sound is pointing at Settings.System.NOTIFICATION_SOUND)
final boolean useDefaultSound =
- (notification.defaults & Notification.DEFAULT_SOUND) != 0;
+ (notification.defaults & Notification.DEFAULT_SOUND) != 0
+ || Settings.System.DEFAULT_NOTIFICATION_URI.equals(notification.sound);
Uri soundUri = null;
boolean hasValidSound = false;