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

Commit 775b8adf authored by Eugene Susla's avatar Eugene Susla Committed by android-build-merger
Browse files

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

[automerger] Nullcheck to fix Autofill CTS am: 6c68a692 am: 743abb93 am: a99414f5 am: 6b955039 am: 9e291fe8 am: 97f7498c am: 232f42c7 am: 76a04ff6 am: 2bd91daa
am: 35435225

Change-Id: I62fb1c7d3eb618e7f3d8b2033303761c5f75e9c8
parents 8720a5e1 35435225
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -734,12 +734,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);