[automerger] Nullcheck to fix Autofill CTS am: 6c68a69288 am: 743abb939a am: a99414f51f am: 6b95503960 am: 9e291fe8c2 am: 97f7498c18 am: 232f42c7b8 am: 76a04ff670 am: 2bd91daa06 am: 3543522564

am: 775b8adf7b

Change-Id: I835e777e7e6bee5e91bfa729d095f8b6f0653c43
This commit is contained in:
Eugene Susla
2018-05-10 13:20:16 -07:00
committed by android-build-merger

View File

@@ -734,11 +734,14 @@ 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 the node package not one of the valid ones, pick the top one - this if (packageName == null
// is one of the packages running in the introspected UID. || !ArrayUtils.contains(packageNames, packageName.toString())) {
info.setPackageName(packageNames[0]); // 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); info.setSealed(true);
if (!bypassCache) { if (!bypassCache) {