Unrestrict SMS/PHONE app if it been set active
If an app been set default SMS/PHONE app, we need to unrestrict this app. This CL extract a common function and invoke it when necessary. Change-Id: Id29c5138438aa6f6f22cdd9c4ecf336de8481782 Fixes: 80305978 Test: robotests
This commit is contained in:
@@ -455,10 +455,7 @@ public class DeviceAdminAdd extends Activity {
|
||||
void unrestrictAppIfPossible(BatteryUtils batteryUtils) {
|
||||
// Unrestrict admin app if it is already been restricted
|
||||
final String packageName = mDeviceAdmin.getComponent().getPackageName();
|
||||
final int uid = batteryUtils.getPackageUid(packageName);
|
||||
if (batteryUtils.isForceAppStandbyEnabled(uid, packageName)) {
|
||||
batteryUtils.setForceAppStandby(uid, packageName, AppOpsManager.MODE_ALLOWED);
|
||||
}
|
||||
batteryUtils.clearForceAppStandby(packageName);
|
||||
}
|
||||
|
||||
void continueRemoveAction(CharSequence msg) {
|
||||
|
Reference in New Issue
Block a user