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

Commit f9373139 authored by Mindy Pereira's avatar Mindy Pereira
Browse files

Perform null check on empty view before doing accessibility check.

Fixes b/6341858 AdapterView does not properly check for null before checking empty view accessibility info

Change-Id: Ia19fdef2c7c5f3e6c3053ebc754efe6a664f9d66
parent 32f038de
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -650,7 +650,8 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
        mEmptyView = emptyView;

        // If not explicitly specified this view is important for accessibility.
        if (emptyView.getImportantForAccessibility() == IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
        if (emptyView != null
                && emptyView.getImportantForAccessibility() == IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
            emptyView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
        }