Commit Graph

9256 Commits

Author SHA1 Message Date
Hyundo Moon
0732c3ae8e Add a public method MediaMetadata.Builder#setBitmapDimensionLimit()
This CL replaces the copy constructor
MediaMetadata(MediaMetadata source, int maxBitmapSize)
with the new public method Builder#setBitmapDimensionLimit().

Also added a getter getBitmapDimensionLimit().

Bug: 168215839
Test: m update-api -j; Ran MediaMetdataTest
Change-Id: I6844fcf01c4ee98c99bd0dc880b96f73989dbd3c
2020-09-28 16:32:23 +09:00
TreeHugger Robot
a76f514974 Merge "Implement callback for current channel infos" 2020-09-26 01:41:46 +00:00
TreeHugger Robot
43ba05c031 Merge "Add API getCurrentChannelInfos" 2020-09-26 00:31:47 +00:00
shubang
990957db49 Implement callback for current channel infos
Test: mmm
Change-Id: Ia808cddfaab1a506ed106a31b698e406d732646c
2020-09-25 16:30:52 -07:00
Chong Zhang
2c18280f91 transcoding: remove uid/pid from registerClient
bug: 154733526
test: unit testing, builds
Change-Id: If4b5201587ab5d4a9da91376a85310c864f13644
2020-09-24 17:52:47 -07:00
shubang
47a260f827 Add API getCurrentChannelInfos
Test: cuttlefish + sample tuner input
Change-Id: Ia13bebfb595ce1886c9aa540121f6836a404fd25
2020-09-24 14:42:51 -07:00
TreeHugger Robot
6128432078 Merge "Add BIND_INCLUDE_CAPABILITIES flag when binding to the service." into rvc-qpr-dev am: 36019e12b2 am: 2c70f81609
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12661665

Change-Id: I7ea669edfd84e93b9a0552c47ec95689b1a77f46
2020-09-23 22:08:52 +00:00
TreeHugger Robot
2c70f81609 Merge "Add BIND_INCLUDE_CAPABILITIES flag when binding to the service." into rvc-qpr-dev am: 36019e12b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12661665

Change-Id: I9f74ba4ee981620c72516ce4c4737990b7ce2b35
2020-09-23 22:07:29 +00:00
TreeHugger Robot
56fd85683b Merge "Add MediaFormat key for slow-motion marker info" 2020-09-23 18:41:44 +00:00
Arnaud Berry
76724683e3 Add BIND_INCLUDE_CAPABILITIES flag when binding to the service.
This allows headless media applications to access the location if they
have the permission and is needed for AAOS apps in particular.

Bug: 169242810
Bug: 156904507
Test: manual with AAOS Media app
Change-Id: I1196718638fba336a815809578f643814545baf4
2020-09-23 16:21:50 +00:00
Chong Zhang
7f12ed39e8 Add MediaFormat key for slow-motion marker info
bug: 160260201
CTS-Coverage-Bug: 169242631
Change-Id: I68746086d008957776bee8328a5331de3ba65db9
2020-09-23 09:18:27 -07:00
Zimuzo Ezeozue
9cf6725256 Merge "Implement TranscodingJob#toString" 2020-09-23 11:53:31 +00:00
Jin Seok Park
69f8c3108a Merge "Remove UnsupportedAppUsage from ExifInterface" 2020-09-23 09:37:35 +00:00
TreeHugger Robot
5574089d1a Merge "AudioManager: clean up resource query in constructor" 2020-09-23 04:05:26 +00:00
Jean-Michel Trivi
a051308d62 AudioManager: clean up resource query in constructor
Remove unused mUseVolumeKeySounds and associated resource query.
Don't query fixed volume prop until value is needed.

Bug: 168815124
Test: atest AudioManagerTest
Change-Id: I008eb3582135209e95778ef3c88df9564988b4c0
2020-09-22 19:03:04 -07:00
Hangyu Kuang
ee743d3238 Merge "transcoding: Add forClientUid in TranscodingRequest." 2020-09-23 00:19:00 +00:00
hkuang
9e0c251319 transcoding: Add forClientUid in TranscodingRequest.
This is used to let MediaProvider could specify the request is
on behalf of which client.

