DO NOT MERGE Adding implementation of TelecommService
First use of this service is to allow silencing of the ringer
(called from TelephonyManager)
Also updated Telecomm to run under the android.uid.phone userId.
This ID has special permission to add services and send protected
broadcast intents. We'll piggy back until telecomm moves into the
system server process.
Bug: 15125169
Change-Id: I9180797451dcb2e9029b20bed47f5d5cb8cddb9f
(cherry picked from commit ae19306ddefab5988c38d882e28b9fdffce20e8a)
diff --git a/src/com/android/telecomm/AsyncRingtonePlayer.java b/src/com/android/telecomm/AsyncRingtonePlayer.java
index ae78c5b..1c5cafe 100644
--- a/src/com/android/telecomm/AsyncRingtonePlayer.java
+++ b/src/com/android/telecomm/AsyncRingtonePlayer.java
@@ -16,6 +16,7 @@
package com.android.telecomm;
+import android.media.AudioManager;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.os.Handler;
@@ -149,7 +150,9 @@
private Ringtone getCurrentRingtone() {
// TODO: Needs support for custom ringtones.
- return RingtoneManager.getRingtone(
+ Ringtone ringtone = RingtoneManager.getRingtone(
TelecommApp.getInstance(), Settings.System.DEFAULT_RINGTONE_URI);
+ ringtone.setStreamType(AudioManager.STREAM_RING);
+ return ringtone;
}
}