Loading services/core/java/com/android/server/StorageManagerService.java +7 −4 Original line number Original line Diff line number Diff line Loading @@ -802,10 +802,7 @@ class StorageManagerService extends IStorageManager.Stub // For now, simply clone property when it changes // For now, simply clone property when it changes DeviceConfig.addOnPropertyChangedListener(DeviceConfig.Storage.NAMESPACE, DeviceConfig.addOnPropertyChangedListener(DeviceConfig.Storage.NAMESPACE, mContext.getMainExecutor(), (namespace, name, value) -> { mContext.getMainExecutor(), (namespace, name, value) -> { if (DeviceConfig.Storage.ISOLATED_STORAGE_ENABLED.equals(name)) { refreshIsolatedStorageSettings(); Settings.Global.putString(mResolver, Settings.Global.ISOLATED_STORAGE_REMOTE, value); } }); }); refreshIsolatedStorageSettings(); refreshIsolatedStorageSettings(); } } Loading Loading @@ -840,6 +837,12 @@ class StorageManagerService extends IStorageManager.Stub } } private void refreshIsolatedStorageSettings() { private void refreshIsolatedStorageSettings() { // Always copy value from newer DeviceConfig location Settings.Global.putString(mResolver, Settings.Global.ISOLATED_STORAGE_REMOTE, DeviceConfig.getProperty(DeviceConfig.Storage.NAMESPACE, DeviceConfig.Storage.ISOLATED_STORAGE_ENABLED)); final int local = Settings.Global.getInt(mContext.getContentResolver(), final int local = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ISOLATED_STORAGE_LOCAL, 0); Settings.Global.ISOLATED_STORAGE_LOCAL, 0); final int remote = Settings.Global.getInt(mContext.getContentResolver(), final int remote = Settings.Global.getInt(mContext.getContentResolver(), Loading Loading
services/core/java/com/android/server/StorageManagerService.java +7 −4 Original line number Original line Diff line number Diff line Loading @@ -802,10 +802,7 @@ class StorageManagerService extends IStorageManager.Stub // For now, simply clone property when it changes // For now, simply clone property when it changes DeviceConfig.addOnPropertyChangedListener(DeviceConfig.Storage.NAMESPACE, DeviceConfig.addOnPropertyChangedListener(DeviceConfig.Storage.NAMESPACE, mContext.getMainExecutor(), (namespace, name, value) -> { mContext.getMainExecutor(), (namespace, name, value) -> { if (DeviceConfig.Storage.ISOLATED_STORAGE_ENABLED.equals(name)) { refreshIsolatedStorageSettings(); Settings.Global.putString(mResolver, Settings.Global.ISOLATED_STORAGE_REMOTE, value); } }); }); refreshIsolatedStorageSettings(); refreshIsolatedStorageSettings(); } } Loading Loading @@ -840,6 +837,12 @@ class StorageManagerService extends IStorageManager.Stub } } private void refreshIsolatedStorageSettings() { private void refreshIsolatedStorageSettings() { // Always copy value from newer DeviceConfig location Settings.Global.putString(mResolver, Settings.Global.ISOLATED_STORAGE_REMOTE, DeviceConfig.getProperty(DeviceConfig.Storage.NAMESPACE, DeviceConfig.Storage.ISOLATED_STORAGE_ENABLED)); final int local = Settings.Global.getInt(mContext.getContentResolver(), final int local = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ISOLATED_STORAGE_LOCAL, 0); Settings.Global.ISOLATED_STORAGE_LOCAL, 0); final int remote = Settings.Global.getInt(mContext.getContentResolver(), final int remote = Settings.Global.getInt(mContext.getContentResolver(), Loading