Commit Graph

11435 Commits

Author SHA1 Message Date
Santiago Seifert
0a968fefbb Merge "Add RouteListingPref.Item disable reason and flags" 2022-12-02 13:53:22 +00:00
Hongguang Chen
4c974ae4c8 Merge "Add VVC H266 support" 2022-12-02 02:02:17 +00:00
Santiago Seifert
2276aab27c Add RouteListingPref.Item disable reason and flags
Test: atest MediaRouter2HostSideTest
Bug: 241888071
Bug: 235352899
Change-Id: Ia69778e624929f0cb932370310a4a2b19fc481b0
2022-11-30 13:34:16 +00:00
Eric Laurent
7d1d59ac86 Merge "AudioService: ensure sink role for communication device" 2022-11-30 08:36:53 +00:00
TreeHugger Robot
5fe7de0200 Merge "Remove duplicated comment for setTunerConfiguration." 2022-11-30 03:20:07 +00:00
jiabin
5302c76d2a Remove duplicated comment for setTunerConfiguration.
Bug: 260769195
Test: TH
Change-Id: I6b4e54d6933b9e37694aead5936e0855bea768d9
2022-11-29 15:45:59 -08:00
TreeHugger Robot
785865337a Merge "APC: Remove the MUTE_BY_UNKNOWN flag" 2022-11-29 23:11:55 +00:00
TreeHugger Robot
39e4080c95 Merge "Set docking ringtone to be played from builtin speaker." 2022-11-29 22:51:23 +00:00
TreeHugger Robot
82f575484c Merge "Update documentation for Image to be clear on valid format enums." into tm-dev am: 82409626b9 am: df1525f44b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17006063

Change-Id: Ic5c8274a9afb0d19eab51cc3ae8d0796be28637b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 21:57:41 +00:00
TreeHugger Robot
82409626b9 Merge "Update documentation for Image to be clear on valid format enums." into tm-dev 2022-11-29 20:50:27 +00:00
Vlad Popa
0679ce8820 APC: Remove the MUTE_BY_UNKNOWN flag
This flag can be misleading. Also it is not false to set the value to 0
when a player has not had an active mute event. For anonymization using
also the 0 value.

Test: dumpsys audio & atest android.media.audio.cts.AudioPlaybackConfigurationTest
Bug: 257136556
Change-Id: Ie8579f1824e4a514c437fc0e25891d46783c388e
2022-11-29 20:16:55 +01:00
Hongguang Chen
df0e8296da Merge "Add isLnaSupported API" 2022-11-29 16:57:38 +00:00
Ray Chin
7fd495d4b3 Add isLnaSupported API
Bug: 239240674
Test: atest android.media.tv.tuner.cts with cf_x86_tv-userdebug
Change-Id: Id6dda8b039f27c31c01c99c040943119d597be79
2022-11-29 16:42:12 +08:00
Santiago Seifert
9cd4601ff1 Merge "Add support for app route listing preferences" 2022-11-25 15:20:09 +00:00
Santiago Seifert
71e5d2f4b6 Add support for app route listing preferences
Test: atest MediaRouter2HostSideTest
Bug: 241888071
Bug: 235352899
Change-Id: Ic9545a035631f2adb79d46e6432356dd7af4f5a0
2022-11-24 16:21:53 +00:00
Alex Dadukin
c4d0c7e513 Merge "Fix issues with nullability contract in MediaRouter2Utils" 2022-11-24 14:41:45 +00:00
TreeHugger Robot
9fcd09ed51 Merge "Audio: Make AudioTimestamp be parcelable" 2022-11-24 04:01:12 +00:00
TreeHugger Robot
2064ae92ad Merge "AudioDeviceVolumeManager and VolumeInfo API changes" 2022-11-24 03:07:56 +00:00
Jean-Michel Trivi
283a4c7153 AudioDeviceVolumeManager and VolumeInfo API changes
Context service name for accessing AudioDeviceVolume manager.
Address API comments on VolumeInfo and AudioDeviceVolumeManager.
Add support in VolumeInfo to know whether it carries an explicit
  mute/unmute information (vs just default value of isMuted()).

