Commit Graph

6666 Commits

Author SHA1 Message Date
android-build-team Robot
353a9bc4bf Merge "Fix documentation bug that breaks generation" into pi-dev 2018-04-27 23:46:07 +00:00
Marco Nelissen
bab75909fa Don't treat failed scans as valid media files
Instead, add them to the MediaProvider as non-media files.
Bug: 77656952
Test: manual, CTS

Change-Id: I3b72b3e28f481b6775349337588225daeacbe552
2018-04-25 14:39:04 -07:00
Jeff Tinker
af71bb69e1 Fix documentation bug that breaks generation
bug:78536565
Change-Id: Ic30762459e888c355e5995067377486b8ac34557

Test:make offline-sdk-docs
2018-04-25 19:22:59 +00:00
TreeHugger Robot
6cc4575ced Merge "ExifInterface: Prevent infinite loop" into pi-dev 2018-04-20 02:43:54 +00:00
Jin Seok Park
12e7aa5882 ExifInterface: Prevent infinite loop
A corrupted image file may create two problems.
1. A corrupted IFD pointer may point to an IFD that has already
been read, thus creating an infinite loop and a stack overflow.
2. A corrupted IFD offset value may have a negative value, thus
prompting a random reading of the file and creating an infinite
loop.
This CL addresses these issues.

Bug: 63800695
Test: Run cts (ExifInterfaceTest)
Change-Id: I706a0c3eae6af8301af69407333ea88e5681df3c
2018-04-20 10:36:00 +09:00
TreeHugger Robot
11d203ea0d Merge "Use heif embedded thumbnail if available" into pi-dev 2018-04-14 00:23:37 +00:00
TreeHugger Robot
fd3e190cbf Merge "Use system property to get the package name for media update" into pi-dev 2018-04-12 20:54:46 +00:00
TreeHugger Robot
ccaba49ab5 Merge "Change log level when microphone enumeration APIs native call fail." into pi-dev 2018-04-12 17:05:12 +00:00
TreeHugger Robot
773791a94c Merge "Fix missing video caps for HEIC type encoders" into pi-dev 2018-04-12 09:59:28 +00:00
TreeHugger Robot
ed01dfba3e Merge "Fix possible NPE in MediaSessionManager" into pi-dev 2018-04-12 06:51:52 +00:00
TreeHugger Robot
437b252c96 Merge "PlayerBase: fix deadlock" into pi-dev 2018-04-12 01:46:52 +00:00
Jean-Michel Trivi
76e124bcd3 PlayerBase: fix deadlock
Source of deadlock between PlayerBase.mLock and
  PlaybackActivityMonitor.mPlayerLock:

android.media.MediaPlayer.release()
> android.media.PlayerBase.baseRelease()
  > synchronized (mLock)
    > com.android.server.audio.PlaybackActivityMonitor.releasePlayer()
       > synchronized(mPlayerLock)
and:

com.android.server.audio.PlaybackActivityMonitor.unmutePlayersForCall()
> synchronized (mPlayerLock)
  > android.media.PlayerProxy.setVolume()
    > android.media.PlayerBase$IPlayerWrapper.setVolume()
      > android.media.PlayerBase.baseSetVolume()
        > synchronized (mLock)
          playerSetVolume()

Since system_server can have its own players, the calls to
 AudioService from PlayerBase can be synchronous, hence the
 deadlock.
The fix consists in never holding the lock in PlayerBase
 while calling into AudioService.
Refactor the playstate update into a method used for
 start / stop / pause.

Bug: 72294559
Test: see bug

Change-Id: I6451aa3bf19a0365472ba007b116a9e6151ab33e
2018-04-11 17:22:59 -07:00
Chong Zhang
7d12714020 Use heif embedded thumbnail if available
Use the heif embedded thumbnail as long as it's not
too small to avoid decoding the full image and downscale.

bug: 74395267
Test: CTS MediaMetadataRetriever test; manual test of thumbnail
extraction by browsing new folders containing heif files in
Downloads app.
Change-Id: I5b2be0521452376153a773cb7671fefe7f9bc439
2018-04-12 00:08:57 +00:00
jiabin
a26a76230f Change log level when microphone enumeration APIs native call fail.
For microphone enumeration APIs, it could fail due to hal v2,
which is WAI. We shouldn't log as error. Using warning instead.

Bug: 64038649
Test: build
Change-Id: I1a64b8537e27e712a09f122d4763e0e5a345b08f
2018-04-11 16:18:51 -07:00
TreeHugger Robot
fb052cc3c0 Merge "BufferingParams: add annotation @TestApi" into pi-dev 2018-04-11 18:01:24 +00:00
Chong Zhang
93cf8b260e Fix missing video caps for HEIC type encoders
Bug: 63633199
Bug: 74343403
Change-Id: If1faff529aadce62566fe45a8b758e574e215154
2018-04-11 10:29:12 -07:00
TreeHugger Robot
0b5dd8e560 Merge "Fix mic enumeration CTS fail on marlin." into pi-dev 2018-04-11 15:46:49 +00:00
Sungsoo Lim
3715ec579a Fix possible NPE in MediaSessionManager
Bug: 77885219
Test: build
Change-Id: Id20dd73f00521beeccd4704f722547ba32bb5722
2018-04-11 17:16:15 +09:00
jiabin
d0be5b212f Fix mic enumeration CTS fail on marlin.
The mic enumeration APIs only support on audio hal v4. Marlin failed due
to on audio hal v2. Make the APIs return mic with unknown
characteristics if the native call fail.

