summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/NotificationManagerService.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2012-09-25 17:22:27 -0700
committerJeff Sharkey <jsharkey@android.com>2012-09-26 10:49:35 -0700
commit65c4a2b26cd8776b0927e9b0e07ecf53bd31b627 (patch)
tree7dbd0b29b66336c738a0c599335ad70bb86ba4a2 /services/java/com/android/server/NotificationManagerService.java
parent5e21bf934b2a71b595deb9856a2044eea4dbce86 (diff)
downloadframeworks_base-65c4a2b26cd8776b0927e9b0e07ecf53bd31b627.zip
frameworks_base-65c4a2b26cd8776b0927e9b0e07ecf53bd31b627.tar.gz
frameworks_base-65c4a2b26cd8776b0927e9b0e07ecf53bd31b627.tar.bz2
Multi-user ringtone playback.
Change RingtonePlayer to open content:// Uris based on requesting UserHandle. Grant SystemUI visibility to all emulated storage so it can play ringtones for apps without READ_EXTERNAL_STORAGE. Resolve canonical file:// Uris before passing out of source app, replacing any /emulated_legacy/-style paths with user-specific variant so they can be opened by SystemUI. Calling for RemoteViews, Ringtones, and Notifications. Bug: 7202982 Change-Id: Ibf0eca8df80c1486711144a7b648f464aadfe099
Diffstat (limited to 'services/java/com/android/server/NotificationManagerService.java')
-rwxr-xr-xservices/java/com/android/server/NotificationManagerService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index bab4f7a..848edf8 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -890,6 +890,7 @@ public class NotificationManagerService extends INotificationManager.Stub
userId = ActivityManager.handleIncomingUser(callingPid,
callingUid, userId, true, true, "enqueueNotification", pkg);
+ final UserHandle user = new UserHandle(userId);
// Limit the number of notifications that any given package except the android
// package can enqueue. Prevents DOS attacks and deals with leaks.
@@ -991,7 +992,6 @@ public class NotificationManagerService extends INotificationManager.Stub
}
if (notification.icon != 0) {
- final UserHandle user = new UserHandle(userId);
final StatusBarNotification n = new StatusBarNotification(
pkg, id, tag, r.uid, r.initialPid, score, notification, user);
if (old != null && old.statusBarKey != null) {
@@ -1063,7 +1063,7 @@ public class NotificationManagerService extends INotificationManager.Stub
try {
final IRingtonePlayer player = mAudioService.getRingtonePlayer();
if (player != null) {
- player.playAsync(uri, looping, audioStreamType);
+ player.playAsync(uri, user, looping, audioStreamType);
}
} catch (RemoteException e) {
} finally {