Commit Graph

6820 Commits

Author SHA1 Message Date
Jerry Zhang
acc0043abd Merge "Call access(2) on all files/dirs modified by Mtp" into pi-dev am: 01f41f96fe
am: 73e4d170c5

Change-Id: I12a754ef36e72a3913d641012da3b0419e64c161
2018-05-15 15:42:03 -07:00
Jerry Zhang
c5c75c8be9 Merge "Access removable volumes through /mnt/media_rw" into pi-dev am: 1e62b676d9
am: 9e1d134556

Change-Id: I68bf226aaf424c9f0e7e54fe7817050ab6d4208c
2018-05-15 15:37:21 -07:00
Jiabin Huang
2709d470a1 Merge "Add support for manually set surround formats." into pi-dev am: eddc0d712c
am: bccbeb1bbb

Change-Id: I5bdce8b1103c970fd515028e48336fc26b9f2fbd
2018-05-15 14:51:25 -07:00
Jerry Zhang
01f41f96fe Merge "Call access(2) on all files/dirs modified by Mtp" into pi-dev 2018-05-15 21:35:43 +00:00
Jerry Zhang
1e62b676d9 Merge "Access removable volumes through /mnt/media_rw" into pi-dev 2018-05-15 21:35:43 +00:00
Jiabin Huang
eddc0d712c Merge "Add support for manually set surround formats." into pi-dev 2018-05-15 20:54:27 +00:00
Jerry Zhang
d470a1eca6 Call access(2) on all files/dirs modified by Mtp
External sdcards are accessed through /mnt/media_rw,
so access() each touched file for sdcardfs to update
its metadata.

Java handles single object renames directly so that
is the only place where it is needed.

Bug: 77849654
Test: use mtp with emulated sdcard
Change-Id: Ie460398010f1fe74d8084808a6333b121674362c
2018-05-15 12:29:13 -07:00
jiabin
3994075a5b Add support for manually set surround formats.
To make surround sound setting more clear to users, we are changing
surround setting from ALWAYS to MANUAL. With MANUAL, users could enable
surround formats according to their need.

Bug: 67479735
Test: Try creating AudioTrack with enable/disable surround formats.
Change-Id: I79e610f6c43d7003daf13da3bee4e03ba9b6ea87
2018-05-15 10:10:47 -07:00
Jerry Zhang
71938e18ca Access removable volumes through /mnt/media_rw
Due to permissions changes, we now need to access
the underlying filesystem of removable devices in
order to get write access.

Add internalPath to StorageVolume, and have VolumeInfo
set the field on creation.

Bug: 77849654
Test: Can write to emulated sdcard through MTP
Change-Id: I63302ecf2dd2600a1c9f3f6ab106c3695654cbaa
2018-05-14 11:39:12 -07:00
Michael Dooley
952def581d Merge "Don't crash if SoundTriggerDetectionService client is gone or if there is a remote exception while finishing an opperation" into pi-dev am: 74b6863504
am: ce408cbce7

Change-Id: Ibb990f69745fd90b9d8a9739cc57b41cc5b87e17
2018-05-11 12:32:58 -07:00
Michael Dooley
74b6863504 Merge "Don't crash if SoundTriggerDetectionService client is gone or if there is a remote exception while finishing an opperation" into pi-dev 2018-05-11 17:46:41 +00:00
Chong Zhang
126c2b7f1c Merge "Fix failure in ExifInterface on certain HEIF files" into pi-dev am: a3a74591b7
am: e47d650111

Change-Id: I8ff7b96cc5f49598630575448fa3f2bad781131d
2018-05-10 16:46:09 -07:00
TreeHugger Robot
a3a74591b7 Merge "Fix failure in ExifInterface on certain HEIF files" into pi-dev 2018-05-10 22:03:41 +00:00
Jaewan Kim
8c65f9b68a Merge "MediaSessionService: Provide caller information for media key events" into pi-dev am: 183a63474f
am: 399a7e999c

