Commit Graph

9118 Commits

Author SHA1 Message Date
Jin Seok Park
7111b47eb1 Merge "Add function for adding EXIF to WebP files" 2020-07-29 03:29:42 +00:00
Jin Seok Park
c987165d86 Merge "Set default locale to US" 2020-07-23 10:22:54 +00:00
Gyumin Sim
3e9bfcf84f Merge changes I6aebd812,I0dc6a99a
* changes:
  Remove obsolete method in IMediaBrowserServiceCallbacks
  Remove an import in MediaBrowser
2020-07-23 07:58:54 +00:00
Jin Seok Park
f247c76020 Set default locale to US
SimpleDateFormat will use the default locale value if not explicitly
set. If the default locale is Arabic, SimpleDateFormat#format will
return a string that does not conform to the given pattern.

In ExifInterface, if setDateTime is called on a device with an Arabic
locale, it will write a string value that will not follow the EXIF
standard "YYYY:MM:DD HH:MM:SS" format. Thus, we need to set the
locale to Locale.US at all times.

Bug: 160674042
Test: N/A
Change-Id: I2ad42f73742fd8ceeeeae47eafea69015f50814d
2020-07-23 15:08:08 +09:00
TreeHugger Robot
f806c211b3 Merge "AudioDeviceInfo: make TYPE_REMOTE_SUBMIX public" 2020-07-23 00:48:26 +00:00
Gyumin Sim
7bf786f574 Remove obsolete method in IMediaBrowserServiceCallbacks
It removes onLoadChildren because onLoadChildren is not used anymore
that is identical to onLoadChildrenWithOptions with null options. It
also renames onLoadChildrenWithOptions to onLoadChildren for simpler
name.

Test: atest CtsMediaTestCases:android.media.cts.MediaBrowserTest \
  CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest
Change-Id: I6aebd812249cd3a717aa6d2f48e4a40601ef1063
2020-07-22 17:43:06 +09:00
Gyumin Sim
9d211b7460 Remove an import in MediaBrowser
The repo hook complains about unused imports because MediaController is
not used in code but javadoc.

Test: m offline-sdk-docs
Change-Id: I0dc6a99a77f344e326c4bbe0c216c4f0f44be696
2020-07-22 17:43:06 +09:00
TreeHugger Robot
1241c8709f Merge "Add HapticGenerator." 2020-07-20 20:07:20 +00:00
jiabin
2ea6a26b4d Add HapticGenerator.
Add HapticGenertor, which is an audio effect that can generate haptic
data from audio data.

Bug: 136490803
Test: atest HapticGeneratorTest
Change-Id: Ib677f0ad82ae4a164546300c7a86760cdb6a52b4
2020-07-20 18:00:26 +00:00
Jin Seok Park
2018d2bd3c Add function for adding EXIF to WebP files
Code copied from aosp/1148409 and aosp/1236647 with some minor
changes.

Original commit message:
Added code and test for WebP files
1) with EXIF data
2) without EXIF data but with other extra data
Added code and test for saving EXIF to WebP files without EXIF data
1) and have lossy encoding
2) and have lossless encoding
Also refactored test method names for better readability.

Bug: 138786288
Test: atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: Ib6319e1b7b6711b071542d94ebfdc4a9f80e9c16
2020-07-21 00:05:39 +09:00
Eric Laurent
e1c32391fa Merge "AudioService: Add metrics for audio mode" into rvc-dev am: 148c8bc210 am: e502c6aa15 am: f332fc9ccd am: b9ea818a3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12065323

Change-Id: Ie80eb7907762bf17b9014b34f30720afcfbf6a66
2020-07-19 17:51:09 +00:00
Eric Laurent
e502c6aa15 Merge "AudioService: Add metrics for audio mode" into rvc-dev am: 148c8bc210
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12065323

Change-Id: I0c64ec09a72ccf1c781b5652a1cc36508062083c
2020-07-19 17:08:41 +00:00
Eric Laurent
148c8bc210 Merge "AudioService: Add metrics for audio mode" into rvc-dev 2020-07-19 16:46:20 +00:00
Henry Fang
6603012e2e Merge "Fix MediaCas CTS failure TRM is checking input parameters and won't allow null executor. Use context main executor to call Tuner Resource Manager (TRM)" into rvc-dev am: bdc05af123 am: 1278c0bcaf am: af0636a39f am: ed58a415ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12162120