CTS-Coverage-Bug: 168990206

Bug: 154733526
Test: Unit test.
Change-Id: Id1a2c4cccff12dd1d979fa9350120e2ddad9ff5b
2020-09-23 00:04:21 +00:00
Treehugger Robot
c2fc48632c Merge changes from topic "exif-webp" am: b2356e4d98 am: 00ce3a3594 am: 67ddcd19b2 am: 24da2739c0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1431429

Change-Id: Ia056bf1146ae7271f509eec998037857fbbf8718
2020-09-22 22:20:42 +00:00
Jin Seok Park
9df6c43029 Remove hidden API usage in ExifInterface am: 40b7a9f873 am: b2df4e05d8 am: 3162dab673 am: 3ba5d7eb2b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1431428

Change-Id: I039f99eb337683a164e41f0e94cca4ec5fb2c66c
2020-09-22 22:20:35 +00:00
Ytai Ben-tsvi
45c5b1c7c4 Merge "Separate AIDL packages" 2020-09-22 22:19:51 +00:00
Zim
2ffc35f6b0 Implement TranscodingJob#toString
Bug: 158466177
Test: Manual
Change-Id: Ie850171c9e15193d112a945d85cbb4dfc6c1019c
2020-09-22 19:53:23 +01:00
Ytai Ben-Tsvi
da7c21ec51 Separate AIDL packages
This moves the android.media.audio.common, android.media.permission and
android.media.soundtrigger_middleware AIDL files to a their own
separate aidl_interface module for Java.

Previously, because of how the framework JAR is configured, those
files were automatically compiled into it and we had to disable Java
for this target, creating a discrepancy between C++ and Java, which
would require us to similarly diverge any dependent targets if we want
cross-language support.

As part of this change, we also had to switch from using the
FileDescriptor type to ParcelFileDescriptor, as this is the only type
supported outside of the framework JAR and is also the recommended
practice.

Test: Manual verification of basic soundtrigger functionality.
Change-Id: Ib65c19dd7c7f5433cfa527fa74bb61ac677f5cf5
2020-09-22 10:07:00 -07:00
Kyunglyul Hyun
0f7f7b4882 Merge "[Media ML] Add @JavaOnlyStableParcelable to media classes" 2020-09-22 06:41:07 +00:00
Jin Seok Park
1b7bcb4d4d Merge "Make addOnActiveSessionsChangedListener system API" 2020-09-22 05:43:59 +00:00
Jin Seok Park
aa7603470f Remove UnsupportedAppUsage from ExifInterface
UnsupportedAppUsage annotation should be removed before moving
ExifInterface to mainline.

1. Add publicAlternative param to annotation for the following
   variable so that the annotation can be removed after one
   successful main branch build (see http://shortn/_GPplGcAAB3 for
   context):
    mAttributes
2. Remove annotation for the following API since they do not
support reflection after Android P:
    sFormatter
    mFilename
    mHasThumbnail
    convertRationalLatLonToFloat(String rationalString, String ref)
3. Remove annotation and make public the following APIs:
    getDateTime()
    getDateTimeOriginal()
    getDateTimeDigitized()
    getGpsDateTime()

Bug: 159569444
Test: build &&
    atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: Ic2af9d53a9e7797d6c37b0367b0578dbf6e452ad
2020-09-22 13:10:26 +09:00
Kyunglyul Hyun
3a1e082c0d [Media ML] Add @JavaOnlyStableParcelable to media classes
For mainline module to receive parcelable classes not part of
the module (i.e. framework class) as argument,
they should be either structured parcelable or public/system api.

For the latter case, we need to mark them as @JavaOnlyStableParcelable
to ensure that they can be referenced safely.

This CL adds the annotation to AudioAttributes and MediaMetadata,
which are used by ISession, ISessionController,
and ISessionControllerCallback.

