From 9e611d283c37ed416237cce3a06988a7b76d74f4 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Fri, 18 Nov 2022 22:41:19 -0800 Subject: [PATCH] Fix errorprone warnings that should be errors This commit is part of a large scale change to fix errorprone errors that have been downgraded to warnings in the android source tree, so that they can be promoted to errors again. The full list of changes include the following, but not all will be present in any one individual commit: BadAnnotationImplementation BadShiftAmount BanJNDI BoxedPrimitiveEquality ComparableType ComplexBooleanConstant CollectionToArraySafeParameter ConditionalExpressionNumericPromotion DangerousLiteralNull DoubleBraceInitialization DurationFrom DurationTemporalUnit EmptyTopLevelDeclaration EqualsNull EqualsReference FormatString FromTemporalAccessor GetClassOnAnnotation GetClassOnClass HashtableContains IdentityBinaryExpression IdentityHashMapBoxing InstantTemporalUnit InvalidTimeZoneID InvalidZoneId IsInstanceIncompatibleType JUnitParameterMethodNotFound LockOnBoxedPrimitive MathRoundIntLong MislabeledAndroidString MisusedDayOfYear MissingSuperCall MisusedWeekYear ModifyingCollectionWithItself NoCanIgnoreReturnValueOnClasses NonRuntimeAnnotation NullableOnContainingClass NullTernary OverridesJavaxInjectableMethod ParcelableCreator PeriodFrom PreconditionsInvalidPlaceholder ProtoBuilderReturnValueIgnored ProtoFieldNullComparison RandomModInteger RectIntersectReturnValueIgnored ReturnValueIgnored SelfAssignment SelfComparison SelfEquals SizeGreaterThanOrEqualsZero StringBuilderInitWithChar TreeToString TryFailThrowable UnnecessaryCheckNotNull UnusedCollectionModifiedInPlace XorPower See https://errorprone.info/bugpatterns for more information on the checks. Bug: 253827323 Test: m RUN_ERROR_PRONE=true javac-check Merged-In: I76f6092f7dc1af45b3df12f86b2bf3ec4b00ff8f Change-Id: I6db5cf999720292154f5214df3369c941b4f0f12 --- .../server/biometrics/sensors/face/hidl/Face10Test.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/hidl/Face10Test.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/hidl/Face10Test.java index 116d2d5a66a0d..cc9a917fa92eb 100644 --- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/hidl/Face10Test.java +++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/hidl/Face10Test.java @@ -102,7 +102,8 @@ public class Face10Test { FaceSensorProperties.TYPE_UNKNOWN, supportsFaceDetection, supportsSelfIllumination, resetLockoutRequiresChallenge); - Face10.sSystemClock = Clock.fixed(Instant.ofEpochMilli(100), ZoneId.of("PST")); + Face10.sSystemClock = Clock.fixed( + Instant.ofEpochMilli(100), ZoneId.of("America/Los_Angeles")); mFace10 = new Face10(mContext, sensorProps, mLockoutResetDispatcher, mHandler, mScheduler, mBiometricContext); mBinder = new Binder(); @@ -112,7 +113,7 @@ public class Face10Test { waitForIdle(); Face10.sSystemClock = Clock.fixed(Instant.ofEpochSecond( Face10.sSystemClock.instant().getEpochSecond() + seconds), - ZoneId.of("PST")); + ZoneId.of("America/Los_Angeles")); } @Test