Change-Id: I7282bf70bfb59ed9d9d81f5780bd49090bb252c6
2018-05-09 22:13:52 -07:00
Jaewan Kim
183a63474f Merge "MediaSessionService: Provide caller information for media key events" into pi-dev 2018-05-10 04:48:35 +00:00
Chong Zhang
64eeef77ee Fix failure in ExifInterface on certain HEIF files
Some sniffers in MediaExtractor might issue reads past the end of
the file. This results in IOException in our MediaDataSource. The
exception itself is not fatal, but need to make sure MediaDataSource
state is kept in sync otherwise the other extractors can't continue.

Bug: 79497983
Test: test the ExifInterface on the attached file in bug, as well as
      selected HEIF files from other devices, Exif should be extracted
      without error in the log.

Change-Id: I5c8f597b8ef14288e3465670b202adc93c09e6ea
2018-05-09 18:52:01 -07:00
mike dooley
be30661349 Don't crash if SoundTriggerDetectionService client is gone
or if there is a remote exception while finishing an opperation

Test: built
Bug: 78137044
Change-Id: I4bc92f8688c2269178d101d95946f4835ab7c6a5
2018-05-09 13:53:48 +02:00
Jaewan Kim
77748b623c MediaSessionService: Provide caller information for media key events
Current limitation is that we cannot distinguish between key events
from Window#injectInputEvent() and key presses from physical devices.

Bug: 79185725
Test: Manually verified with the test app, and Cts
Change-Id: I1c3da4a963238512eec8b57fbc2d825c7436b140
2018-05-08 15:53:00 +09:00
Jean-Michel Trivi
3c417cdbcc Merge "AudioFocusRequest: fix doc for focus listener dispatch" into pi-dev am: 7d32a1e045
am: 3b413dbd11

Change-Id: I6af73b09fbdfbbcb3dc901240329ccbc512cba7e
2018-05-07 19:13:19 -07:00
Jean-Michel Trivi
7d32a1e045 Merge "AudioFocusRequest: fix doc for focus listener dispatch" into pi-dev 2018-05-08 00:53:02 +00:00
android-build-team Robot
6aae977239 Merge "Bluetooth: Fix HFP SCO logic and documentation" into pi-dev am: 1ae21127da
am: e3e55b865b

Change-Id: Ic45224f318646958574fd624ee228c8938e1a814
2018-05-07 13:03:22 -07:00
Jack He
89f979849a Bluetooth: Fix HFP SCO logic and documentation
AudioService:
* Call setBtScoActiveDevice and setBluetoothScoOn both in AudioService's
  broadcast receiver so that these two methods must be triggerred in
  the same sequence as ACTIVE_DEVICE_CHANGED and AUDIO_STATE_CHANGED
  intents are sent and we no longer need to handle race condition by
  synchronously checking active device in setBluetoothScoOn
* Default sco audio mode when no headset is active should be virtual
  voice call, as many HFP devices do not accept SCO audio without an
  ongoing call
* Synchronize checkScoAudioState() method with mScoClients
* Add helper functions connectBluetoothScoHelper and
  disconnectBluetoothScoHelper to call various SCO setup and tear down
  methods based on sco audio mode
* Try raw, virtual call, and voice recognition mode when disconnecting
  externally started SCO
* Add new sco state SCO_STATE_DEACTIVATING to allow back to back calling
  of startBluetoothSco and stopBluetoothSco

Audio Manager:
* Modified AudioManager logic so that removed devices callback is called
  before newly added devices

BluetoothHeadset:
* Modified BluetoothHeadset so that start and stop SCO using virtual
  voice call no longer need a parameter and will use active device by
  default
* Modified documentation around various sco mangement APIs to match
  their expected behaviors

