Merge changes I600ec645,Idfcc220d

* changes:
  Remove self-assignment from AutofillManagerService
  Use Arrays.hashCode in EventIndex hashCode()
This commit is contained in:
Michael Wright
2022-02-07 19:18:43 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 3 deletions

View File

@@ -21,6 +21,8 @@ java_defaults {
"-Xep:TryFailThrowable:ERROR",
"-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) {

View File

@@ -254,7 +254,7 @@ public class EventIndex {
@Override
public int hashCode() {
return Objects.hash(mLastUpdatedTime, mEventBitmaps);
return Objects.hash(mLastUpdatedTime, Arrays.hashCode(mEventBitmaps));
}
synchronized void writeToProto(@NonNull ProtoOutputStream protoOutputStream) {