Commit Graph

6194 Commits

Author SHA1 Message Date
Christofer Åkersten
cfa037065e Initial commit of updatable media API
Test: Created instance & called method
Change-Id: I85f6ea946ef7886abe496b7a851d5b6d50e235b5
2018-01-04 20:50:24 +09:00
Jiyong Park
5a8940a338 Remove @SystemApi from inherited methods of AudioFocusInfo
Since the inherited methods hashCode and equals from the class Object is
already a public API, they don't need to be marked as SystemApi; they
haven't been appear in system-current.txt.

Having annotation on such members hasn't been harmful,
but will soon trigger CTS failures when we do the exact match for
SystemAPIs; a runtime entity annotated as @SystemApi have to exist in
the documented API (e.g. system-current.txt). So, removing the bogus
annotations.

Bug: 67891551
Test: m -j does not require m update-system-api
Change-Id: I40d60ed524d660f47b5c569980c28c6f0bd83db9
2018-01-03 11:13:29 +09:00
Jean-Michel Trivi
7be17d26e0 New intent for microphone mute change notification
AudioManager: define ACTION_MICROPHONE_MUTE_CHANGED.
AudioService:
 - broadcast intent when setMicrophoneMute() is called
   with FLAG_RECEIVER_REGISTERED_ONLY.
 - remove outdated (invalid) comments.

Bug: 70857126
Test: m -j ; make -j offline-sdk-docs ; make -j cts ; \
      cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.AudioManagerTest#testMicrophoneMuteIntent

Change-Id: I7391522f0195d06592e4f853e9b672fdec66d37a
2017-12-22 18:32:05 -08:00
Jean-Michel Trivi
8e7aca3819 AudioManager: add method to query stream attenuations in dB
AudioManager: new methods in SDK for querying:
 - the minimum volume index
 - the volume in dB for a given index on a given device type

Bug: 64844598
Test: cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.AudioManagerTest
Change-Id: Iac999e7676643272820a4f1f4a32cf3a781ab7cd
2017-12-20 16:54:50 -08:00
Jerry Zhang
f9c5c2574d Add MtpStorageManager for monitoring filesystem events
MtpStorageManager keeps track of file information and
send notifications for new files. MtpDatabase now uses
this instead of MediaProvider for getting object information,
although some operations are still reflected into MP.

Since MtpStorageManager handles storage ids, remove
that field from StorageVolume and VolumeInfo.

Clean up a lot of the jni code for MtpDatabase.

Bug: 63143623
Test: Test every MtpOperation in a variety of situations on Linux and
Windows. Also use the shell to manipulate files. Verify that the cache
is consistent throughout, and the operations behave as expected. Verify
files created by the shell appear.
Test: adb shell am instrument -w android.mtp /android.support.test.runner.AndroidJUnitRunner
Change-Id: Id4ea810047b0c323399cd833047733e5daafb30a
2017-12-15 00:59:41 +00:00
Hongwei Wang
dd241da282 Adds getPort (hidden) to AudioDeviceInfo class
Motivation of this change:

In CarAudioService, we enumerate the AudioDeviceInfo on device via
AudioManager.getDevices(). The AudioDeviceInfo would be used to
construct the dynamic routing via AudioMix.Builder, which accepts
AudioDeviceInfo.

Meanwhile, we wire also the volume change to hal via
AudioManager.setAudioPortConfig(), which accepts AudioPort.

Bug: 65751827
Test: lunch bat_land-userdebug && m -j
Change-Id: I438cfd61e502340def5376fe373a296ab69ff86e
2017-12-12 19:35:28 +00:00
Jeff Sharkey
27674aedc0 Merge "Add auto-doc support for @StringDef." 2017-12-11 16:47:13 +00:00
Tor Norbye
f740c7ea08 Switch @IntDef from long to int, and add @LongDef
This CL mirrors changes made to the android.support.annotation version
of IntDef, to keep the usage and semantics identical (though the
internal version of @IntDef and @LongDef are of course hidden and not
part of the SDK.)

Test: These annotations have source retention and therefore have
no runtime impact; the change was compiling the SDK.

