Merge "Ensure ConnectionService death triggers disconnect tone."
diff --git a/src/com/android/server/telecom/PhoneStateBroadcaster.java b/src/com/android/server/telecom/PhoneStateBroadcaster.java
index a44fc03..d574589 100644
--- a/src/com/android/server/telecom/PhoneStateBroadcaster.java
+++ b/src/com/android/server/telecom/PhoneStateBroadcaster.java
@@ -106,7 +106,9 @@
mCurrentState = phoneState;
String callHandle = null;
- if (call.getHandle() != null) {
+ // Only report phone numbers in phone state broadcast for regular mobile calls; do not
+ // include numbers from 3rd party apps.
+ if (!call.isSelfManaged() && call.getHandle() != null) {
callHandle = call.getHandle().getSchemeSpecificPart();
}
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index 478d7e1..aa4c98d 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -771,7 +771,9 @@
try {
Log.startSession("TSI.eC");
synchronized (mLock) {
- enforceModifyPermission();
+ if (!enforceAnswerCallPermission(callingPackage, Binder.getCallingUid())) {
+ throw new SecurityException("requires ANSWER_PHONE_CALLS permission");
+ }
long token = Binder.clearCallingIdentity();
try {