Bug: 169046322
Test: build successful
Change-Id: Id2abb9f6b31e5432a631cc11aa65eb7c356451eb
2020-09-22 11:17:43 +09:00
Ytai Ben-tsvi
189d6050da Merge changes from topic "new-perm"
* changes:
  Demote AlwaysOnHotwordDetector to SystemApi
  Sessionize VoiceInteractionManagerService
  Sessionize the SoundTriggerService layer.
  Use standard API in SoundTriggerTestApp
  Fix bug in dumpsys
  Require identity information in SoundTrigger.java
  Associate an originator identity to sessions
  Extract permission checking as a separate aspect
  Correctly handle HAL death
2020-09-21 19:07:04 +00:00
Jin Seok Park
fd08290755 Merge "Remove using File(FileDescriptor, boolean)" 2020-09-21 14:55:56 +00:00
Jin Seok Park
06e7d766be Remove using File(FileDescriptor, boolean)
Instead, manually close the duplicated file descriptor.

Bug: 159569444
Test: N/A
Change-Id: If6860791fff1b1794031922d9e0f936f3861cac5
2020-09-21 18:38:41 +09:00
TreeHugger Robot
ce90bb8595 Merge "Remove unnecessary imports" 2020-09-20 01:14:25 +00:00
Santiago Seifert
c6ffd8e165 Merge "Make SchemeInitData constructor public API" 2020-09-19 23:36:16 +00:00
Ivan Chiang
d0de93308b Merge "Revert "Ringtone uri should add type query"" am: 56da278127 am: 7a5e865a80 am: b145311a8d am: 3bff601a8a am: 3788ac124b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1429968

Change-Id: If5f2440d3c7621bc9ce9260e5f7d0ad3b5d71d65
2020-09-18 04:41:00 +00:00
Robert Chou
f8d921545b Merge "Ringtone uri should add type query" am: 96d98a9fad am: caf558ecdc am: 8e9f6c8db1 am: 53aa756a06 am: 7a38d00bc7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426651

Change-Id: Idce0ee0328004bcc5bcf6b0d930d5d52b7d8ce85
2020-09-18 03:22:10 +00:00
TreeHugger Robot
b735367f26 Merge "Camera: Clarify camera2 id usage when retrieving camcorder profiles" 2020-09-18 02:12:55 +00:00
Jin Seok Park
c6cf32b623 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
Merged-In: Ib6319e1b7b6711b071542d94ebfdc4a9f80e9c16
2020-09-17 16:43:34 -07:00
Jin Seok Park
40b7a9f873 Remove hidden API usage in ExifInterface
Copying over util class methods
ArrayUtils#startsWith(byte[], byte[])
Streams#copy(InputStream, OutputStream)
IoUtils#closeQuietly(AutoCloseable)

Bug: 159569080, Bug: 159569444, Bug: 159569092
Test: atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: I5f7f3387e88728809b55a0049fb1937a458d02cb
Merged-In: I5f7f3387e88728809b55a0049fb1937a458d02cb
2020-09-17 16:42:02 -07:00
Ivan Chiang
3788ac124b Merge "Revert "Ringtone uri should add type query"" am: 56da278127 am: 7a5e865a80 am: b145311a8d am: 3bff601a8a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1429968

Change-Id: I3df68434989ee8231db6adf41a203526be5027ab
2020-09-17 22:10:57 +00:00
hkuang
516eebe5c1 transcoding: Add retry api.
The retry api is used internally to retry the pending jobs
upon service die and also used by client to retry the failed job.

CTS-Coverage-Bug: 168805960

Bug: 161469320
Test: Unit test

Change-Id: I5c3f4d1d0e7a21cd2f802fdffe0e5b0566833328
2020-09-17 17:23:22 +00:00
Lev Proleev
689ff54e86 Revert "Ringtone uri should add type query"
This reverts commit 3b25df9ad3.

Reason for revert: potential culprit for test breakage: b/168789394

