Remove self-assignment from AutofillManagerService
This lets us make the errorprone warning an error, prevent erroneous
future instances.
Bug: 217923092
Test: errorprone build
Change-Id: I600ec645fafbdb550c8d3a11b6c877a32aa454fb
diff --git a/services/Android.bp b/services/Android.bp
index db233e5..69733c0 100644
--- a/services/Android.bp
+++ b/services/Android.bp
@@ -22,6 +22,7 @@
"-Xep:HashtableContains:ERROR",
"-Xep:FormatString:ERROR",
"-Xep:ArrayHashCode:ERROR",
+ "-Xep:SelfAssignment:ERROR",
// NOTE: only enable to generate local patchfiles
// "-XepPatchChecks:refaster:frameworks/base/errorprone/refaster/EfficientXml.java.refaster",
// "-XepPatchLocation:/tmp/refaster/",
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
index 051281c..fc95cdd 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
@@ -1614,8 +1614,8 @@
@NonNull IBinder appCallback, @NonNull IResultReceiver receiver)
throws RemoteException {
final int userId = UserHandle.getCallingUserId();
- activityToken = Objects.requireNonNull(activityToken, "activityToken");
- appCallback = Objects.requireNonNull(appCallback, "appCallback");
+ Objects.requireNonNull(activityToken, "activityToken");
+ Objects.requireNonNull(appCallback, "appCallback");
boolean restored = false;
synchronized (mLock) {