Commit Graph

6102 Commits

Author SHA1 Message Date
Sungsoo Lim
546a170bfa Select correct system audio route in updateAudioRoutes
While update audio routes, MediaRouter had an access to the variable
of MediaRouterService.mGlobalBluetoothA2dpOn, which was updated in
the callback of AudioRoutesObserver.dispatchAudioRoutesChanged().
However, since updateAudioRoutes() was also called by the same
callback, mGlobalBluetoothA2dpOn could be used in updateAudioRoutes()
before its value was updated.

Bug: 65629167
Test: passed MediaRouterTest
Test: Manually confirmed that the issue is fixed with this CL
Change-Id: Id0034996a51a6d8d1e8bd9d2c6ca386aabbb8baf
2017-09-25 09:59:03 +09:00
Sungsoo Lim
65a5d03b6e Merge "Select a system audio route only when needed" into oc-mr1-dev am: d4aee713d4
am: cf874bbe6f

Change-Id: I79a44736931cea34eb6d00a62ae33b569021e9e4
2017-09-20 09:57:47 +00:00
Sungsoo Lim
cf874bbe6f Merge "Select a system audio route only when needed" into oc-mr1-dev
am: d4aee713d4

Change-Id: Ifa91341cb48c970f9b19c6f8bc0219c1a3372a9a
2017-09-20 03:02:28 +00:00
TreeHugger Robot
d4aee713d4 Merge "Select a system audio route only when needed" into oc-mr1-dev 2017-09-20 02:54:45 +00:00
Pawin Vongmasa
99da73404d Merge "Rename "bitrate-control" to "bitrate-modes"" into oc-mr1-dev am: 9b1a9b4fb9
am: 729cb8b2b5

Change-Id: If4ab02ad02b39e197b15d3b1b9c9eef6e4a87cdd
2017-09-19 01:30:01 +00:00
Pawin Vongmasa
729cb8b2b5 Merge "Rename "bitrate-control" to "bitrate-modes"" into oc-mr1-dev
am: 9b1a9b4fb9

Change-Id: Ibdfb6f003c7467f58c9232d807d52b327e2187af
2017-09-19 01:22:34 +00:00
TreeHugger Robot
9b1a9b4fb9 Merge "Rename "bitrate-control" to "bitrate-modes"" into oc-mr1-dev 2017-09-19 01:14:05 +00:00
Sungsoo Lim
f8e38e2dbb Select a system audio route only when needed
When system audio routes are changd, updateAudioRoutes is called, and
it selects a system audio route even when a none system route was
seleted.
That makes the selected route be unselected and this CL fixes it.

Bug: 65403568
Test: manual tested that the issue is fixed
Change-Id: I5df9d3e5f68cfd40fdb625937f9a8e16f4308e16
2017-09-18 13:50:56 +09:00
Sungsoo Lim
816d1e39d6 Merge "Change the route name for USB headset" 2017-09-18 04:28:47 +00:00
Pawin Vongmasa
add5a5a2f8 Rename "bitrate-control" to "bitrate-modes"
The property name that is listed in xml files is
"bitrate-modes", not bit "bitrate-control".

Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice

Bug: 65769027
Change-Id: Ifef752e05cac3b868cee76ce69f1763c075f10ec
2017-09-16 06:46:59 -07:00
TreeHugger Robot
6bc7eba04e Merge "MediaPlayer: add notifyAt for TimeProvider" 2017-09-15 20:15:35 +00:00
Wei Jia
c02f09d0d1 MediaPlayer: add notifyAt for TimeProvider
Test: TimeProvider gets correct media time when playback rate is not 1.0
Bug: 65204641
Change-Id: I5020515415e14a2c37eec0d1ece511518b9239e7
2017-09-15 09:11:51 -07:00
Jean-Michel Trivi
c547bd8a9f Merge "AudioPlaybackConfiguration: prevent race condition on mIPlayerShell" into oc-mr1-dev am: 982ee8e6c3
am: 2d7ef64f47

