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

Commit 565b1f03 authored by Jason Hsu's avatar Jason Hsu Committed by Android (Google) Code Review
Browse files

Merge "Accessibility shortcut secondary action - correct invisible type fragment checkbox logic"

parents 69a7e054 46050053
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -45,13 +45,16 @@ public class InvisibleToggleAccessibilityServicePreferenceFragment extends
    /**
     * {@inheritDoc}
     *
     * Enables accessibility service only when user had allowed permission.
     * Enables accessibility service only when user had allowed permission. Disables
     * accessibility service when shortcutPreference is unchecked.
     */
    @Override
    public void onCheckboxClicked(ShortcutPreference preference) {
        super.onCheckboxClicked(preference);
        AccessibilityUtils.setAccessibilityServiceState(getContext(), mComponentName,
                getArguments().getBoolean(AccessibilitySettings.EXTRA_CHECKED));
        boolean enabled = getArguments().getBoolean(AccessibilitySettings.EXTRA_CHECKED)
                && preference.getChecked();

        AccessibilityUtils.setAccessibilityServiceState(getContext(), mComponentName, enabled);
    }

    /**