12329 Commits

Author SHA1 Message Date
Pavlin Radoslavov
be4fb893a0 Multi-A2DP support - add a new internal API to suppress Audio Noisy intent
The new API setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent()
is similar to the existing setBluetoothA2dpDeviceConnectionState()
except that it takes one extra argument that indicates whether the
AudioManager.ACTION_AUDIO_BECOMING_NOISY intent will be sent:

  setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(
      ..., boolean suppressNoisyIntent)

This API is needed so the Active A2DP Sink device can be changed
while audio is streaming, and the audio continues playing on the new
Active Device.

Bug: 69269748
Test: Manual: multiple connected A2DP devices, and selecting each as
      the Active Device.

Change-Id: I75766a58d9e6b42b3ce68bd9ad3a7a72ca5a1023
(cherry picked from commit 82e06463f2571a06286f9da0bf3ad5a0e58461a2)
2018-01-20 11:50:37 -08:00
Philip P. Moltmann
a0f5136faf Switch to modern ArgumentMatchers
Test: - adb shell am instrument -w -e class com.android.mediaframeworktest.unit.MediaInserterTest com.android.mediaframeworktest/android.support.test.runner.AndroidJUnitRunner
      - atest com.android.settingslib.users.AppRestrictionsHelperTest
      - atest com.android.server.NetworkScorerAppManagerTest com.android.server.accessibility.MotionEventInjectorTest com.android.server.webkit.WebViewUpdateServiceTest
Change-Id: I6d4c543541d3bebcd65e5aa9e3f4d9a0152d5583
2017-12-14 09:45:16 -08:00
Jeff Sharkey
2337aec921 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
Merged-In: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
2017-12-07 00:22:25 -07:00
kyle_tso
34be883ebd Merge "Support scanDirectories with JNI callback function"
am: 5747c2b81c

Change-Id: I8996fb568c4024ccf76a5643049de8cee6f811c6
2017-12-06 03:22:30 +00:00
Treehugger Robot
5747c2b81c Merge "Support scanDirectories with JNI callback function" 2017-12-06 02:06:49 +00:00
Chih-hung Hsieh
cba4979a6a Merge "Use -Werror in frameworks/base/media/mca/filterfw"
am: 171fce8377

Change-Id: I698ee4b4d6c884469253238795d23bdb21a54542
2017-11-30 02:19:13 +00:00
Chih-Hung Hsieh
a7ea11e316 Use -Werror in frameworks/base/media/mca/filterfw
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I12137a0b40357954af63bac3771332773b03da9a
2017-11-29 14:52:36 -08: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
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
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
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
Tobias Thierer
6217e37d30 Framework: Prefer android.system.Os over libcore.io.Libcore.os
This is a pure refactoring with no a behavior change other than
that these calls now go through android.system.Os, which immediately
delegates to Libcore.os.

This is a first step towards separating framework (via
android.system.Os) vs. libcore (via Libcore.os) clients of these
low level APIs. Separating these is a prerequisite towards moving
the API parts of android.system into framework, and moving the
rest into a different package in libcore.

Test: Treehugger
Bug: 67901714

Change-Id: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
Merged-In: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
2017-10-18 14:53:57 +01:00
Jerry Zhang
def7b19300 Add storageId to moveObjects
When moving between different storages, the storageId
must be changed as well.

Bug: 67028892
Test: Move between storages with virtual sdcard.
Change-Id: Ie82aa8d53686bfffb7c26b46a49524a00f2f0214
2017-10-17 15:27:03 -07:00
Chong Zhang
0764ce28cf Merge "Use rotation from MediaMetadataRetriever directly" into oc-mr1-dev
am: 106aeb324d

Change-Id: I5d7bbd0a3fb5f291f79a2e9009319eb4e57848a4
2017-10-06 05:29:43 +00:00
TreeHugger Robot
106aeb324d Merge "Use rotation from MediaMetadataRetriever directly" into oc-mr1-dev 2017-10-06 05:20:14 +00:00
Chong Zhang
9af92dadc9 Use rotation from MediaMetadataRetriever directly
MediaMetadataRetriever now reports rotation in clockwise,
no longer need to translate.

bug: 67470228

Test: verified rotation using test app attached in bug
Change-Id: Ifebcf25ea302477818e2e03db1e55525db985e67
2017-10-05 15:13:54 -07:00
Eric Laurent
8916db215f Merge "Fix Cell broadcast sound in total silence" into oc-mr1-dev
am: 77ee4f2ff2

Change-Id: Ib39341f455b82750ef357dbf41d8815fb303844d
2017-10-04 14:56:26 +00:00
Eric Laurent
77ee4f2ff2 Merge "Fix Cell broadcast sound in total silence" into oc-mr1-dev 2017-10-04 14:45:01 +00:00
Wonsik Kim
ce29a4c77a Merge "fix AmrInputStream.read() hang" am: 5b6a02eb8b am: 4c2bbbf552
am: b7079d6381

Change-Id: Ia0627f67855e56487818043b974953a33baf701f
2017-10-03 21:42:14 +00:00
Wonsik Kim
4c2bbbf552 Merge "fix AmrInputStream.read() hang"
am: 5b6a02eb8b

