Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b4d5c22 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Always copy value from DeviceConfig."

parents 48518f43 8b499a06
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -802,10 +802,7 @@ class StorageManagerService extends IStorageManager.Stub
        // 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();
                });
        refreshIsolatedStorageSettings();
    }
@@ -840,6 +837,12 @@ class StorageManagerService extends IStorageManager.Stub
    }

    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(),
                Settings.Global.ISOLATED_STORAGE_LOCAL, 0);
        final int remote = Settings.Global.getInt(mContext.getContentResolver(),