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

Commit ac6aaf5f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Nullcheck to fix Autofill CTS"

parents c0d9aa16 dfb43327
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -790,12 +790,15 @@ public final class AccessibilityInteractionClient
        if (info != null) {
        if (info != null) {
            info.setConnectionId(connectionId);
            info.setConnectionId(connectionId);
            // Empty array means any package name is Okay
            // Empty array means any package name is Okay
            if (!ArrayUtils.isEmpty(packageNames)
            if (!ArrayUtils.isEmpty(packageNames)) {
                    && !ArrayUtils.contains(packageNames, info.getPackageName().toString())) {
                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
                    // 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.
                    // is one of the packages running in the introspected UID.
                    info.setPackageName(packageNames[0]);
                    info.setPackageName(packageNames[0]);
                }
                }
            }
            info.setSealed(true);
            info.setSealed(true);
            if (!bypassCache) {
            if (!bypassCache) {
                sAccessibilityCache.add(info);
                sAccessibilityCache.add(info);