Change-Id: Ib4bd34bf0915afdd3e6c91c2ad34594e1e373a36
2017-09-15 11:35:33 +00:00
Sungsoo Lim
60aa8b99a0 Change the route name for USB headset
Bug: 37749497
Test: manual by connecting a USB headset
Change-Id: I0c6e0233da5d4006d62adc1f2b4534a0180485d0
2017-09-15 16:05:43 +09:00
Jean-Michel Trivi
2d7ef64f47 Merge "AudioPlaybackConfiguration: prevent race condition on mIPlayerShell" into oc-mr1-dev
am: 982ee8e6c3

Change-Id: Ifa18821b2ae5b3103f5025df88c0e545bdca56af
2017-09-15 02:28:28 +00:00
Jean-Michel Trivi
982ee8e6c3 Merge "AudioPlaybackConfiguration: prevent race condition on mIPlayerShell" into oc-mr1-dev 2017-09-15 01:37:55 +00:00
Hangyu Kuang
6bf9548f41 Merge "MediaMuxer: Fix a typo in java doc." into oc-mr1-dev am: 7dd0c6924e
am: e0ba566aae

Change-Id: Idb8cbe7ee53e8d3eb2cc59b6fc163f88adad4df0
2017-09-14 21:55:39 +00:00
Jean-Michel Trivi
776a399314 AudioPlaybackConfiguration: prevent race condition on mIPlayerShell
Synchronize changes to mIPlayerShell after release of corresponding
  player.
Flush binder commands when a player is released, in AudioService
  and in the clients that have an AudioPlaybackCallback implementation.
  Do the same in MediaSessionService, which directly implements
  the IPlaybackConfigDispatcher interface, without going through
  the AudioPlaybackCallback registration and notification
  mechanisms.

Test: adb shell /system/bin/write_sine_callback -m2 -pl
Bug: 65450109
Change-Id: I2f0697e0e164283284ce30d2cc736c4f8df270c4
2017-09-14 10:00:28 -07:00
Hangyu Kuang
e0ba566aae Merge "MediaMuxer: Fix a typo in java doc." into oc-mr1-dev
am: 7dd0c6924e

Change-Id: I6eef1bed8894f907177f21eb2550a9465b45c257
2017-09-14 02:15:00 +00:00
Hangyu Kuang
ceb5729a5e MediaMuxer: Fix a typo in java doc.
Bug: 63965858
Test: None as just document.
Change-Id: I4c849a02c3b19d8cf23e92a960cfde023e213ca1
2017-09-13 11:09:27 -07:00
Insun Kang
61330a3346 Merge "MediaSession: Remove pending callback messages when setCallback(null) is called." 2017-09-11 02:11:46 +00:00
Insun Kang
62cef488de MediaSession: Remove pending callback messages when setCallback(null) is called.
setCallback(null) is supposed to clear registered callbacks.
Previously, setCallback(null) doesn't remove pending callback messages
and so belated callbacks are called quite frequently after
setCallback(null) is done. This CL reduces major number of such cases by
removing pending callback messages.

Bug: 63446360
Test: Ran cts test
adb shell am instrument -w -e class \
android.media.cts.MediaSessionTest#testSetCallbackWithNull \
android.media.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I7192b0a61a2114390f10734bbb48aeac56a19fe3
2017-09-07 14:15:29 +09:00
Kai Wang
a8595bbfee Merge "MediaBrowserService: Clean up ConnectionRecord when browser is dead" into oc-mr1-dev am: bbf55bb7ae
am: 86baa82d01

Change-Id: I509f5d8ae4c8224ee1e7b8ceffd2a65f1da1254c
2017-09-05 23:21:07 +00:00
Kai Wang
86baa82d01 Merge "MediaBrowserService: Clean up ConnectionRecord when browser is dead" into oc-mr1-dev
am: bbf55bb7ae

