The current code reads alpha into an int, doesn't shift it back to the
least-significant-bit, and then shifts that value 4 more bits before
writing to the VP8X 'flags' byte. This results in setting the MSB of the
flags byte, which is a reserved bit that must always be zero, resulting
in an invalid file.
VP8X part of WebP spec:
https://developers.google.com/speed/webp/docs/riff_container#extended_file_format
Test: ExifInterfaceTest (after removing the suppression for this bug)
Bug: 253622642
Change-Id: I42469a479c94442eb395124c4eac174bd9ab6e09
When skipping over the EXIF chunk in the input file (and writing a new
EXIF chunk to the output based on the internal Exif data of the class),
it's important to skip both the chunk and any trailing padding byte (if
the chunk size is odd).
Without this fix the output of saveAttributes may be invalid (not
decodable with BitmapFactory.decodeFile).
Test: Added tests to ExifInterfaceTest to check the output of
saveAttributes is always parsable with BitmapFactory.
Bug: 253622642
Change-Id: I6b7c4612b830dbf95a12c42eac5d6301dfb15104
The DTS codec capability in sink devices can be DTS Digital Surround,
DTS HD, DTS HD Master Audio (Lossless), DTS:X Profile 1,
or DTS:X Profile 2.
The AudioFormat class already supports ENCODING_DTS, ENCODING_DTS_HD,
and ENCODING_DTS_UHD compressed formats. To distinguish all the
five categories of DTS codec capabilities, two more compressed
formats need to be added in AudioFormat class.
- The ENCODING_DTS_HD_MA format represents codec capability for
DTS HD Master Audio (both w/core and coreless lossless)
- The ENCODING_DTS_UHD_P1 format represents DTS:X Profile 1
codec capability and is the same as existing ENCODING_DTS_UHD
- The ENCODING_DTS_UHD_P2 format represents DTS:X Profile 2
codec capability
The codec capability represented by the existing formats are:
- ENCODING_DTS is for DTS Digital Surround
- ENCODING_DTS_HD is for DTS HD (DTS 8Ch Discrete, DTS High Resolution,
DTS Express)
- ENCODING_DTS_UHD is for DTS:X Profile 1
Test: atest AudioFormatTest
Change-Id: Id4d332cc75beee40cfe8637a4ecef18a0d2a0908
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 patch also updates the documentation for MediaMuxer()
Bug: 146417874
Test: atest CtsMediaV2TestCases:MuxerTest
Test: atest CtsMediaV2TestCases:MuxerUnitTest
Test: CtsMediaMuxerTestCases
Change-Id: Ia07a7e6864d6c27476b960069a6f4e8ac0de8255
This is a cherrypick of commit 58fb7d617d.
Bug: 239926177
Test: atest mediaroutertest CtsMediaBetterTogetherTestCases
Change-Id: I8478669747ca291d92b825e205f58add76e9a2a2
Merged-In: I8478669747ca291d92b825e205f58add76e9a2a2
This is a cherrypick of commit 3aa151259c.
Test: atest MediaRouter2ManagerTest
Bug: 239926177
Change-Id: I363dc3918465de7fdb74f833fae78f46bde72a37
Merged-In: I363dc3918465de7fdb74f833fae78f46bde72a37
This is a cherrypick of commit d9ac018756.
Before this change, MediaRouter2Manager (singleton) does not
protect clients against independent changes to the scanning
state, which means one client can stop the scan while another
needs scanning to go on. After this change, MediaRouter2Manager
keeps count of the calls to request scanning, and will only
request scanning from the system server while there is at least
one active scan request (via registerScanRequest).
This change does not affect MediaRouter2.start/stopScan.
Bug: 232812007
Test: atest CtsMediaBetterTogetherTestCases
Change-Id: I8d80872d7c55791b9a429180da1c68af50ae13b7
Merged-In: I8d80872d7c55791b9a429180da1c68af50ae13b7
This is a cherrypick of commit 147cb7c877.
Said exceptions mean the system server died, after which
guidance suggests it's not a good idea to silently swallow
said exception. Specially considering the client will be
restarted shortly after the system server dies.
Bug: 232812007
Test: atest MediaDeviceManagerTest MediaDataCombineLatestTest CtsMediaBetterTogetherTestCases
Change-Id: I21a724896684d79097ae74df2d5a54e60514ebdf
Merged-In: I21a724896684d79097ae74df2d5a54e60514ebdf
- 'HDMI' was replaced with 'External Device'
- resource 'default_audio_route_name_hdmi' was renamed to
'default_audio_route_name_external_device'
This is a cherry-pick of changes from ag/19927045.
Bug: b/233323666
Test: Tested manually by replacing text in UMO's chip
Change-Id: I8178ab2c27b1ec1e4bbcfc244611190593d5d836
(cherry picked from commit 8b59d645f2)
Merged-In: I8178ab2c27b1ec1e4bbcfc244611190593d5d836
Do not cache input/output buffers until explicitly requested.
Track validity of buffers before getInput/OutputBuffers so that the
dequeued buffers are marked accessible when the array is returned
to the client.
Bug: 189889230
Bug: 236106096
Test: manual
Merged-In: I6892f02853f00c3e355c827ec943fbdf183469f1
Change-Id: I6892f02853f00c3e355c827ec943fbdf183469f1
(cherry picked from commit 4a114c2f9c)
This patch splits the behavior of creating the media player
and the uri setter and avoids it from being recreated upon
being retrieved by getRingtone which harms performance
causing a double asset load.
Bug: 240621827
Test: Receive a phone call and verify ringtone works
Change-Id: I91563ddcc94f25911937e9fbb35ff36bbe9d3012
The calculation formula is now set to be the inverse of the one used
in VolumeControlService.java when calculating volume index from the
BLE audio volume level.
This also fixes not using the absolute volume for BLE audio stream,
which could result with very low volume levels at the lower registers
of the volume slider. It was caused by lowering the volume on both
ends. Not transmitting the sound at the maximum volume level could
also reduce the sound quality due to effective sound sample resolution
being lower.
Bug: 238587620
Bug: 241501978
Test: built and manually tested
Tag: #feature
Change-Id: I368c8978be5fbd94b0f62df2551fe179a9f203a0
Merged-In: I368c8978be5fbd94b0f62df2551fe179a9f203a0
(cherry picked from commit 51d75fbc69)