Bug: 77732156
Bug: 77732289
Test: run cts on marlin and walleye
Change-Id: I64b3e6a249ad76b754e841d630e8cf178dde9a86
2018-04-10 14:44:41 -07:00
Wei Jia
5d78d87493 BufferingParams: add annotation @TestApi
Test: CTS test passed
Bug: 77723586
Change-Id: I3811f16380f6465f884d6dd84ce969a0a5886107
2018-04-10 10:45:44 -07:00
Jean-Michel Trivi
6d38a1b260 AudioAttributes: handle unknown usage like media
In the native audio policy management, the default stream type
  for volume is STREAM_MUSIC, i.e. any player by default is
  considered a "media" player. Do the same for audio attributes
  with regards to suppressible behaviors.

Bug: 74052135
Test: ZenModeHelperTest + see bug
Change-Id: I8f65044807fd3e745f21e031a0aa01a5e6f74cd2
2018-04-09 21:24:25 +00:00
Andy Hung
8ec4be4be9 PlaybackParams: Add @TestApi annotation to access stretch mode
Required due to CTS access restrictions in P.

Test: CTS ParamsTest
Bug: 77723867
Change-Id: I68b5fbc2096d5d1cb01c60fe1028def5ecfe2959
2018-04-06 19:23:53 -07:00
Jean-Michel Trivi
d043c3aba0 AudioFocusRequest: getOnAudioFocusChangeListener in test API
Bug: 77651038
Test: CTS AudioFocusTest
Change-Id: I071057f1ed0ed6c56c16182a48191d763d408ae1
2018-04-06 16:59:21 -07:00
Mikhail Naganov
436ee82422 AudioPresentation: Replace @VisibleForTesting with @TestApi
This is to fix CTS tests failures.

Bug: 77715867
Test: make
Change-Id: I99a5ff8fab208a0e1f2e889cb7ad256e6ba08437
2018-04-06 13:30:28 -07:00
Andy Hung
320c1ade67 Merge "Add TestApi annotation to AudioEffect, AudioFormat, VolumeShaper" into pi-dev 2018-04-06 18:19:48 +00:00
TreeHugger Robot
893c5e0c70 Merge "media: Populate Image scaling mode in reader and writer" into pi-dev 2018-04-06 17:06:44 +00:00
Emilian Peev
750aec6f3b media: Populate Image scaling mode in reader and writer
"ImageReader" and "ImageWriter" must pass information about the
specific buffer scaling mode.

Bug: 76022384
Test: Manual using application,
Camera CTS

Change-Id: I116f00cbf3b1487d8e44661e8fd15e2aa16e6e0d
2018-04-06 13:01:45 +01:00
TreeHugger Robot
0c42369361 Merge "Extract exif data from mp4 extractor if available" into pi-dev 2018-04-06 05:13:33 +00:00
Andy Hung
3ce023b02e Add TestApi annotation to AudioEffect, AudioFormat, VolumeShaper
Test: AudioEffectTest
Test: AudioRecordTest
Test: AudioTrackTest
Test: AudioTrackSurroundTest
Test: AudioTrack_ListenerTest
Test: BassBoostTest
Test: EnvReverbTest
Test: EqualizerTest
Test: LoudnessEnhancerTest
Test: PresetReverbTest
Test: VirtualizerTest
Test: VisualizerTest
Test: VolumeShaperTest
Bug: 77652246
Bug: 77651563
Bug: 77652497
Change-Id: I3a95cb6834fac0cd0cb88ea3ed0ba028aeddb3f2
2018-04-05 20:28:33 -07:00
Dongwon Kang
4a649366d5 Use system property to get the package name for media update
Also, disabled updatable apk usage on Media2 APIs since
they are hidden and they shouldn't be used in P.

Test: build and boot on aosp and non-aosp build
Bug: 67908547
Change-Id: Ic93cc0f07604020ec47be25725b05af8a9794572
2018-04-05 16:45:05 -07:00
TreeHugger Robot
d8a6f0cd94 Merge "Add @TestApi for field needed for test" into pi-dev 2018-04-05 20:41:24 +00:00
Chong Zhang
2cc0a2eca9 Extract exif data from mp4 extractor if available
Query the extractor for the exif data offset and length,
if it's available, read the exif block from the file.
Otherwise, set image dimension and rotation only.

bug: 76149934

Change-Id: I85f24b526fb356a9227941e20807fc96369c8536
2018-04-05 11:25:45 -07:00
Marco Nelissen
a7de449356 Add @TestApi for field needed for test
Also update truncated comment.
Bug: 13249737
Bug: 77485791
Test: CTS