Change-Id: Idaf47e8d983c88be1bd8f938615c86611014b45a
2017-12-08 20:54:50 -08:00
Jeff Sharkey
5db9a91135 Add auto-doc support for @StringDef.
Behaves pretty much the same as @IntDef, but now supports "suffix"
in addition to "prefix" when matching constants.

Test: manual docs output looks sane
Bug: 70406696
Change-Id: I35064b0f9f36f1f13ccdb40302d818a004014f15
2017-12-08 17:33:40 -07:00
kyle_tso
4c53804386 Merge "Support scanDirectories with JNI callback function" am: 5747c2b81c am: 34be883ebd
am: baa1210d25

Change-Id: I7145485a3ae3ae3791e8aaefed650874fd41887e
2017-12-06 03:53:46 +00:00
kyle_tso
baa1210d25 Merge "Support scanDirectories with JNI callback function" am: 5747c2b81c
am: 34be883ebd

Change-Id: I57a54d520cd953c7b99e6815e7894421166368d4
2017-12-06 03:42:11 +00:00
kyle_tso
34be883ebd Merge "Support scanDirectories with JNI callback function"
am: 5747c2b81c

Change-Id: I8996fb568c4024ccf76a5643049de8cee6f811c6
2017-12-06 03:22:30 +00:00
Andrew Solovay
8f9c1631c5 Merge "docs: Add note to getFrameAtTime() pointing to getScaledFrameAtTime()" into oc-mr1-dev am: 284259a633
am: dd71b1bc61

Change-Id: Ib3f40c78449e6b4e837d053645a9cd9f3ab29ee4
2017-12-01 19:38:03 +00:00
Andrew Solovay
dd71b1bc61 Merge "docs: Add note to getFrameAtTime() pointing to getScaledFrameAtTime()" into oc-mr1-dev
am: 284259a633

Change-Id: Ic8c9f91f1fc1e6c32bae90d8bf8fbe6b91beb712
2017-12-01 19:29:13 +00:00
Andrew Solovay
d1be47c3e9 docs: Add note to getFrameAtTime() pointing to getScaledFrameAtTime()
Added a note to the various getFrame... methods saying that if you
don't need a full-resolution frame, getScaledFrameAtTime() is
preferable. Removed existing text suggesting you use those other
methods for fetching a thumbnail.

Staged revised doc to:

http://go/dac-stage/reference/android/media/MediaMetadataRetriever.html

Bug: 69804003
Test: make ds-docs
Change-Id: I54250b2d127987ef3c1633c011f5eac6b747372e
2017-11-30 15:55:53 -08:00
TreeHugger Robot
54c43f46fc Merge "Make native AudioRouting Handler in a seperate class." 2017-11-30 18:17:55 +00:00
Nadav Bar
108e94d9b0 Merge "Enabled the use of VOICE_DOWNLINK, VOICE_UPLINK and VOICE_CALL as audio sources for AudioRecord (Only supported for system apps)" 2017-11-30 16:28:17 +00:00
TreeHugger Robot
a3dcd16044 Merge "ImageReader: Make discardFreeBuffers public" 2017-11-30 01:28:59 +00:00
jiabin
9070e29586 Make native AudioRouting Handler in a seperate class.
Bug: 64038649
Test: runtest --path cts/tests/tests/media/src/android/media/cts/RoutingTest.java
Change-Id: I2fc64e177797b2541ba8652d54827f08fd6ca216
2017-11-29 15:20:44 -08:00
Chien-Yu Chen
5fb64cdae7 ImageReader: Make discardFreeBuffers public
Test: CTS
Bug: 64847201
Change-Id: I61008111552b5ca4641a509e5bcf5cf821582d5e
2017-11-29 14:13:01 -08:00
jiabin
fe3e6024ed Add AudioRouting interface in MediaRecorder.
Bug: 64038649
Test: Run cts in RoutingTest
      Switching input device when using MediaRecorder

Change-Id: I3f2a9f670565c6e55d612c1477a505fa3d096e3d
2017-11-28 17:25:46 -08:00
Jeff Sharkey
c204c223a7 Deeper sanity checking of emitted types.
When emitting a method or field, verify that we're able to reference
all mentioned types.  This ensures that we don't accidentally
reference undefined classes/interfaces.

