Encrypted File Systems. Recovery changes for framework.

Modifications to allow for new call to recovery to toggle EFS settings.
This commit is contained in:
Oscar Montemayor
2009-11-30 10:37:37 -08:00
parent 06253f58fb
commit 3baf1bf734
3 changed files with 35 additions and 0 deletions

View File

@@ -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();