diff options
author | Anthony Lee <anthonylee@google.com> | 2014-10-27 11:28:40 -0700 |
---|---|---|
committer | Anthony Lee <anthonylee@google.com> | 2014-10-28 22:39:58 -0700 |
commit | 6727926a9617cb715ee4fa407f547e67a6f7e134 (patch) | |
tree | 3c3a99b921a2d1a001c3e33885d926e68fb38e55 /telecomm | |
parent | def4cd4fa4aa035a5000e6b196130496430d65ff (diff) | |
download | frameworks_base-6727926a9617cb715ee4fa407f547e67a6f7e134.zip frameworks_base-6727926a9617cb715ee4fa407f547e67a6f7e134.tar.gz frameworks_base-6727926a9617cb715ee4fa407f547e67a6f7e134.tar.bz2 |
Added a function to clear accounts for a specified package.
Right now, clearAcounts() only clears the accounts
for the calling package. This new function will allow a class like
PhoneAccoutBroadcastReceiver to clear accounts for any package.
Bug: 17689845
Change-Id: I24db104268535e7e0e33e093e8fab63765df0b08
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 13c9ea2..bc51a70 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -21,6 +21,7 @@ import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; import android.telephony.TelephonyManager; +import android.text.TextUtils; import android.util.Log; import com.android.internal.telecom.ITelecomService; @@ -625,6 +626,20 @@ public class TelecomManager { } /** + * Remove all Accounts that belong to the specified package from the system. + * @hide + */ + public void clearAccountsForPackage(String packageName) { + try { + if (isServiceConnected() && !TextUtils.isEmpty(packageName)) { + getTelecomService().clearAccounts(packageName); + } + } catch (RemoteException e) { + Log.e(TAG, "Error calling ITelecomService#clearAccountsForPackage()", e); + } + } + + /** * @hide */ @SystemApi |