am 6727926a: Added a function to clear accounts for a specified package.
* commit '6727926a9617cb715ee4fa407f547e67a6f7e134': Added a function to clear accounts for a specified package.
This commit is contained in:
@@ -21,6 +21,7 @@ import android.os.Bundle;
|
|||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.internal.telecom.ITelecomService;
|
import com.android.internal.telecom.ITelecomService;
|
||||||
@@ -624,6 +625,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
|
* @hide
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user