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

Commit 055e70f6 authored by Roman Birg's avatar Roman Birg Committed by Gerrit Code Review
Browse files

Settings: fix up advanced mode logic



The overlay config value should be a 'always-on' switch, otherwise
we should read the user-set setting.

Advanced mode should always be off by default.

Ref: CYNGNOS-815

Change-Id: I7f66eaf7fc84e9d3842e4ae874ffba2050b89ea6
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 4289d167
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1472,9 +1472,12 @@ public class SettingsActivity extends Activity
     * by default in an overlay.
     */
    public static boolean showAdvancedPreferences(Context context) {
        return (android.provider.Settings.Secure.getInt(context.getContentResolver(),
                android.provider.Settings.Secure.ADVANCED_MODE, 1) == 1)
                && context.getResources().getBoolean(
        final boolean forceAdvancedMode = context.getResources().getBoolean(
                com.android.internal.R.bool.config_advancedSettingsMode);
        if (forceAdvancedMode) {
            return true;
        }
        return (android.provider.Settings.Secure.getInt(context.getContentResolver(),
                android.provider.Settings.Secure.ADVANCED_MODE, 0) == 1);
    }
}