Fix erroneous self comparison in KeyValueBackupTaskTest

Bug: 217923092
Test: atest BackupFrameworksServicesRoboTests
Change-Id: I73c88df39b63b40a6ed008c5e7872604a5894fbc
This commit is contained in:
Michael Wright
2022-02-04 17:12:47 +00:00
parent 0f654a9fe2
commit 010aa30bc4
2 changed files with 2 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ java_defaults {
// "-Xep:AndroidFrameworkBinderIdentity:ERROR",
"-Xep:AndroidFrameworkCompatChange:ERROR",
// "-Xep:AndroidFrameworkUid:ERROR",
"-Xep:SelfEquals:ERROR",
// NOTE: only enable to generate local patchfiles
// "-XepPatchChecks:refaster:frameworks/base/errorprone/refaster/EfficientXml.java.refaster",
// "-XepPatchLocation:/tmp/refaster/",

View File

@@ -2727,7 +2727,7 @@ public class KeyValueBackupTaskTest {
// The second line will throw NPE because it will call lambda 1 with null, since argThat()
// returns null. So we guard against that by checking for null.
return packageInfo ->
packageInfo != null && packageInfo.packageName.equals(packageInfo.packageName);
packageInfo != null && packageInfo.packageName.equals(packageData.packageName);
}
/** Matches {@link ApplicationInfo} whose package name is {@code packageData.packageName}. */