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: I19920151701b25e34a1c82af073759d50e3bcc77
Change-Id: If7d7720bd650295d0e8be234ca5221a75cde167f
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
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
This value needs to be explicitly set to false to prevent re-using a
stale "true" value.
Fixes: 245965753
Test: CTS SensorHeadTrackerTest#testDiscontinuity (pending upload)
Change-Id: Icd018e0cab9e30b0677970760a38a390d9dd2a3c
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
FoldStateListener is non-static inner class and keeps reference to
the outer class which is CameraManager. As CameraManager also keeps
context with mContext, memory leak could exist.
Changing FoldStateListener to static inner class, so that the class
won't keep the reference.
Bug: 242264787
Test: Manual test with memory profiling
Change-Id: I77652bd94b50eabc80041e13274b619c0da36601
Do not allow oneTouchPlay and getDisplayStatus methods to be called
with null callback as an argument.
Bug: 236687418
Test: None
Change-Id: I9f1b3ec5c1a44fd588068881febd35d34930f031
Also fix a logic error in an if check while retrieving mandatory streams
for preview stabilization. This was not caught by CTS since for devices
where preview stabilization was supported, skipped the test. A
modification has been made to CTS RobustnessTest to ensure that the
preview stabilization support and mandatory streams are in agreement
with each other.
Bug: 228245412
Test: atest RobustnessTest.java on device supporting preview stabilization
Change-Id: I18c7f3c728862866b8f088da3afe222afbad7051
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Update the developer doc for reduced set of supported JPEG sizes
depending on media performance class level.
Also fix some broken links in developer doc.
Test: Build
Bug: 235804659
Change-Id: Iab3be52d13f02a19cc62732dcdf46feb576e0095
This reverts commit 3175300106.
Reason for revert: Breaking roboelectric suw tests with an NPE accessing displayids() in shadowdisplaymanager
Bug: 235541208
Change-Id: Ib760b5b9a477eb3c8516f01614afe8192a6e597b
If a display is disabled, do no share it outside of
LogicalDisplayMapper.
This will help by not creating unnecessary updates for displays that
are disabled.
Bug: 197515205
Bug: 221071695
Test: atest com.server.android.display
Test: Manually verify display layouts still successfully change, and
also that confirm logs no longer have excessive add/remove
display notifications.
Change-Id: Ie5954935bb1afc612935e52d421b0e103d8d0854
Synthetic metadata such as 'STATISTICS_FACES'
could be of value to extension clients.
Allow extension implementations to advertise support
for synthetic keys.
Bug: 235330843
Test:
atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionCharacteristicsTest.java
atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java
Change-Id: I80133e4559610ecad714afa93400c00b2b6685fa
When creating a VirtualDisplay for a VirtualDevice, we need to do some
extra work like setting up for input injection, creating a
DisplayWindowPolicyController, and grabbing a wakelock to keep the
display awake. Some parts of this extra work end up calling back into
the DisplayManagerService from another thread, but since we're already
holding the mSyncRoot lock we sometimes get into situations where
those threads get blocked trying to acquire mSyncRoot, while holding a
lock that another thread ends up needing like the global window
manager one, so we get deadlock.
The fix in this CL is to break up the extra work the
VirtualDeviceManagerService needs to do into two parts: one part that
happens before the VirtualDisplay is created, and one part
after. Neither of these needs mSyncRoot to be held.
Fixes: 230544802
Test: atest CreateVirtualDisplayTest
Change-Id: I6a6e03f816567579510b3f1ef0705375549a3c88
Add a category for DisplayManager#getDisplays() that includes
disabled/inaccessible/temporary displays in the set of returned
Displays.
Bug: 221071695
Test: adb shell cmd display get-displays \
android.hardware.display.category.ALL_INCLUDING_DISABLED
Change-Id: If06f7f8b7f9ba4779a19d24d76fb49e95a908afc