diff --git a/services/Android.bp b/services/Android.bp index cb042e88c1045..c5e32ea11ce67 100644 --- a/services/Android.bp +++ b/services/Android.bp @@ -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/", diff --git a/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java b/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java index 9e83f8e7bda85..ca9ff6f15f3f1 100644 --- a/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java +++ b/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java @@ -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}. */