Nullcheck to fix Autofill CTS
Test: presubmit Fixes: 70506475 Bug: 69981755 Change-Id: I187bed4889a4901a7137a2995178ea651ed09186
This commit is contained in:
committed by
William Gray
parent
984dfe074c
commit
6c68a69288
@@ -738,11 +738,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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user