Test: manual inspection of API files
Bug: 69791141
Change-Id: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
2017-11-27 17:07:40 -07:00
Jeff Sharkey
9650a435ed Massage APIs for upcoming doclava change.
These changes are needed to ensure that "checkapi" doesn't claim
that we're changing the API after an upcoming doclava change.

Test: manual inspection of API text files
Bug: 69505783
Change-Id: I8292ba80cc65b7dd78f0e9dba4fcc7ffcedfab9c
2017-11-22 12:28:09 -07:00
kyle_tso
b4aa69fd11 Support scanDirectories with JNI callback function
MtpServer needs this function to update the database for directory
copy operation.

Test: Call this function from MtpServer and database is updated in
directory copy scenario.

Change-Id: I9b316f4dbf7f35922292c33ab02f9efebc867aa8
Signed-off-by: kyle_tso <kyle_tso@htc.com>
2017-11-22 20:30:42 +08:00
TreeHugger Robot
56cc25489e Merge "heif: add muxer support for heic tracks" 2017-11-22 03:37:55 +00:00
Chong Zhang
e70785fac6 heif: add muxer support for heic tracks
bug: 63633199

Change-Id: I367b29ae86be4e7d365fbfb66ca1cc463eb77571
2017-11-21 15:27:44 -08:00
Nadav Bar
33f4f68ba2 Enabled the use of VOICE_DOWNLINK, VOICE_UPLINK and VOICE_CALL as audio sources for AudioRecord (Only supported for system apps)
Change-Id: Id75e9cfdccd1f2a92e50a5f475314361c45d8abf
Test: Tested manually.
2017-11-21 12:27:44 +02:00
TreeHugger Robot
164d43002f Merge "Minor comment and formatting cleanup" 2017-11-17 21:53:01 +00:00
Ajay Panicker
6de445ab43 Merge "Add MediaMetadata equals to make metadata comparisons easier" am: 12bc5b6289 am: 171dec7468
am: 6ba5159291

Change-Id: I75138e80effdebee9ec699065360d3e5cc291775
2017-11-16 23:12:23 +00:00
Ajay Panicker
171dec7468 Merge "Add MediaMetadata equals to make metadata comparisons easier"
am: 12bc5b6289

Change-Id: Ie622564ba02ec7a39d8f3574ea8885b225596c67
2017-11-16 22:53:19 +00:00
Ajay Panicker
6e1d2307a8 Add MediaMetadata equals to make metadata comparisons easier
Bug: 68854188
Test: Compare two metadata objects with the same title, album, and
artist
Change-Id: I89d1944bf237f8f3f1c52ccdb8ff385422b19070
2017-11-16 20:04:37 +00:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Wei Jia
49ca7252e4 MediaPlayer: simplify buffering control.
Test: pass cts tests
Bug: 36280094
Change-Id: If1e2dac511d038b88f7e867eb7ff8b345cb04478
2017-11-12 15:07:00 -08:00
Beverly
e2d9a23114 DND behavior system sounds cannot bypass DND
If media & system feedback is not allowed to bypass DND
(set in Do Not Disturb Behavior Settings), then touch sounds
and lock screen sounds cannot play sounds.

Bug: 69062790
Test: runtest -x frameworks/base/services/tests/notification/src/com/android/server/notification/ZenModeHelperTest.java
Change-Id: Ic599f61d73d06d0616e5a247c537ff35487b5449
2017-11-10 14:02:51 -05:00
Jeff Tinker
1747ff12ca Minor comment and formatting cleanup
No functional changes

Change-Id: Ifb0969620f150947c533444664e3e0cd6a3d8004
2017-11-03 17:00:22 -07:00
TreeHugger Robot
f8a6f1da8f Merge "Add AudioRouting interface in MediaPlayer" 2017-11-03 19:54:39 +00:00
TreeHugger Robot
416a66cd6c Merge "Fix exception on MediaDrm invalid property access" 2017-11-03 07:52:50 +00:00
Jeff Tinker
eb13c764c6 Fix exception on MediaDrm invalid property access
Accessing an invalid MediaDrm property would result in
an IllegalStateException.  This change causes
IllegalArgumentException to be thrown instead, which
is more appropriate.

