summaryrefslogtreecommitdiffstats
path: root/src/com/android/server/telecom/TelecomServiceImpl.java
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-03-10 20:30:27 -0800
committerSteve Kondik <steve@cyngn.com>2016-03-11 16:59:57 -0800
commit8c2bde132495c7556c20e55c7629511ba49943b1 (patch)
treedd795cbe0d9b13ecd2ae44228e6d04fe101fcdde /src/com/android/server/telecom/TelecomServiceImpl.java
parent81999fd5012a33fd2e0c91ade9e3be63cdc8de7f (diff)
parent818a79f375031dc57c3ba12a363da08c9a1d82f1 (diff)
downloadandroid_packages_services_Telecomm-8c2bde132495c7556c20e55c7629511ba49943b1.tar.gz
android_packages_services_Telecomm-8c2bde132495c7556c20e55c7629511ba49943b1.tar.bz2
android_packages_services_Telecomm-8c2bde132495c7556c20e55c7629511ba49943b1.zip
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/packages/services/Telecomm into cm-13.0staging/cm-13.0+r22
Android 6.0.1 release 22 Change-Id: I371815d38796af318dcea1e7c6cfb902a1bd0c04
Diffstat (limited to 'src/com/android/server/telecom/TelecomServiceImpl.java')
-rw-r--r--src/com/android/server/telecom/TelecomServiceImpl.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index 178a4ab1..8948fa85 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -320,7 +320,7 @@ public class TelecomServiceImpl {
Intent intent = new Intent(TelecomManager.ACTION_PHONE_ACCOUNT_REGISTERED);
intent.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE,
account.getAccountHandle());
- Log.i(this, "Sending phone-account intent as user");
+ Log.i(this, "Sending phone-account registered intent as user");
mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
PERMISSION_PROCESS_PHONE_ACCOUNT_REGISTRATION);
} finally {
@@ -341,6 +341,19 @@ public class TelecomServiceImpl {
accountHandle.getComponentName().getPackageName());
enforceUserHandleMatchesCaller(accountHandle);
mPhoneAccountRegistrar.unregisterPhoneAccount(accountHandle);
+
+ // Broadcast an intent indicating the phone account which was unregistered.
+ long token = Binder.clearCallingIdentity();
+ try {
+ Intent intent =
+ new Intent(TelecomManager.ACTION_PHONE_ACCOUNT_UNREGISTERED);
+ intent.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, accountHandle);
+ Log.i(this, "Sending phone-account unregistered intent as user");
+ mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
+ PERMISSION_PROCESS_PHONE_ACCOUNT_REGISTRATION);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
} catch (Exception e) {
Log.e(this, e, "unregisterPhoneAccount %s", accountHandle);
throw e;