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
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user