Merge "Revert "Don\'t enforce this API - it\'s not sensitive"" into nyc-dev

am: fc0810b4d4

* commit 'fc0810b4d47b3cd679c5c761eb225be3d1351060':
  Revert "Don't enforce this API - it's not sensitive"

Change-Id: I3eca6ba296d29a3bf2e1e5c18e51978199cb5fcd
This commit is contained in:
Paul Lawrence
2016-05-04 22:52:48 +00:00
committed by android-build-merger
2 changed files with 9 additions and 1 deletions

View File

@@ -2648,6 +2648,9 @@ class MountService extends IMountService.Stub
*/
@Override
public int getPasswordType() {
mContext.enforceCallingOrSelfPermission(Manifest.permission.STORAGE_INTERNAL,
"no permission to access the crypt keeper");
waitForReady();
final NativeDaemonEvent event;

View File

@@ -1395,7 +1395,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
boolean storageManagerIsNonDefaultBlockEncrypted() {
return StorageManager.isNonDefaultBlockEncrypted();
long identity = Binder.clearCallingIdentity();
try {
return StorageManager.isNonDefaultBlockEncrypted();
} finally {
Binder.restoreCallingIdentity(identity);
}
}
boolean storageManagerIsEncrypted() {