Merge "Use IncomingCallFilterGraph to perform incoming call filters."
diff --git a/src/com/android/server/telecom/CallRecordingTonePlayer.java b/src/com/android/server/telecom/CallRecordingTonePlayer.java
index 9b1c4a5..999148c 100644
--- a/src/com/android/server/telecom/CallRecordingTonePlayer.java
+++ b/src/com/android/server/telecom/CallRecordingTonePlayer.java
@@ -17,12 +17,14 @@
package com.android.server.telecom;
import android.content.Context;
+import android.media.AudioAttributes;
import android.media.AudioDeviceInfo;
import android.media.AudioManager;
import android.media.AudioRecordingConfiguration;
import android.media.MediaPlayer;
import android.os.Handler;
import android.os.Looper;
+import android.provider.MediaStore;
import android.telecom.Log;
import com.android.internal.annotations.VisibleForTesting;
@@ -243,6 +245,9 @@
mRecordingTonePlayer.setLooping(true);
mRecordingTonePlayer.setPreferredDevice(telephonyDevice);
mRecordingTonePlayer.setVolume(0.1f);
+ AudioAttributes audioAttributes = new AudioAttributes.Builder()
+ .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION).build();
+ mRecordingTonePlayer.setAudioAttributes(audioAttributes);
mRecordingTonePlayer.start();
} else {
Log.w(this ,"startCallRecordingTone: can't find telephony audio device.");
diff --git a/src/com/android/server/telecom/PhoneStateBroadcaster.java b/src/com/android/server/telecom/PhoneStateBroadcaster.java
index a5e3848..533c81c 100644
--- a/src/com/android/server/telecom/PhoneStateBroadcaster.java
+++ b/src/com/android/server/telecom/PhoneStateBroadcaster.java
@@ -114,7 +114,7 @@
try {
if (mRegistry != null) {
- mRegistry.notifyCallState(phoneState, callHandle);
+ mRegistry.notifyCallStateForAllSubs(phoneState, callHandle);
Log.i(this, "Broadcasted state change: %s", mCurrentState);
}
} catch (RemoteException e) {