summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorZim <zezeozue@google.com>2020-11-25 09:58:41 +0000
committerZim <zezeozue@google.com>2020-11-27 09:45:50 +0000
commit7ac598f2adf1507901ef2a5f540ac3868ea9e6f6 (patch)
treeb8c69906ee81968cb61c17e6f02a2f9e196e8288 /core/java
parente03063e1be5a4ebe99a2ab2e2c3e3f0fe715f044 (diff)
Remove dead isolated storage code from StorageManagerService
Isolated storage was added in Q (and enabled by default) and has been replaced by FUSE in R Additionally, we can remove the ExternalStorageMountPolicy concept which is only required if isolated storage is false Cleanup in preparation to introduce DeviceConfig changes for transcoding Bug: 169327180 Test: Builds Change-Id: Ie2686d8efa6654ea6c4b4ca8c121c0c1841a6356
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/ContentResolver.java3
-rw-r--r--core/java/android/os/storage/StorageManager.java15
-rw-r--r--core/java/android/os/storage/StorageManagerInternal.java44
-rw-r--r--core/java/android/provider/Settings.java5
4 files changed, 4 insertions, 63 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index e35fb037582a..d7dc86a5c59f 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -63,7 +63,6 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
-import android.os.storage.StorageManager;
import android.system.Int32Ref;
import android.text.TextUtils;
import android.util.EventLog;
@@ -110,7 +109,7 @@ public abstract class ContentResolver implements ContentInterface {
*
* @hide
*/
- public static final boolean DEPRECATE_DATA_COLUMNS = StorageManager.hasIsolatedStorage();
+ public static final boolean DEPRECATE_DATA_COLUMNS = true;
/**
* Special filesystem path prefix which indicates that a path should be
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index cfc3e01c23c5..870d224f2ff7 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -156,10 +156,6 @@ public class StorageManager {
/** {@hide} */
public static final String PROP_VIRTUAL_DISK = "persist.sys.virtual_disk";
/** {@hide} */
- public static final String PROP_ISOLATED_STORAGE = "persist.sys.isolated_storage";
- /** {@hide} */
- public static final String PROP_ISOLATED_STORAGE_SNAPSHOT = "sys.isolated_storage_snapshot";
- /** {@hide} */
public static final String PROP_FORCED_SCOPED_STORAGE_WHITELIST =
"forced_scoped_storage_whitelist";
@@ -263,10 +259,6 @@ public class StorageManager {
public static final int DEBUG_SDCARDFS_FORCE_OFF = 1 << 4;
/** {@hide} */
public static final int DEBUG_VIRTUAL_DISK = 1 << 5;
- /** {@hide} */
- public static final int DEBUG_ISOLATED_STORAGE_FORCE_ON = 1 << 6;
- /** {@hide} */
- public static final int DEBUG_ISOLATED_STORAGE_FORCE_OFF = 1 << 7;
/** {@hide} */
public static final int FLAG_STORAGE_DE = IInstalld.FLAG_STORAGE_DE;
@@ -1695,16 +1687,13 @@ public class StorageManager {
/**
* Return if the currently booted device has the "isolated storage" feature
- * flag enabled. This will eventually be fully enabled in the final
- * {@link android.os.Build.VERSION_CODES#Q} release.
+ * flag enabled.
*
* @hide
*/
@SystemApi
public static boolean hasIsolatedStorage() {
- // Prefer to use snapshot for current boot when available
- return SystemProperties.getBoolean(PROP_ISOLATED_STORAGE_SNAPSHOT,
- SystemProperties.getBoolean(PROP_ISOLATED_STORAGE, true));
+ return false;
}
/**
diff --git a/core/java/android/os/storage/StorageManagerInternal.java b/core/java/android/os/storage/StorageManagerInternal.java
index 4379ce1055ef..55ba15a5e57b 100644
--- a/core/java/android/os/storage/StorageManagerInternal.java
+++ b/core/java/android/os/storage/StorageManagerInternal.java
@@ -28,50 +28,8 @@ import java.util.Set;
* @hide Only for use within the system server.
*/
public abstract class StorageManagerInternal {
-
- /**
- * Policy that influences how external storage is mounted and reported.
- */
- public interface ExternalStorageMountPolicy {
- /**
- * Gets the external storage mount mode for the given uid.
- *
- * @param uid The UID for which to determine mount mode.
- * @param packageName The package in the UID for making the call.
- * @return The mount mode.
- *
- * @see com.android.internal.os.Zygote#MOUNT_EXTERNAL_NONE
- * @see com.android.internal.os.Zygote#MOUNT_EXTERNAL_DEFAULT
- * @see com.android.internal.os.Zygote#MOUNT_EXTERNAL_READ
- * @see com.android.internal.os.Zygote#MOUNT_EXTERNAL_WRITE
- */
- public int getMountMode(int uid, String packageName);
-
- /**
- * Gets whether external storage should be reported to the given UID.
- *
- * @param uid The UID for which to determine whether it has external storage.
- * @param packageName The package in the UID for making the call.
- * @return Weather to report external storage.
- * @return True to report the state of external storage, false to
- * report it as unmounted.
- */
- public boolean hasExternalStorage(int uid, String packageName);
- }
-
- /**
- * Adds a policy for determining how external storage is mounted and reported.
- * The mount mode is the most conservative result from querying all registered
- * policies. Similarly, the reported state is the most conservative result from
- * querying all registered policies.
- *
- * @param policy The policy to add.
- */
- public abstract void addExternalStoragePolicy(ExternalStorageMountPolicy policy);
-
/**
- * Gets the mount mode to use for a given UID as determined by consultin all
- * policies.
+ * Gets the mount mode to use for a given UID
*
* @param uid The UID for which to get mount mode.
* @param packageName The package in the UID for making the call.
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 884f8ccd5e54..919c48a3e283 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -13415,11 +13415,6 @@ public final class Settings {
public static final String MAX_SOUND_TRIGGER_DETECTION_SERVICE_OPS_PER_DAY =
"max_sound_trigger_detection_service_ops_per_day";
- /** {@hide} */
- public static final String ISOLATED_STORAGE_LOCAL = "isolated_storage_local";
- /** {@hide} */
- public static final String ISOLATED_STORAGE_REMOTE = "isolated_storage_remote";
-
/**
* Indicates whether aware is available in the current location.
* @hide