Merge "Use new API for shouldBypass" into sc-dev
diff --git a/src/com/android/providers/media/LocalCallingIdentity.java b/src/com/android/providers/media/LocalCallingIdentity.java
index 868f34d..d19627c 100644
--- a/src/com/android/providers/media/LocalCallingIdentity.java
+++ b/src/com/android/providers/media/LocalCallingIdentity.java
@@ -420,9 +420,12 @@
ai = context.getPackageManager()
.getApplicationInfo(getPackageName(), 0);
if (ai != null) {
- Boolean shouldBypass = ai.hasRequestRawExternalStorageAccess();
- if (shouldBypass != null) {
- return shouldBypass;
+ final int requestRawExternalStorageValue
+ = ai.getRequestRawExternalStorageAccess();
+ if (requestRawExternalStorageValue
+ != ApplicationInfo.RAW_EXTERNAL_STORAGE_ACCESS_DEFAULT) {
+ return requestRawExternalStorageValue
+ == ApplicationInfo.RAW_EXTERNAL_STORAGE_ACCESS_REQUESTED;
}
// Manifest flag is not set, hence return default value based on the category of the
// app and targetSDK.