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

Commit f74a2575 authored by jeffreyhuang's avatar jeffreyhuang
Browse files

isAvailable is true by default in dev options

 - isAvailable() is defaulted to return true for all developer options
 preferences
 - child controllers should override for custom hiding logic

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I89921f801c25e74bf78d02c55b5f34cf1d464cd0
parent ae6c29d1
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -38,11 +38,6 @@ public class BluetoothAbsoluteVolumePreferenceController extends
        super(context);
    }

    @Override
    public boolean isAvailable() {
        return true;
    }

    @Override
    public String getPreferenceKey() {
        return BLUETOOTH_DISABLE_ABSOLUTE_VOLUME_KEY;
+0 −5
Original line number Diff line number Diff line
@@ -38,11 +38,6 @@ public class BluetoothDeviceNoNamePreferenceController extends
        super(context);
    }

    @Override
    public boolean isAvailable() {
        return true;
    }

    @Override
    public String getPreferenceKey() {
        return BLUETOOTH_SHOW_DEVICES_WITHOUT_NAMES_KEY;
+0 −5
Original line number Diff line number Diff line
@@ -37,11 +37,6 @@ public class BluetoothSnoopLogPreferenceController extends
        super(context);
    }

    @Override
    public boolean isAvailable() {
        return true;
    }

    @Override
    public String getPreferenceKey() {
        return PREFERENCE_KEY;
+0 −5
Original line number Diff line number Diff line
@@ -39,11 +39,6 @@ public class DebugViewAttributesPreferenceController extends
        super(context);
    }

    @Override
    public boolean isAvailable() {
        return true;
    }

    @Override
    public String getPreferenceKey() {
        return DEBUG_VIEW_ATTRIBUTES_KEY;
+10 −0
Original line number Diff line number Diff line
@@ -51,6 +51,16 @@ public abstract class DeveloperOptionsPreferenceController extends
        return false;
    }

    /**
     * Child classes should override this method to create custom logic for hiding preferences.
     *
     * @return true if the preference is to be displayed.
     */
    @Override
    public boolean isAvailable() {
        return true;
    }

    /**
     * Called when developer options is enabled
     */
Loading