summaryrefslogtreecommitdiff
path: root/apex
diff options
context:
space:
mode:
author Riya Ghai <riyaghai@google.com> 2025-02-20 23:09:06 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-20 23:09:06 -0800
commitf24cf99630210e05d6b3832708b933addfb9a420 (patch)
tree934112fa593c1153a6efb302a0dec37187939d4b /apex
parent804ffda5c53b853ef6b1d7297f8d4a0bf5354458 (diff)
Revert "[MediaProvider] Exclude unreliable storage from"
This reverts commit 804ffda5c53b853ef6b1d7297f8d4a0bf5354458. Reason for revert: gantry rollout caused breakages Change-Id: I8e118197c0dd8d3280d0af6500607d481979d7f5
Diffstat (limited to 'apex')
-rw-r--r--apex/framework/java/android/provider/MediaStore.java26
1 files changed, 1 insertions, 25 deletions
diff --git a/apex/framework/java/android/provider/MediaStore.java b/apex/framework/java/android/provider/MediaStore.java
index b528bf649..c9ee81196 100644
--- a/apex/framework/java/android/provider/MediaStore.java
+++ b/apex/framework/java/android/provider/MediaStore.java
@@ -32,7 +32,6 @@ import android.annotation.WorkerThread;
import android.app.Activity;
import android.app.AppOpsManager;
import android.app.PendingIntent;
-import android.app.compat.CompatChanges;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.ContentProvider;
@@ -62,7 +61,6 @@ import android.os.Bundle;
import android.os.CancellationSignal;
import android.os.Environment;
import android.os.OperationCanceledException;
-import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
import android.os.RemoteException;
@@ -665,11 +663,6 @@ public final class MediaStore {
public static final String INTENT_ACTION_VIDEO_CAMERA = "android.media.action.VIDEO_CAMERA";
/**
- * This is a copy of the flag that exists in MediaProvider.
- */
- static final long EXCLUDE_UNRELIABLE_STORAGE_VOLUMES = 391360514L;
-
- /**
* Standard Intent action that can be sent to have the camera application
* capture an image and return it.
* <p>
@@ -4741,15 +4734,7 @@ public final class MediaStore {
case Environment.MEDIA_MOUNTED_READ_ONLY: {
final String volumeName = sv.getMediaStoreVolumeName();
if (volumeName != null) {
- File directory = sv.getDirectory();
- if (shouldExcludeUnReliableStorageVolumes(context)
- && directory != null
- && directory.getAbsolutePath() != null
- && directory.getAbsolutePath().startsWith("/mnt/")) {
- Log.d(TAG, "skipping unreliable volume : " + volumeName);
- } else {
- res.add(volumeName);
- }
+ res.add(volumeName);
}
break;
}
@@ -4759,15 +4744,6 @@ public final class MediaStore {
}
/**
- * Checks if the EXCLUDE_UNRELIABLE_STORAGE_VOLUMES appcompat flag is enabled.
- */
- private static boolean shouldExcludeUnReliableStorageVolumes(Context context) {
- return Flags.excludeUnreliableVolumes()
- && CompatChanges.isChangeEnabled(
- EXCLUDE_UNRELIABLE_STORAGE_VOLUMES, context.getApplicationInfo().uid);
- }
-
- /**
* Works exactly the same as
* {@link ContentResolver#openFileDescriptor(Uri, String, CancellationSignal)}, but only works
* for {@link Uri} whose scheme is {@link ContentResolver#SCHEME_CONTENT} and its authority is