Bug: 76114959
Test: VoIP calls sanity test cases
Change-Id: Id50db88f4ff36069b0f392c81dd9d90c24cd2206
2018-05-04 19:49:49 -07:00
Jean-Michel Trivi
15c1da270b AudioFocusRequest: fix doc for focus listener dispatch
Bug: 78617702
Test: make offline-sdk-docs
Change-Id: I6eeacfdc309f76295276e271bb5700ec6f89148a
2018-05-04 18:16:11 -07:00
android-build-team Robot
65253b5144 Merge "Fix documentation bug that breaks generation" into pi-dev am: 353a9bc4bf
am: 021e9e8f35

Change-Id: I77a55b4ed47b5eeb174b99a662e32fb593d7ec10
2018-04-27 17:07:32 -07:00
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
8be6c780e3 Merge "Don't treat failed scans as valid media files" into pi-dev am: e4dc997cf6
am: fdfeece6f9

Change-Id: I59e7877ac1da0b4c0f8ce13ecfd291d6e6ed4863
2018-04-27 14:53:45 -07: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
TreeHugger Robot
63b534768e Merge "Remove PendingIntent based soundTrigger" 2018-04-25 21:29:06 +00: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
Jin Seok Park
e164543267 Merge "ExifInterface: Prevent infinite loop" into pi-dev am: 6cc4575ced
am: bedf1e4560

Change-Id: I68a6e502817d30443a69edc228b5ba803918f086
2018-04-19 20:24:36 -07: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
Chong Zhang
9216cab46c Merge "Use heif embedded thumbnail if available" into pi-dev am: 11d203ea0d
am: a55a0da8d5

Change-Id: Ifa0e3c5ec1114b50d9b9b9860aec87dff718d551
2018-04-14 19:18:21 -07:00
TreeHugger Robot
11d203ea0d Merge "Use heif embedded thumbnail if available" into pi-dev 2018-04-14 00:23:37 +00:00
Dongwon Kang
b5f88e7e30 Merge "Merge "Use system property to get the package name for media update" into pi-dev am: fd3e190cbf" into pi-dev-plus-aosp
am: 8845722905

Change-Id: I36b09cf6b75932aa978c603c6d29ad0f87dad8e9
2018-04-12 16:53:24 -07: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
jiabin
f8817064c1 Merge "Change log level when microphone enumeration APIs native call fail." into pi-dev am: ccaba49ab5
am: b2d12fb3e0

Change-Id: I618e5250bf4416fa1de34bad57677d25167ec6a7
2018-04-12 11:45:35 -07: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
Chong Zhang
ba07cc25b6 Merge "Fix missing video caps for HEIC type encoders" into pi-dev am: 773791a94c
am: 26bedfe43e

Change-Id: I73bee318babe8063941d1e1230ad197ae36c0885
2018-04-12 03:26:50 -07:00
TreeHugger Robot
773791a94c Merge "Fix missing video caps for HEIC type encoders" into pi-dev 2018-04-12 09:59:28 +00:00
Sungsoo Lim
3d1b7ee8b2 Merge "Fix possible NPE in MediaSessionManager" into pi-dev am: ed01dfba3e
am: ae93c58779

Change-Id: I0abefe0e3bcf5246b454ece637007ce7fa6f83e3
2018-04-12 00:13:37 -07:00
TreeHugger Robot
ed01dfba3e Merge "Fix possible NPE in MediaSessionManager" into pi-dev 2018-04-12 06:51:52 +00:00
Jean-Michel Trivi
c043e79b8c Merge "PlayerBase: fix deadlock" into pi-dev am: 437b252c96
am: 1f1a955bf9

Change-Id: Idf8726ae5c5395fdce4bf8723542bd1f95c842e0
2018-04-11 19:30:38 -07: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
Wei Jia
f343c4918b Merge "BufferingParams: add annotation @TestApi" into pi-dev am: fb052cc3c0
am: bfd7f564d0

Change-Id: Icc721ee3fd658ab503f60a45f2e8f7fd34e7a1d4
2018-04-11 12:42:48 -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