Change-Id: I3c7c593eae3ac01da9d3f5bc668d0f8334ece88c
2020-07-16 19:59:50 +00:00
Henry Fang
ed58a415ec Merge "Fix MediaCas CTS failure TRM is checking input parameters and won't allow null executor. Use context main executor to call Tuner Resource Manager (TRM)" into rvc-dev am: bdc05af123 am: 1278c0bcaf am: af0636a39f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12162120

Change-Id: I26a7c280520196e33df3df25b844d965ec649ea1
2020-07-16 19:42:24 +00:00
Henry Fang
0b7ea54a86 Merge "Fix MediaCas CTS failure TRM is checking input parameters and won't allow null executor. Use context main executor to call Tuner Resource Manager (TRM)" into rvc-dev am: bdc05af123
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12162120

Change-Id: Icdb03ffdb5056b7023a491424c24996fe31ba69b
2020-07-16 19:07:36 +00:00
Jean-Michel Trivi
c17a2423de AudioDeviceInfo: make TYPE_REMOTE_SUBMIX public
SUBMIX type can be returned by routing query APIs such as
MediaPlayer.getRoutedDevice(), make it public.

Bug: 160819170
Test: atest AudioHostTest#testTwoChannelCapturingCheckSubmixDevice
Change-Id: Ie5854ad86464c40137d0a1b10420116bc5cc270e
2020-07-16 09:58:41 -07:00
Eric Laurent
6915e2ff50 AudioService: Add metrics for audio mode
A metrics for audio mode changes and failure to release IN_COMMUNICATION
mode when inactive.

Bug: 153934174
Bug: 161444687
Test: repro steps in Bug and verify logs and metrics
Change-Id: Ib3beab2e8b64e7354ff1a32f04561e7b95f61855
2020-07-16 08:39:22 -07:00
Henry Fang
f0e3e4f470 Fix MediaCas CTS failure
TRM is checking input parameters and won't allow null executor.
Use context main executor to call Tuner Resource Manager (TRM)

Also fix ConcurrentModificationException when use HashMap.forEach to free element in hashmap.

Test: atest MediaCasTest
bug: 161391585
Change-Id: Ie5111b46b5b601f0a5b56e5828d79771e153a210
2020-07-15 19:06:25 -07:00
Jin Seok Park
431f3af83b Remove using hidden API: MediaSessionManager(Context)
Replace with SystemServiceRegistry.registerContextAwareService,
which is a @SystemApi. See ag/9734296 for reference.

Bug: 160380016
Test: atest
    CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I9b6da97e0e0f5181ce8681a399ca090e67f6fd4e
2020-07-06 15:33:47 +09:00
Jin Seok Park
8f79003bec Remove using ServiceManager API in MediaSessionManager
MediaSessionManager calls ServiceManager#getService(string) to get
ISessionManager, but it is a hidden API that will not be made into
@SystemApi (ag/6329675).

Instead, create a wrapper class that can only retrieve specified
media service binders. (ag/10123575 for reference)

Bug: 159955826
Test: atest
    CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I1ab89d1217e8e3d071b38da772ee96889e9859b1
2020-07-05 16:09:14 +09:00
TreeHugger Robot
22f020ff4b Merge "Add FEATURE_REMOTE_GROUP_PLAYBACK" into rvc-dev am: c0fcd758c4 am: be48f1591e am: 0d1eeaad63 am: 9e43adeba0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12043613

Change-Id: Iec331368f55cb9e9b02d5a4e42a7437e504f23c7
2020-07-02 01:48:10 +00:00
TreeHugger Robot
9e43adeba0 Merge "Add FEATURE_REMOTE_GROUP_PLAYBACK" into rvc-dev am: c0fcd758c4 am: be48f1591e am: 0d1eeaad63
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12043613

Change-Id: I8a9d244ed6b0341eea13357546935dc1d48f0e82
2020-07-02 01:34:35 +00:00
TreeHugger Robot
bc6f7b7b4f Merge "Add FEATURE_REMOTE_GROUP_PLAYBACK" into rvc-dev am: c0fcd758c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12043613