Test: android.media.cts.ClearKeySystemTest passes
  and it fails prior to this CL.

bug:68765217
Change-Id: I858575dc8fe643a88381da49b543c5cc0d266e02
2017-11-02 18:13:02 +00:00
jiabin
6e5a628ab6 Add AudioRouting interface in MediaPlayer
Bug: b/64038649
Test: Run cts in RoutingTest
      && switch output device when using MediaPlayer playing music/video

Change-Id: I48dcfd40c3a6ce01c818f6268cc86ed02b7eaa58
2017-11-01 09:53:17 -07:00
Chong Zhang
869d1234d6 ExifInterface: prefer metadata from image track
If the file has both image and video, prefer image info over
video info. App querying ExifInterface is most likely using
the bitmap path which picks the image first.

bug: 63633199

Test:
tested querying the rotation info in own test app.

Change-Id: I955b27c2ad699d4895e171053ea27b62e779db2b
2017-10-31 12:28:22 -07:00
Chong Zhang
4342f08fab heif: support heif image sequence and dual-function files
- Add a few methods to MediaMetadataRetriever to get still
  images and frames by index.

- Declare keys in MediaFormat related to heif still images.

bug: 63633199

test:
cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice

Change-Id: I9556b27f7395a163aadd01e979930061878994d0
2017-10-30 19:59:43 +00:00
Jaesung Chung
ff50e248e5 Make media projection permission dialog configurable
This CL introduces the new config_mediaProjectPermissionDialogComponent
symbol to specify the dialog component of media project permission
dialog. With this CL, IoT devices will be able to use the other dialog
in the IoT system UI app instead of the default dialog in the system UI
app.

Bug: 65864256
Test: android.view.cts.SurfaceViewSyncTest
Change-Id: I0684372757a00ddf173fc16e4a29f1e181cc1e8f
2017-10-20 15:44:57 +09:00
TreeHugger Robot
2f072ad2a4 Merge "mididocs: clarify direction and add BLE-MIDI link" 2017-10-19 23:20:52 +00:00
Jerry Zhang
008585f7d5 Merge "Add storageId to moveObjects" am: 1f4f6d2a18 am: 18abf57e99 am: 59ff05a59f
am: 3b997d0773

Change-Id: I93d06954ceb4942e3efdbd9e5ce2ddb25dee8ab7
2017-10-19 18:48:11 +00:00
Jerry Zhang
3b997d0773 Merge "Add storageId to moveObjects" am: 1f4f6d2a18 am: 18abf57e99
am: 59ff05a59f

Change-Id: I024be0c75e20e58152dbe0c81e5548d70f06a925
2017-10-19 18:36:22 +00:00
Jerry Zhang
18abf57e99 Merge "Add storageId to moveObjects"
am: 1f4f6d2a18

Change-Id: Id4f53fc283850d8f93cde7e67581355dc50e595e
2017-10-19 18:11:49 +00:00
Jerry Zhang
1f4f6d2a18 Merge "Add storageId to moveObjects" 2017-10-19 17:55:34 +00:00
Tobias Thierer
301bf35e2d resolve merge conflicts of 5c9e47d28b to oc-mr1-dev-plus-aosp
Test: This merge conflict was automatically resolved by meld.
      The automatic resolution of the same merge conflict by meld
      from cherrypicking this CL into internal-master has passed
      Treehugger (and was already submitted).
Exempt-From-Owner-Approval: Resolving merge conflicts with no deltas
Change-Id: I61f15aeb79c1ad26cc7c51be2af59ecb7b672a7b
2017-10-19 15:33:17 +00:00
Tobias Thierer
07efe116b1 Merge "Framework: Prefer android.system.Os over libcore.io.Libcore.os"
am: 5f04db96b3

Change-Id: If85216d03022708787a7218e494434453d5548e3
2017-10-19 14:25:12 +00:00
Joachim Sauer
208f0970d5 Merge "Framework: Prefer android.system.Os over libcore.io.Libcore.os" 2017-10-19 11:48:58 +00:00