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

Commit c07fcd57 authored by Yifei Zhang's avatar Yifei Zhang
Browse files

talkback: add null check to ComponentName

- Reintroduce null check from ag/25620669

Test: build
Fix: 323297932
Change-Id: Idef0b0afd593fae4d2604e7f561ef41a51d7f517
parent 6ce5f201
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ class TalkbackShortcutController {
        final Set<ComponentName> enabledServices =
                AccessibilityUtils.getEnabledServicesFromSettings(mContext, userId);
        ComponentName componentName = getTalkbackComponent();
        if (componentName == null) {
            return false;
        }

        boolean isTalkbackAlreadyEnabled = enabledServices.contains(componentName);

        if (isTalkBackShortcutGestureEnabled()) {
@@ -67,7 +71,7 @@ class TalkbackShortcutController {
                    isTalkbackAlreadyEnabled);

            // log stem triple press telemetry if it's a talkback enabled event.
            if (componentName != null && isTalkbackAlreadyEnabled) {
            if (isTalkbackAlreadyEnabled) {
                logStemTriplePressAccessibilityTelemetry(componentName);
            }
        }