Skip to content
Snippets Groups Projects
Unverified Commit 900f9d87 authored by Lukas Lechner's avatar Lukas Lechner Committed by GitHub
Browse files

Fix issue of Exposure Logging not possible to activate or deactivate via TalkBack (#2211)

parent 06afe257
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,8 @@ class SettingsTracingFragment : Fragment(R.layout.fragment_settings_tracing), Au
TracingSettingsState.LocationDisabled -> setOnClickListener(null)
TracingSettingsState.TracingInactive,
TracingSettingsState.TracingActive -> setOnClickListener {
binding.settingsTracingSwitchRow.settingsSwitchRowSwitch.performClick()
val switch = binding.settingsTracingSwitchRow.settingsSwitchRowSwitch
onTracingToggled(!switch.isChecked)
}
}
}
......@@ -92,13 +93,12 @@ class SettingsTracingFragment : Fragment(R.layout.fragment_settings_tracing), Au
val bluetooth = binding.settingsTracingStatusBluetooth.tracingStatusCardButton
val location = binding.settingsTracingStatusLocation.tracingStatusCardButton
val interoperability = binding.settingsInteroperabilityRow.settingsPlainRow
val row = binding.settingsTracingSwitchRow.settingsSwitchRow
switch.setOnCheckedChangeListener { _, isChecked ->
if (switch.isPressed || row.isPressed) {
onTracingToggled(isChecked)
}
switch.setOnCheckedChangeListener { view, isChecked ->
if (!view.isPressed) return@setOnCheckedChangeListener
onTracingToggled(isChecked)
}
back.setOnClickListener {
(activity as MainActivity).goBack()
}
......@@ -114,9 +114,6 @@ class SettingsTracingFragment : Fragment(R.layout.fragment_settings_tracing), Au
}
private fun onTracingToggled(isChecked: Boolean) {
// Focus on the body text after to announce the tracing status for accessibility reasons
binding.settingsTracingSwitchRow.settingsSwitchRowHeaderBody
.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED)
vm.onTracingToggled(isChecked)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment