Disable OneUI-only settings on other devices

This commit is contained in:
ajp_anton
2026-08-31 02:39:02 +00:00
parent dc2d50868f
commit eafc544da8
5 changed files with 92 additions and 31 deletions
@@ -45,6 +45,11 @@ class MiscellaneousFragment : Fragment(R.layout.fragment_miscellaneous) {
bind(binding!!.showAodBatteryPercent, settings.showAodBatteryPercentWhenUnplugged) { current, checked ->
current.copy(showAodBatteryPercentWhenUnplugged = checked)
}
if (!DeviceCapabilities.isOneUi) {
binding!!.oneUiOnlyNotice.visibility = View.VISIBLE
binding!!.oneUiMiscControls.alpha = DISABLED_CONTROL_ALPHA
binding!!.oneUiMiscControls.disableRecursively()
}
binding!!.debugMinus10.setOnClickListener { changeDebugCount(-10) }
binding!!.debugMinus1.setOnClickListener { changeDebugCount(-1) }
binding!!.debugPlus1.setOnClickListener { changeDebugCount(1) }
@@ -106,4 +111,5 @@ class MiscellaneousFragment : Fragment(R.layout.fragment_miscellaneous) {
binding?.debugCycle?.isChecked = DebugNotifications.isCycling(context)
updatingCycle = false
}
}