Change-Id: Ie042b91c189c026079b040f6609df4c22c70f2cf
2020-09-17 13:47:54 +00:00
Robert Chou
7a38d00bc7 Merge "Ringtone uri should add type query" am: 96d98a9fad am: caf558ecdc am: 8e9f6c8db1 am: 53aa756a06
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426651

Change-Id: I02b2f6d4c39c93d1c3b4be6583b58fa5c0f00060
2020-09-17 05:35:22 +00:00
Santiago Seifert
5702f662e7 Make SchemeInitData constructor public API
MediaParser (media mainline module) implements DrmInitData but
is forced to create instances by reflection because the
SchemeInitData constructor is hidden.

Bug: 158743263
Test: atest CtsMediaTestCases:android.media.cts.DrmInitDataTest
Change-Id: Icc1f2d32994f128580fabc641f3a23db36e7935a
2020-09-16 19:24:31 +00:00
Jin Seok Park
1d038a3979 Make addOnActiveSessionsChangedListener system API
Bug: 160666400
Test: m update-api; m;
Change-Id: I81607fdac856b783ecc433aa835c3bc1ea47055f
2020-09-17 00:08:23 +09:00
wan.li
3b25df9ad3 Ringtone uri should add type query
When only DisplayName is used to query the default ringtone,
the query may be incorrect, because other types of ringtones
may contain resources with the same name.

It should not happen that other types of ringtone uri are set
as the default ringtone of the current type by mistake.

Bug: 168431815

Change-Id: Ic37f879a658379179dc53715fa016631bb7309d9
2020-09-16 02:50:23 +00:00
jiabin
fcd4cbf4f4 Add package name when creating AudioTrack.
The package name will be used when starting external vibration. The
package name will be sent to vibrator service to check if the
application has the permission to start vibration,

Bug: 165910728
Bug: 162343845
Test: atest AudioTrackTest MediaPlayerTest
Test: start audio-coupled-haptic playback
Change-Id: I04b4711d11ab5f0f0716ea4c5e1c0f754fe834bb
Merged-In: I04b4711d11ab5f0f0716ea4c5e1c0f754fe834bb
2020-09-16 00:14:43 +00:00
jiabin
6e9cabd95e Add package name when creating AudioTrack.
The package name will be used when starting external vibration. The
package name will be sent to vibrator service to check if the
application has the permission to start vibration,

Bug: 165910728
Bug: 162343845
Test: atest AudioTrackTest MediaPlayerTest
Test: start audio-coupled-haptic playback
Change-Id: I04b4711d11ab5f0f0716ea4c5e1c0f754fe834bb
Merged-In: I04b4711d11ab5f0f0716ea4c5e1c0f754fe834bb
2020-09-15 18:03:17 +00:00
Emilian Peev
0173af0189 Add RAW_DEPTH10 image format
Add support for 10bit opaque and private RAW_DEPTH10 image format
which is similar to RAW_DEPTH.

Bug: 167250258
Test: Manual using camera application.
Change-Id: Ib2ee11570429d7a9a53e9dd6bc2042a1f5eaa760
2020-09-14 23:34:49 +00:00
Emilian Peev
cb8fcbd8f0 Camera: Clarify camera2 id usage when retrieving camcorder profiles
Clarify that camera2 ids can be used to query camcorder profiles as
long as the devices are capable of producing color output and are not
external.

Bug: 168527175
Test: make docs & check generated doc output.
Change-Id: Idf4bd3e71577b4fc72a164a2fe77caafdbd293ed
2020-09-14 14:03:03 -07:00
Santiago Seifert
ac1c170ad2 Remove unnecessary imports
Test: Manually built the tree.
Change-Id: Ic31adaa40164c01838e141fe7459ce6fa493fa08
2020-09-14 18:05:04 +01:00
Hayden Gomes
adf9c1f676 Merge "Define Auto coordinate system for mics" 2020-09-14 16:59:32 +00:00
TreeHugger Robot
7aa28d8f68 Merge "Make MediaSessionManager#RESULT_MEDIA_KEY_*HANDLED as @SystemApi" 2020-09-14 10:00:16 +00:00