Encrypted File Systems. Recovery changes for framework.
Modifications to allow for new call to recovery to toggle EFS settings.
This commit is contained in:
@@ -66,6 +66,23 @@ public final class FallbackCheckinService extends ICheckinService.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
public void masterClearAndToggleEFS(boolean efsEnabled) {
|
||||
if (mContext.checkCallingOrSelfPermission("android.permission.MASTER_CLEAR") !=
|
||||
PackageManager.PERMISSION_GRANTED) {
|
||||
Log.e(TAG, "Permission Denial: can't invoke masterClearAndToggleEFS from "
|
||||
+ "pid=" + Binder.getCallingPid() + ", "
|
||||
+ "uid=" + Binder.getCallingUid());
|
||||
return;
|
||||
}
|
||||
|
||||
// Save the android ID so the new system can get it erased.
|
||||
try {
|
||||
RecoverySystem.rebootAndToggleEFS(efsEnabled);
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Reboot for toggle EFS failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void getParentalControlState(IParentalControlCallback p, String requestingApp)
|
||||
throws android.os.RemoteException {
|
||||
ParentalControlState state = new ParentalControlState();
|
||||
|
||||
Reference in New Issue
Block a user