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

Commit dac774ed authored by Matthew DeVore's avatar Matthew DeVore
Browse files

Use correct Settings API to set mirror/extend

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Bug: b/366056921
Test: build and SQ
Change-Id: I93ed7159e5ea746fc2d5939fa07e6053803cfc95
parent 9707e403
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -38,13 +38,13 @@ class MirrorPreference(context: Context): SwitchPreferenceCompat(context) {

    override fun onAttached() {
        super.onAttached()
        setChecked(0 != Settings.Global.getInt(
        setChecked(0 != Settings.Secure.getInt(
                context.contentResolver, Settings.Secure.MIRROR_BUILT_IN_DISPLAY, 0))
    }

    override fun onClick() {
        super.onClick()
        Settings.Global.putInt(
        Settings.Secure.putInt(
                context.contentResolver, Settings.Secure.MIRROR_BUILT_IN_DISPLAY,
                if (isChecked()) 1 else 0)
    }