Change-Id: I4e14e80a31c0eed3c897e35720bff1f694f7a007
2017-09-05 20:56:01 +00:00
Kai Wang
bbf55bb7ae Merge "MediaBrowserService: Clean up ConnectionRecord when browser is dead" into oc-mr1-dev 2017-09-05 20:40:25 +00:00
Ivan Lozano
9f6a292f6a Merge "Moving IPlayer.aidl to frameworks/av/." 2017-09-01 23:07:07 +00:00
kai
8e67b4d9f1 MediaBrowserService: Clean up ConnectionRecord when browser is dead
This CL cleans up connectionRecords when binder dead and the connection
is lost.

Bug: 65132577
Test: check the number of ConnectionRecord, kill the media app, check
      the number again.
Change-Id: I8b31745bcee220b9e70c3f43d7fc9d8dc3f6b83a
2017-09-01 10:50:01 -07:00
Ivan Lozano
330d876a62 Moving IPlayer.aidl to frameworks/av/.
As part of migrating native binder services to AIDL, this moves IPlayer.aidl to
the frameworks/av/ project and links in the new AIDL generated binder library to
the JNI libraries.

Test: run cts --module CtsMediaTestCases
Bug: 64223827

Change-Id: I7e346a471b98c78ceb35dceed9e6c0df1000cfb1
2017-09-01 08:24:14 -07:00
Sungsoo Lim
bdbec44257 Merge "Track the global setting of BT A2DP on/off" into oc-mr1-dev am: cc2478f90c
am: 0047534b7f

Change-Id: Iaa02ab736989e55660ad6813fcaa97e2b411a27e
2017-09-01 02:13:26 +00:00
Sungsoo Lim
0047534b7f Merge "Track the global setting of BT A2DP on/off" into oc-mr1-dev
am: cc2478f90c

Change-Id: Iacf556474e361882d4928750a71add65af0180d9
2017-09-01 02:01:58 +00:00
Sungsoo Lim
76512a3d80 Track the global setting of BT A2DP on/off
The default phone speaker, bluetooth audio devices, and wired audio
devices are handled as system audio routes. When an app starts to
make sound to a system audio route, the system audio route will be
selected with the following order.

1. The slected route by the app after the latest connection of
   an audio device.
2. The lastly connected audio device.
3. The default phone speaker if not connected.

Bug: 64811580
Test: Passed MediaRouterTest, manual
Change-Id: I77badb14596bc661c44237957504164f5476e595
2017-08-31 15:57:56 +09:00
Wonsik Kim
b9e8678d27 Merge "At STARTED_AS_NEXT, offload MediaPlayer.start() to a separate thread" into oc-mr1-dev am: 52700a9795
am: 7558ef1b2d

Change-Id: I1462ddec436262f342ee658b93b9d96ea36ff3ca
2017-08-31 04:38:11 +00:00
Chong Zhang
c658124d50 Merge "Add heif format to ExifInterface" into oc-mr1-dev am: e034a1f5ed
am: 3985765a17

Change-Id: I1cb5527a9bb1a63cb960cbc7d38aa955353a28c9
2017-08-31 03:36:24 +00:00
Wonsik Kim
7558ef1b2d Merge "At STARTED_AS_NEXT, offload MediaPlayer.start() to a separate thread" into oc-mr1-dev
am: 52700a9795

Change-Id: I1691d29774c95fc87c1230ec85fbcf78838e6e42
2017-08-31 03:13:34 +00:00
Wonsik Kim
e8b4c97bdf At STARTED_AS_NEXT, offload MediaPlayer.start() to a separate thread
Fixes: 65210445
Fixes: 64915666
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: I73f1cebdd4b990e28f8d466f129e781cba2b5bbf
2017-08-31 00:28:36 +00:00
Chong Zhang
3985765a17 Merge "Add heif format to ExifInterface" into oc-mr1-dev
am: e034a1f5ed

Change-Id: I36fb2559b52bb778acff72954012704da8a85ff9
2017-08-30 23:40:46 +00:00
TreeHugger Robot
e034a1f5ed Merge "Add heif format to ExifInterface" into oc-mr1-dev 2017-08-30 23:05:12 +00:00
Chong Zhang
6f80587e8b Add heif format to ExifInterface
Get heif dimension and rotation from MediaMetadataRetriever.

Bug: 64077740
Change-Id: I711ac70d356dbfd9128a30ab33c0dfd81a4ae17e
2017-08-30 11:33:07 -07:00
Jean-Michel Trivi
47733c46bb Merge "AudioService: log changes in OP_PLAY_AUDIO" into oc-mr1-dev am: 8da5c64628
am: 60e09929e7

Change-Id: I0c21870cc808d16076c907a1760bb1940ef0ff87
2017-08-30 01:14:40 +00:00
Jean-Michel Trivi
60e09929e7 Merge "AudioService: log changes in OP_PLAY_AUDIO" into oc-mr1-dev
am: 8da5c64628

Change-Id: I9df4f18b59ed2d8434c66754820304bd9082f9e9
2017-08-29 22:43:19 +00:00
Glenn Kasten
cad0be854d Merge "Fix Bluetooth typos" 2017-08-29 21:05:57 +00:00
Jean-Michel Trivi
3120059d5b AudioService: log changes in OP_PLAY_AUDIO
Log changes to AppOpsManager.OP_PLAY_AUDIO in live player

Test: "adb shell dumpsys audio" after entering silence mode
Bug: 62258749
Bug: 64286665
Change-Id: Ia1c202c5b8b25e14f7c2e85060a256dc69433909
2017-08-29 11:39:56 -07:00
Jean-Michel Trivi
6a708bcc87 Merge "AudioService: log volume commands and origin" into oc-mr1-dev am: c3fcd65e61
am: 0453f8189c

Change-Id: I14b55b8f61aa7c75373bb9c656904c372563eacd
2017-08-29 16:55:51 +00:00
Jean-Michel Trivi
0453f8189c Merge "AudioService: log volume commands and origin" into oc-mr1-dev
am: c3fcd65e61

Change-Id: I8cd88be04af0aea7bde9b10bc82b839613898eb4
2017-08-29 16:43:44 +00:00
Jean-Michel Trivi
cf17036a21 AudioService: log volume commands and origin
Add volume logger for volume events.
Move AudioService event definitions to separate file.

Test: change volume with volume buttons and dumpsys audio
Bug: 64470715

Change-Id: I25db849bffb4a41a737d226cfc40e2c6f7e0ecc0
2017-08-28 16:26:52 -07:00
bokyung.kim
e2d814e5b6 Merge "Fixed mimetype error of PPT file" am: 3c28e2b280 am: 148414cd2c am: 1190da1b1e
am: 54238c6a10

Change-Id: I2268e389fd24cece3a677d888f1745d75c35ceea
2017-08-28 22:57:54 +00:00
bokyung.kim
54238c6a10 Merge "Fixed mimetype error of PPT file" am: 3c28e2b280 am: 148414cd2c
am: 1190da1b1e

Change-Id: I0eb5f50a6ac95d5512fbae9888b37a3c64917902
2017-08-28 22:47:34 +00:00
bokyung.kim
148414cd2c Merge "Fixed mimetype error of PPT file"
am: 3c28e2b280

Change-Id: I24b9dcf6506c53e26b901f74442f64bb28198611
2017-08-28 22:27:38 +00:00
bokyung.kim
9806330b52 Fixed mimetype error of PPT file
Change mimetype of PPT file to match MS specification.
(MimeUtils.java matched the MS specification)

Test: Check mimetype of DB after saving PPT file.

Change-Id: Ie559499ae39bc527fcc656ba37f28845af209e6c
Signed-off-by: bokyung.kim <bokyung.kim@lge.com>
2017-08-28 13:16:35 -07:00
Ajay Panicker
f4e5177f1f Merge "Add equal overloads to some MediaDescription and MediaQueue objects (2/3)" into oc-mr1-dev am: 619503b279
am: 8fdd245b7e

Change-Id: Ie1cc15209b789e271615ccd07b0c89d00d5627e8
2017-08-28 19:51:53 +00:00