Loading api/system-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -5667,6 +5667,11 @@ package android.provider { method public void onPropertyChanged(String, String, String); } public static interface DeviceConfig.Storage { field public static final String ISOLATED_STORAGE_ENABLED = "isolated_storage_enabled"; field public static final String NAMESPACE = "storage"; } public static interface DeviceConfig.Telephony { field public static final String NAMESPACE = "telephony"; field public static final String PROPERTY_ENABLE_RAMPING_RINGER = "enable_ramping_ringer"; Loading core/java/android/provider/DeviceConfig.java +17 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,23 @@ public final class DeviceConfig { String KEY_MAX_CACHED_PROCESSES = "max_cached_processes"; } /** * Namespace for storage-related features. * * @hide */ @SystemApi public interface Storage { String NAMESPACE = "storage"; /** * If {@code 1}, enables the isolated storage feature. If {@code -1}, * disables the isolated storage feature. If {@code 0}, uses the default * value from the build system. */ String ISOLATED_STORAGE_ENABLED = "isolated_storage_enabled"; } private static final Object sLock = new Object(); @GuardedBy("sLock") private static Map<OnPropertyChangedListener, Pair<String, Executor>> sListeners = Loading services/core/java/com/android/server/StorageManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ import android.os.storage.StorageManagerInternal; import android.os.storage.StorageVolume; import android.os.storage.VolumeInfo; import android.os.storage.VolumeRecord; import android.provider.DeviceConfig; import android.provider.MediaStore; import android.provider.Settings; import android.sysprop.VoldProperties; Loading Loading @@ -463,6 +464,7 @@ class StorageManagerService extends IStorageManager.Stub = { "password", "default", "pattern", "pin" }; private final Context mContext; private final ContentResolver mResolver; private volatile IVold mVold; private volatile IStoraged mStoraged; Loading Loading @@ -797,6 +799,14 @@ class StorageManagerService extends IStorageManager.Stub refreshIsolatedStorageSettings(); } }); // For now, simply clone property when it changes DeviceConfig.addOnPropertyChangedListener(DeviceConfig.Storage.NAMESPACE, mContext.getMainExecutor(), (namespace, name, value) -> { if (DeviceConfig.Storage.ISOLATED_STORAGE_ENABLED.equals(name)) { Settings.Global.putString(mResolver, Settings.Global.ISOLATED_STORAGE_REMOTE, value); } }); refreshIsolatedStorageSettings(); } Loading Loading @@ -1523,6 +1533,8 @@ class StorageManagerService extends IStorageManager.Stub SystemProperties.getBoolean(StorageManager.PROP_ISOLATED_STORAGE, false))); mContext = context; mResolver = mContext.getContentResolver(); mCallbacks = new Callbacks(FgThread.get().getLooper()); mLockPatternUtils = new LockPatternUtils(mContext); Loading Loading
api/system-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -5667,6 +5667,11 @@ package android.provider { method public void onPropertyChanged(String, String, String); } public static interface DeviceConfig.Storage { field public static final String ISOLATED_STORAGE_ENABLED = "isolated_storage_enabled"; field public static final String NAMESPACE = "storage"; } public static interface DeviceConfig.Telephony { field public static final String NAMESPACE = "telephony"; field public static final String PROPERTY_ENABLE_RAMPING_RINGER = "enable_ramping_ringer"; Loading
core/java/android/provider/DeviceConfig.java +17 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,23 @@ public final class DeviceConfig { String KEY_MAX_CACHED_PROCESSES = "max_cached_processes"; } /** * Namespace for storage-related features. * * @hide */ @SystemApi public interface Storage { String NAMESPACE = "storage"; /** * If {@code 1}, enables the isolated storage feature. If {@code -1}, * disables the isolated storage feature. If {@code 0}, uses the default * value from the build system. */ String ISOLATED_STORAGE_ENABLED = "isolated_storage_enabled"; } private static final Object sLock = new Object(); @GuardedBy("sLock") private static Map<OnPropertyChangedListener, Pair<String, Executor>> sListeners = Loading
services/core/java/com/android/server/StorageManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ import android.os.storage.StorageManagerInternal; import android.os.storage.StorageVolume; import android.os.storage.VolumeInfo; import android.os.storage.VolumeRecord; import android.provider.DeviceConfig; import android.provider.MediaStore; import android.provider.Settings; import android.sysprop.VoldProperties; Loading Loading @@ -463,6 +464,7 @@ class StorageManagerService extends IStorageManager.Stub = { "password", "default", "pattern", "pin" }; private final Context mContext; private final ContentResolver mResolver; private volatile IVold mVold; private volatile IStoraged mStoraged; Loading Loading @@ -797,6 +799,14 @@ class StorageManagerService extends IStorageManager.Stub refreshIsolatedStorageSettings(); } }); // For now, simply clone property when it changes DeviceConfig.addOnPropertyChangedListener(DeviceConfig.Storage.NAMESPACE, mContext.getMainExecutor(), (namespace, name, value) -> { if (DeviceConfig.Storage.ISOLATED_STORAGE_ENABLED.equals(name)) { Settings.Global.putString(mResolver, Settings.Global.ISOLATED_STORAGE_REMOTE, value); } }); refreshIsolatedStorageSettings(); } Loading Loading @@ -1523,6 +1533,8 @@ class StorageManagerService extends IStorageManager.Stub SystemProperties.getBoolean(StorageManager.PROP_ISOLATED_STORAGE, false))); mContext = context; mResolver = mContext.getContentResolver(); mCallbacks = new Callbacks(FgThread.get().getLooper()); mLockPatternUtils = new LockPatternUtils(mContext); Loading