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

Commit 24e028e0 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Defend against NPE.

During SystemUI startup, populating accessibility for other
views can race with attaching SignalClusterView to its parent.

Bug: 9999664
Change-Id: Iba34a3edba403ae65ff3c37b953d0736068a67b9
parent 9955699d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -135,9 +135,9 @@ public class SignalClusterView
    public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
        // Standard group layout onPopulateAccessibilityEvent() implementations
        // ignore content description, so populate manually
        if (mWifiVisible && mWifiGroup.getContentDescription() != null)
        if (mWifiVisible && mWifiGroup != null && mWifiGroup.getContentDescription() != null)
            event.getText().add(mWifiGroup.getContentDescription());
        if (mMobileVisible && mMobileGroup.getContentDescription() != null)
        if (mMobileVisible && mMobileGroup != null && mMobileGroup.getContentDescription() != null)
            event.getText().add(mMobileGroup.getContentDescription());
        return super.dispatchPopulateAccessibilityEvent(event);
    }