Change-Id: I7e9e9371b7108f2fa2179bf99f7f21f7670594c9
2020-07-02 01:08:02 +00:00
TreeHugger Robot
c0fcd758c4 Merge "Add FEATURE_REMOTE_GROUP_PLAYBACK" into rvc-dev 2020-07-02 00:47:56 +00:00
Automerger Merge Worker
843a4b4063 Merge "Merge "media: clarify keys used for CodecCapabilities.isFormatSupported" into rvc-dev am: db6e11150c am: 0511013257 am: 24f269e6b0" into rvc-qpr-dev-plus-aosp am: 0399ad72dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12062381

Change-Id: Ie105c54f4bbe5f4ba931b147c7e7b8c791a2eb7e
2020-07-02 00:30:44 +00:00
TreeHugger Robot
0511013257 Merge "media: clarify keys used for CodecCapabilities.isFormatSupported" into rvc-dev am: db6e11150c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12062381

Change-Id: Ifbc857cb095e937234dc8567137863f2e6a2e054
2020-07-01 23:49:50 +00:00
Lajos Molnar
e167804b42 media: clarify keys used for CodecCapabilities.isFormatSupported
Bug: 159281744
Change-Id: Id93dd2529e468b76bdd01e2a8ebe14b8435a54d7
2020-07-01 14:56:30 -07:00
Kyunglyul Hyun
e44b5a2641 Add FEATURE_REMOTE_GROUP_PLAYBACK
Can be used to distinguish a group route from single device routes

Bug: 160113560
Test: N/A
Change-Id: Id65aded4ce396bbfaec7040fc2227b769f8c5794
2020-07-01 14:07:39 +08:00
TreeHugger Robot
e9c247146d Merge "Camera: Clarify timestamp behavior for VIDEO_RECORD usage flag" into rvc-dev am: 26bf8c7aa0 am: 2f875cc89d am: 3bdc9277bb am: e10c1f3fb0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12002522

Change-Id: If769c3885cad4818faaaf03778f486957e4f9606
2020-06-27 02:44:20 +00:00
Jean-Michel Trivi
189701475f Merge "AudioAttributes: fix setter for flags" into rvc-dev am: a750903b42 am: 78d37b71d5 am: 2054ade6a7 am: 41a0ab2f2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12003758

Change-Id: If8aa425017c865170bc1652c6c7b22ef053c8feb
2020-06-27 02:34:32 +00:00
Kyunglyul Hyun
cc8f8c7fa3 Merge "Don't check selectedRoutes of created sesions" into rvc-dev am: bc41b14c58 am: 0bfba9c369 am: c0b5e67b11 am: f67dbafd59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11997601

Change-Id: I861f68cc93f8add9f4fae670972b4e91cd5e8ac5
2020-06-27 02:33:32 +00:00
TreeHugger Robot
3bdc9277bb Merge "Camera: Clarify timestamp behavior for VIDEO_RECORD usage flag" into rvc-dev am: 26bf8c7aa0 am: 2f875cc89d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12002522

Change-Id: Iae9cb2e3d06e8f4f65f841780a36040f4bf22dcb
2020-06-26 16:35:36 +00:00
TreeHugger Robot
882446d79c Merge "Camera: Clarify timestamp behavior for VIDEO_RECORD usage flag" into rvc-dev am: 26bf8c7aa0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12002522

Change-Id: I2f33806d11d7b7ac91a00a045cc4b420a3e438f1
2020-06-26 16:21:15 +00:00
TreeHugger Robot
26bf8c7aa0 Merge "Camera: Clarify timestamp behavior for VIDEO_RECORD usage flag" into rvc-dev 2020-06-26 16:09:09 +00:00
Jean-Michel Trivi
2054ade6a7 Merge "AudioAttributes: fix setter for flags" into rvc-dev am: a750903b42 am: 78d37b71d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12003758

Change-Id: I04eb33330a4e5277b164adc2604d52993c780750
2020-06-26 04:04:42 +00:00
Jean-Michel Trivi
0039734e58 Merge "AudioAttributes: fix setter for flags" into rvc-dev am: a750903b42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12003758

