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

Commit a99414f5 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Nullcheck to fix Autofill CTS am: 6c68a692 am: 743abb93

Change-Id: Ia89ea1adb47be3b70f5db292677c4c19194a04db
parents 0cd0cef0 743abb93
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -738,12 +738,15 @@ public final class AccessibilityInteractionClient
        if (info != null) {
            info.setConnectionId(connectionId);
            // Empty array means any package name is Okay
            if (!ArrayUtils.isEmpty(packageNames)
                    && !ArrayUtils.contains(packageNames, info.getPackageName().toString())) {
            if (!ArrayUtils.isEmpty(packageNames)) {
                CharSequence packageName = info.getPackageName();
                if (packageName == null
                        || !ArrayUtils.contains(packageNames, packageName.toString())) {
                    // If the node package not one of the valid ones, pick the top one - this
                    // is one of the packages running in the introspected UID.
                    info.setPackageName(packageNames[0]);
                }
            }
            info.setSealed(true);
            if (!bypassCache) {
                sAccessibilityCache.add(info);