Change-Id: I1351a6ef28dfd7e881f32830c436315ffdbfffaa
2018-04-05 16:43:06 +00:00
Dongwon Kang
b9c661f79f Merge "Add OnMediaTimeDiscontinuity notification" into pi-dev 2018-04-05 16:33:39 +00:00
TreeHugger Robot
8a585a6f1f Merge "MediaController: Fix annotation of Callback#onPlaybackStateChanged()" into pi-dev 2018-04-05 10:03:22 +00:00
TreeHugger Robot
628f59aa45 Merge "MediaSessionManager: Apply API council review" into pi-dev 2018-04-05 05:25:15 +00:00
Jaewan Kim
532a992e9b MediaController: Fix annotation of Callback#onPlaybackStateChanged()
PlaybackState can be null and it's annotated as @Nullable in other
places. So we'd better to fix the annotation.

Bug: 77532207
Test: Run CtsMediaTestCases
Change-Id: I8974c6c99d9d188934f74775977631fb7b37e5d2
2018-04-05 11:13:38 +09:00
Jean-Michel Trivi
9a30362790 MediaCodecInfo: define AACObjectXHE profile level
Bug: 71430241
Test: CTS DecoderTest and DecoderTestAacDrc
Change-Id: I03ede882db420eeaa871991d1d5cba8955b2cdba
2018-04-04 14:16:40 -07:00
Dongwon Kang
2fab5bfb7b Add OnMediaTimeDiscontinuity notification
Test: MediaPlayerTest
Bug: 63934228
Change-Id: I1914f32867416c5c052b6ae3bfe23e597fb314e4
2018-04-04 09:54:14 -07:00
Jaewan Kim
03cba65b91 MediaSessionManager: Apply API council review
Here's the comments from the review
  - RemoteUserInfo needs to override .hashCode() as well
  - Verify package name and the UID in the RemoteUserInfo
  - Docs: Document how to get RemoteUserInfo
  - Docs: Document that RemoteUserInfo is only valid on thread that the
          command is being called from
    * It's already documented in the
      MediaSession#getCurrentControllerInfo() and
      MediaBrowserService#getCurrentBrowserInfo().

Bug: 77507337
Test: Run following CtsMediaTestCases
  - MediaBrowserTest
  - MediaBrowserServiceTest
  - MediaControllerTest
Change-Id: If37560a7bc59d1ef5517ec1f3e0a8b74c2bb2980
2018-04-04 19:13:59 +09:00
Hongwei Wang
1b322dd042 Adds comment how to deal with newly added audio usage
Bug: 77547740
Test: adb shell dumpsys media.audio_policy
Change-Id: If0d9f1d0ac2205900532cb9f761746ce4d164d32
2018-04-03 16:22:06 -07:00
TreeHugger Robot
1c967fe075 Merge "Updates MediaDrm developer docs" into pi-dev 2018-04-02 20:00:46 +00:00
Jeff Tinker
1e034fd2ed Updates MediaDrm developer docs
Distinguish between secure stops and secure stop ids

bug:76449152
Change-Id: I4ff26b645bd4a156738ba358de598e2ccb1b0584
2018-03-30 17:38:56 -07:00
TreeHugger Robot
d41d56e348 Merge "Dynamics Processing Effect" into pi-dev 2018-03-31 00:05:32 +00:00
Rahul Frias
1b7162ad3d Merge "Clarified app behavior on REQUEST_TYPE_NONE" into pi-dev 2018-03-30 20:33:24 +00:00
rago
1584bb80ce Dynamics Processing Effect
Fixing parameter integration with Dynamics Processing engine.

Bug: 64161702
Bug: 38266419

Test: manual testing and CTS tests
Change-Id: I0ff66d6fd60f2854aa93a45044cfa91c7ef344b3
2018-03-30 11:50:22 -07:00
TreeHugger Robot
cfe67aa575 Merge "Make back mic available when getting all available mic." into pi-dev 2018-03-30 16:59:41 +00:00
Rahul Frias
a0cbc6f6b0 Clarified app behavior on REQUEST_TYPE_NONE
Indicated that when this request type is returned in response
to a getKeyRequest no license exchange is required and
the key is available for use.

Bug: 73750909
Test: javadocs change only. Compiled Sailfish.
Change-Id: I4f124158160bf7e74f0228788c7b24bcefbb5dd0
2018-03-30 02:11:09 +00:00
Dongwon Kang
b814355d17 Merge "Unhide MediaPlayer#MEDIA_INFO_STARTED_AS_NEXT" into pi-dev 2018-03-30 01:25:59 +00:00
Dongwon Kang
2492c00ae3 Unhide MediaPlayer#MEDIA_INFO_STARTED_AS_NEXT
Expose a listener constant which is used with OnInfoListener() in
order to notify that the player instance started the playback since
previous player just completed the playback.

Bug: 76121592
Test: make offline-sdk-docs
Change-Id: I69ade8e9f6916bc653ea2831e3721dc7d171dc0e
2018-03-29 15:14:26 -07:00