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

This commit is contained in:
Paul Lawrence
2016-05-04 22:46:08 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 1 deletions

View File

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

View File

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