Change-Id: I7aff9043ec95d2f41e5d3301b01707f5dff4bef2
2017-10-03 21:18:10 +00:00
Treehugger Robot
5b6a02eb8b Merge "fix AmrInputStream.read() hang" 2017-10-03 20:37:36 +00:00
Wonsik Kim
e1b8b7bf0f fix AmrInputStream.read() hang
Test: AmrInputStream.read() no longer hangs
Change-Id: I5b3e1c7667891ce250e447c32213511077c5b5df
2017-10-02 17:44:02 -07:00
Jerry Zhang
3a13ab1fd3 Merge "Add moveObject method to change object's path and parent." am: 33a200e572 am: 0f09ac317d
am: f9696617bd

Change-Id: Ia6ba6d0cf89879914894d35a0dbf110d905966ac
2017-10-03 00:33:02 +00:00
Jerry Zhang
0f09ac317d Merge "Add moveObject method to change object's path and parent."
am: 33a200e572

Change-Id: Iabb8c9989ad35140ab1c752fb70741f52e56c04d
2017-10-03 00:04:03 +00:00
Jerry Zhang
952558d4e5 Add moveObject method to change object's path and parent.
This is needed to implement the MTP MOVE_OBJECT operation.

Bug: 66679910
Test: Move objects and folders, verify mediastore is consistent
Change-Id: I2f4f0c43134fb3ff82745166c051712cc1736b7f
2017-10-02 11:48:38 -07:00
Marco Nelissen
14d8ba7736 Merge "AmrInputStream is not a public API" am: c3b1442d52 am: fa55320f5d
am: 9bda8fddf2

Change-Id: Ib6e7f401af259e422aee6ca7d18703f380ef08f6
2017-09-29 20:21:30 +00:00
Marco Nelissen
fa55320f5d Merge "AmrInputStream is not a public API"
am: c3b1442d52

Change-Id: Iee0e6dfa9907dc70fcf5dae7fcbcf14b8bcb9ffb
2017-09-29 20:04:54 +00:00
Marco Nelissen
323d2a56ec AmrInputStream is not a public API
and nobody should be using it. Add some warnings to that effect.

Change-Id: I8029ccd665fd147b4708a68f61c6aa055004a5c1
2017-09-29 10:15:34 -07:00
Sungsoo Lim
aee660bb47 Merge "Make RoutInfo.select() called in app's main thread" into oc-mr1-dev
am: 6e326268c1

Change-Id: I91a4e5422a92f3e7571a1ffc7fb19d0594f116e2
2017-09-29 08:43:07 +00:00
Sungsoo Lim
133a24e095 Make RoutInfo.select() called in app's main thread
Bug: 66995486
Test: passed MediaRouter test
Test: Checked theat IllegalStateException doesn't happen
Change-Id: Idb75998cd7910a430e68ea928d28c9908260d5fc
2017-09-29 14:25:15 +09:00
Eric Laurent
e5a351cb92 Fix Cell broadcast sound in total silence
PlayerBase:
 Update player volume when the audio attributes are updated in case
we need to unmute
PlaybackActivityMonitor:
 Unmute alarm stream if needed when an alarm with flag
 FLAG_BYPASS_INTERRUPTION_POLICY starts from an app with
 privileged permission MODIFY_PHONE_STATE.

Bug: 63617557
Test: check sound with cell broadcast in total silence
Change-Id: Ifacb1d96a2d8d44047d9f9642d1e672fcf756cda
2017-09-28 18:00:01 -07:00
Sungsoo Lim
a8a1e989eb Merge "Select correct system audio route in updateAudioRoutes" into oc-mr1-dev
am: 43d5d86cda

Change-Id: I5bab35f229bbedeba548a43e078a500f5cd2a4b0
2017-09-25 07:16:48 +00:00
Sungsoo Lim
0e43c503ab 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
Merged-In: Id0034996a51a6d8d1e8bd9d2c6ca386aabbb8baf
2017-09-25 10:15:49 +09:00
Ajay Panicker
12bec46613 Add equal overloads to some MediaDescription and MediaQueue objects (2/3)
am: 905d8ab843

Change-Id: I8f47786d4e0c392b008cdce80aed05ca7b1573b1
2017-09-22 17:14:36 +00:00
Ajay Panicker
905d8ab843 Add equal overloads to some MediaDescription and MediaQueue objects (2/3)
Bug: 64686424
Test: Connect to carkit and see that NowPlayingChanged only gets sent when
      the queue changes, run cts test
Change-Id: I58c9dd0bf976485a2efefd042cd667ee433e07e1
(cherry picked from commit 6edb68bea68d5f324384f3e9e411118eb8dfc781)
2017-09-22 16:31:43 +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
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
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
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
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
Yin-Chia Yeh
811029f71d Merge "Camera: fix race in onRepeatingRequestError callback" into oc-mr1-dev
am: f23334869d

Change-Id: I0c3c9544e37219110178c864ff2ec6b28b467f63
2017-09-08 23:34:27 +00:00