merge in lmp-mr1-nova-release history after reset to lmp-mr1-dev
diff --git a/src/com/android/server/telecom/TelecomService.java b/src/com/android/server/telecom/TelecomService.java
index e914f32..0e0f0a1 100644
--- a/src/com/android/server/telecom/TelecomService.java
+++ b/src/com/android/server/telecom/TelecomService.java
@@ -657,16 +657,11 @@
public void addNewIncomingCall(PhoneAccountHandle phoneAccountHandle, Bundle extras) {
Log.i(this, "Adding new incoming call with phoneAccountHandle %s", phoneAccountHandle);
if (phoneAccountHandle != null && phoneAccountHandle.getComponentName() != null) {
- // TODO(sail): Add unit tests for adding incoming calls from a SIM call manager.
- if (isCallerSimCallManager() && TelephonyUtil.isPstnComponentName(
- phoneAccountHandle.getComponentName())) {
- Log.v(this, "Allowing call manager to add incoming call with PSTN handle");
- } else {
- mAppOpsManager.checkPackage(Binder.getCallingUid(),
- phoneAccountHandle.getComponentName().getPackageName());
- // Make sure it doesn't cross the UserHandle boundary
- enforceUserHandleMatchesCaller(phoneAccountHandle);
- }
+ mAppOpsManager.checkPackage(
+ Binder.getCallingUid(), phoneAccountHandle.getComponentName().getPackageName());
+
+ // Make sure it doesn't cross the UserHandle boundary
+ enforceUserHandleMatchesCaller(phoneAccountHandle);
Intent intent = new Intent(TelecomManager.ACTION_INCOMING_CALL);
intent.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle);
@@ -937,19 +932,6 @@
}
}
- private boolean isCallerSimCallManager() {
- PhoneAccountHandle accountHandle = mPhoneAccountRegistrar.getSimCallManager();
- if (accountHandle != null) {
- try {
- mAppOpsManager.checkPackage(
- Binder.getCallingUid(), accountHandle.getComponentName().getPackageName());
- return true;
- } catch (SecurityException e) {
- }
- }
- return false;
- }
-
private boolean isDefaultDialerCalling() {
ComponentName defaultDialerComponent = getDefaultPhoneAppInternal();
if (defaultDialerComponent != null) {