Merge "Need to clear identity when rebooting for FBE." into nyc-dev am: 8cac67b616

am: 22de5591a1

* commit '22de5591a13ed19e5a8fbb40c87fdc801a980187':
  Need to clear identity when rebooting for FBE.
This commit is contained in:
Jeff Sharkey
2016-03-01 00:17:01 +00:00
committed by android-build-merger

View File

@@ -1945,11 +1945,16 @@ class MountService extends IMountService.Stub
"Emulation not available on device with native FBE");
}
final boolean emulateFbe = (flags & StorageManager.DEBUG_EMULATE_FBE) != 0;
SystemProperties.set(StorageManager.PROP_EMULATE_FBE, Boolean.toString(emulateFbe));
final long token = Binder.clearCallingIdentity();
try {
final boolean emulateFbe = (flags & StorageManager.DEBUG_EMULATE_FBE) != 0;
SystemProperties.set(StorageManager.PROP_EMULATE_FBE, Boolean.toString(emulateFbe));
// Perform hard reboot to kick policy into place
mContext.getSystemService(PowerManager.class).reboot(null);
// Perform hard reboot to kick policy into place
mContext.getSystemService(PowerManager.class).reboot(null);
} finally {
Binder.restoreCallingIdentity(token);
}
}
if ((mask & StorageManager.DEBUG_FORCE_ADOPTABLE) != 0) {