Bug: 244326361
Test: atest android.media.audio.cts.AudioDeviceVolumeManagerTest
Test: atest android.media.audio.cts.VolumeInfoTest
Change-Id: Id718fbd7e0d5795ac480d9188faad4a70fba9808
2022-11-23 18:14:47 +00:00
Dorin Drimus
245a606c1d Merge "Audio: Add ENCODING_DTS_HD_MA, ENCODING_DTS_UHD_P2" am: 7edaca37dd am: 41264808de am: 5246e464ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991785

Change-Id: Ie1e5a863c1670a0bd45b8149927eb0d00509e269
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-23 17:32:27 +00:00
Treehugger Robot
2924b3883f Merge "Fix how ExifInterface creates VP8X chunks for WebP files" am: 7bd2520d4a am: a34879653e am: da79afaad9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2303892

Change-Id: Id9ce00165b7ca57e3ba6e519acf4fbd01c687bbf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-23 17:14:06 +00:00
Treehugger Robot
01a16c8957 Merge "Prevent ExifInterface incorrectly copying a WebP padding byte" am: efdf0d6cde am: 83df98e8d3 am: 6fb8877809
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2303891

Change-Id: I728b5d4744648687d91e3e447083585141832fc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-23 16:37:48 +00:00
Alex Dadukin
093d7d20a9 Fix issues with nullability contract in MediaRouter2Utils
Bug: b/259025372
Test: atest MediaRoute2InfoTest RoutingSessionInfoTest
Change-Id: I3e6de420582db117d7dae6bb460614d27b1b322a
2022-11-23 15:00:56 +00:00
Ivan Chiang
5292504bea Audio: Make AudioTimestamp be parcelable
Test: atest AudioTimestampTest
Bug: 259001306
Change-Id: Ie5702085e072aef85493b697a4b38d71d99452ba
2022-11-23 05:32:55 +00:00
Jean-Michel Trivi
b4509c9ddb Merge "AudioDeviceInfo: add analog audio dock type" 2022-11-23 00:51:25 +00:00
Dorin Drimus
41264808de Merge "Audio: Add ENCODING_DTS_HD_MA, ENCODING_DTS_UHD_P2" am: 7edaca37dd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991785

Change-Id: I8d23b935fe5976e72372671fc5ffa9a01ae2a8e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 14:57:06 +00:00
Alex Dadukin
a36c5fe4e2 Merge "Rethrow RemoteExceptions from MediaRouter2 instead of logging them" 2022-11-22 14:52:23 +00:00
Dorin Drimus
7edaca37dd Merge "Audio: Add ENCODING_DTS_HD_MA, ENCODING_DTS_UHD_P2" 2022-11-22 14:28:45 +00:00
Treehugger Robot
a34879653e Merge "Fix how ExifInterface creates VP8X chunks for WebP files" am: 7bd2520d4a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2303892

Change-Id: Ib1901b38dc8f9b91b41f6841608b945d92404b47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 11:42:00 +00:00
Treehugger Robot
7bd2520d4a Merge "Fix how ExifInterface creates VP8X chunks for WebP files" 2022-11-22 11:38:23 +00:00
Treehugger Robot
83df98e8d3 Merge "Prevent ExifInterface incorrectly copying a WebP padding byte" am: efdf0d6cde
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2303891

Change-Id: I22a4922d790e3ead2776b541bc96bd0d6758917f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 06:19:21 +00:00
Treehugger Robot
efdf0d6cde Merge "Prevent ExifInterface incorrectly copying a WebP padding byte" 2022-11-22 05:37:13 +00:00
Jean-Michel Trivi
ea4bfc1622 AudioDeviceInfo: add analog audio dock type
Introduce TYPE_DOCK_ANALOG.
Fix mappings of TYPE_DOCK to map to a single
 device type, digital dock.

Bug: 253118335
Test: atest android.media.audio.cts.AudioDeviceInfoTest
Change-Id: I160875e74b29739a0232d6a7b833c3927433e067
2022-11-20 21:23:27 +00:00
Rakesh Kumar
0d30ebcac2 Fix how ExifInterface creates VP8X chunks for WebP files
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
2022-11-20 05:44:38 +00:00
Rakesh Kumar
e3e6fa1ecc Prevent ExifInterface incorrectly copying a WebP padding byte
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
2022-11-20 10:46:37 +05:30
Eric Laurent
6aa23612af AudioService: ensure sink role for communication device
Make sure that devices selected for communication have a sink
role (output) and clarify the AudioManager documentation.

Bug: 247659585
Test: make
Change-Id: I6b1bc0430a7c5f8a5019fb723a3d9d9e5fcd36c6
2022-11-18 16:36:10 +01:00
Rahul
9c85cfc37e Audio: Add ENCODING_DTS_HD_MA, ENCODING_DTS_UHD_P2
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
2022-11-18 14:40:22 +00:00
Alex Dadukin
317e3b8c11 Re-throw unexpected RemoteExceptions in MediaRouter
This change re-throws exceptions that can only be caused by a dead
system server. We avoid spamming the logs by just re-throwing.
This makes it more clear that the MediaRouter instance does not
end the method execution in a consistent state.

Bug: b/259025372
Test: atest MediaRouterTest
Change-Id: I28dbe7936e199e322dc634a8bcc2206afbc0eaf7
2022-11-18 09:58:31 +00:00
Mingyu Kang
1fcfa355e9 Set docking ringtone to be played from builtin speaker.
Bug: b/227256896
Test: Dock the device
Change-Id: I71bbd79fcd6652028dfd0264e42f947c732a1b2e
2022-11-17 20:47:33 +00:00
Alex Dadukin
3e6e78b9f0 Rethrow RemoteExceptions from MediaRouter2 instead of logging them
Bug: b/259025372
Test: atest MediaRouter2Test
Change-Id: I90d4197555e37ac5b484b36a594ead4390334e64
2022-11-16 11:02:54 +00:00
Cole Faust
22deef8d08 Merge "[conflict] Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c am: d3c499dabc" 2022-11-16 03:17:38 +00:00
David Zhao
9c5ce9d0b4 Merge "Add notifyRecordingStopped API" 2022-11-16 02:22:41 +00:00
David Zhao
2f09f6979f Add notifyRecordingStopped API
Test: atest
Bug: 256713311
Change-Id: I9d8a0e163730bcd88597ebc468bc6ea88929ebdf
2022-11-15 12:55:14 -08:00
Cole Faust
e4abcbec1d [conflict] Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c am: d3c499dabc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I84d67fdfcc99f9f6fca218d4264ab8e0bc1f1653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:47:41 +00:00
Hongguang Chen
4085006170 Merge "Fix requestFrontend API" 2022-11-15 19:35:06 +00:00
Cole Faust
f9df26ae3c Merge "Fix errorprone warnings that should be errors" am: 677d6cd780
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I0e9c5077610407a117ee34ff688b40b52e161a03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:11:55 +00:00
Cole Faust
7da659bb6c 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
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
2022-11-14 17:57:30 -08:00
David Zhao
3d254be3c2 Merge "Add requestStopRecording APIs" 2022-11-15 00:02:18 +00:00
Ray Chin
868ef62369 Add VVC H266 support
Bug: 219981033
Test: atest android.media.tv.tuner.cts
Change-Id: Id61de4aae87a114577942ec75abfb76368bf9adb
2022-11-14 15:59:13 +08:00
Santiago Seifert
2a1b07f152 Simplify looper selection when instantiating MediaSession
This change essentially replaces new Handler().getLooper() with
Looper.myLooper().

Bug: 205124386
Change-Id: If2d9664d6844cf4fa2cb97b3724854db506985a3
Test: Presubmit.
2022-11-13 19:11:07 +00:00