Change-Id: I02580d1da80e38850721268ad75a1840bec8c263
2020-06-26 03:50:24 +00:00
Jean-Michel Trivi
a750903b42 Merge "AudioAttributes: fix setter for flags" into rvc-dev 2020-06-26 03:49:30 +00:00
Jean-Michel Trivi
b097d9e1cd AudioAttributes: fix setter for flags
A regression was introduced by d0c4968 which prevented @SystemApi
flags to be set in the builder of an AudioAttributes, causing
FLAG_BYPASS_INTERRUPTION_POLICY and FLAG_BYPASS_MUTE to get
ignored.
Note that even though any client can set System flags, they will
be discarded and ignored server side in the audio policy service if
the caller doesn't have the permissions.

Bug: 154205921
Test: fire alerts with packages/apps/CellBroadcastReceiver/tests/testapp
Change-Id: I9d593787c18a510aa702dc0da85254f0d9574f11
2020-06-26 03:48:35 +00:00
Kyunglyul Hyun
0bfba9c369 Merge "Don't check selectedRoutes of created sesions" into rvc-dev am: bc41b14c58
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11997601

Change-Id: I7e91ac9a422d29ca5be052c6b2929d65e6538be3
2020-06-26 01:53:46 +00:00
Shuzhen Wang
f09a4cdbd6 Camera: Clarify timestamp behavior for VIDEO_RECORD usage flag
Test: make docs and read the doc
Bug: 143240912
Change-Id: I64032c7e2644680888979696968bdebd772530cc
2020-06-25 16:31:14 -07:00
Kyunglyul Hyun
f19e811c88 Don't check selectedRoutes of created sesions
There are cases that a newly create session does not contain
the requested route. (e.g. static group)
This CL removes check that disallowed those cases.

Bug: 159881597
Test: Run CTS, atest mediaroutertest and manually
using support v7 demos, which is edited to call
notifySessionCreated with member routes selected

Change-Id: I30741d2f3587d0fa9ee5a10fdb8fab9e0d82c721
2020-06-25 19:16:45 +09:00
Hangyu Kuang
5a6a574094 Merge "transcoding: Add HEVC->AVC transcoding test." 2020-06-24 19:02:10 +00:00
Makoto Onuki
d9bdedcf5b Merge "Remove unnecessarily @System/TestApi annotations" into rvc-dev-plus-aosp 2020-06-24 18:02:52 +00:00
Makoto Onuki
42bec243c0 Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.

Exempt-From-Owner-Approval:Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
2020-06-24 18:02:10 +00:00
TreeHugger Robot
e7595723dd Merge "Fix CryptoInfo.toString" into rvc-dev am: 4b23ea8b74 am: a79ec4979e am: d8e4e24521 am: f6f58cce56
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11986780

Change-Id: I4f2c5014e1b4b0dd88a8d93b9efc848c46b57ae4
2020-06-24 17:42:59 +00:00
TreeHugger Robot
f6f58cce56 Merge "Fix CryptoInfo.toString" into rvc-dev am: 4b23ea8b74 am: a79ec4979e am: d8e4e24521
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11986780

Change-Id: Id6024c319cabc3d9efec3c689b732231cfaf0459
2020-06-24 17:29:05 +00:00
TreeHugger Robot
308851ebde Merge "Fix CryptoInfo.toString" into rvc-dev am: 4b23ea8b74
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11986780

Change-Id: I87f8b699f8be0c1aaddeed343e88d3d02c4b8e03
2020-06-24 17:01:17 +00:00
TreeHugger Robot
4b23ea8b74 Merge "Fix CryptoInfo.toString" into rvc-dev 2020-06-24 16:58:11 +00:00
hkuang
331fbc0434 transcoding: Add HEVC->AVC transcoding test.
1) This CL verifies hevc to avc transcoding is working.
Still need to verify the transcoding result in the
coming CLs.
2) This CL also fix a bug that the track format
is not set when sending job to transcoding service.

Bug: 145628554
Bug: 154734285
Test: Unit test

Change-Id: Ia740e1e969357c3f719966c114f1e5182f4d7f66
2020-06-24 09:31:04 -07:00