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
This commit is contained in:
Michael Wright
2022-02-04 21:02:33 +00:00
parent 16451b0b8d
commit 573d22a90c
2 changed files with 3 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ java_defaults {
"-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/",

View File

@@ -1614,8 +1614,8 @@ public final class AutofillManagerService
@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) {