Commit 6c68a692 authored by Eugene Susla's avatar Eugene Susla Committed by William Gray

Nullcheck to fix Autofill CTS

Test: presubmit
Fixes: 70506475
Bug: 69981755
Change-Id: I187bed4889a4901a7137a2995178ea651ed09186
parent 984dfe07
......@@ -738,11 +738,14 @@ 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 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]);
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment