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

Commit 3a40af14 authored by Matthew DeVore's avatar Matthew DeVore Committed by Android (Google) Code Review
Browse files

Merge "Use correct Settings API to set mirror/extend" into main

parents 271fb3ea dac774ed
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)
    }