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

Commit ac83c988 authored by Garfield Tan's avatar Garfield Tan
Browse files

Follow-up changes to ag/2478826.

Test: It builds.
Bug: 62773467
Change-Id: Id1742e162af37aaeba0a28009ea41bb936f9bc34
parent 7d086bbc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,6 +52,6 @@
    <bool name="feature_debug_mode">false</bool>

    <!-- Indicates if internal storage is shown as default or not. -->
    <bool name="config_defaultIncludeDeviceRoot">false</bool>
    <bool name="config_default_show_device_root">false</bool>

</resources>
+6 −6
Original line number Diff line number Diff line
@@ -47,23 +47,23 @@ public interface ScopedPreferences {

    static final class RuntimeScopedPreferences implements ScopedPreferences {

        private boolean defaultIncludeDeviceRoot;
        private SharedPreferences mSharedPrefs;
        private String mScope;
        private final SharedPreferences mSharedPrefs;
        private final String mScope;
        private final boolean mDefaultShowDeviceRoot;

        private RuntimeScopedPreferences(Context context, SharedPreferences sharedPrefs,
                String scope)  {
            assert(!TextUtils.isEmpty(scope));

            defaultIncludeDeviceRoot = context.getResources()
                .getBoolean(R.bool.config_defaultIncludeDeviceRoot);
            mSharedPrefs = sharedPrefs;
            mScope = scope;
            mDefaultShowDeviceRoot = context.getResources()
                    .getBoolean(R.bool.config_default_show_device_root);
        }

        @Override
        public boolean getShowDeviceRoot() {
            return mSharedPrefs.getBoolean(INCLUDE_DEVICE_ROOT, defaultIncludeDeviceRoot);
            return mSharedPrefs.getBoolean(INCLUDE_DEVICE_ROOT, mDefaultShowDeviceRoot);
        }

        @Override