Commit Graph

16064 Commits

Author SHA1 Message Date
Jiabin Huang
b6f9d6aa03 Merge "Support query encapsulation information." into rvc-dev am: acc2acafe7
Change-Id: I48beec9493a12c42949526f377e948231afebefa
2020-05-10 05:10:52 +00:00
Jiabin Huang
acc2acafe7 Merge "Support query encapsulation information." into rvc-dev 2020-05-08 18:26:31 +00:00
Kyunglyul Hyun
65600663fa Merge "Filter selectable/deselectable routes" into rvc-dev am: 2eec783e52
Change-Id: I896b45883d8e470cf5e0f510b94b0786c056e013
2020-05-08 10:39:12 +00:00
Kyunglyul Hyun
45512bbd54 Filter selectable/deselectable routes
Only selected routes can be deselectable and not selected routes
can be selectable from this CL.

Bug: 154918270
Test: Manually and atest mediaroutertest
Change-Id: I2e66d814190b003c935b21a744d24fa2b5d2c7ac
2020-05-08 17:36:33 +09:00
jiabin
52c3a741b0 Support query encapsulation information.
Add encapsulation info in AudioDevicePort. Instead of returning a size 0
array, query AudioDevicePort for getEncapsulationModes and
getEncapsulationMetadataTypes.

Test: atest EnumDevicesTest, manually
Bug: 155799506
Change-Id: I4eff64aeb135a75ad51c9b3618a34747be8920f1
2020-05-08 00:37:55 +00:00
Andy Hung
239054e0ff Merge "AudioMetadata: Translate KEY_ATMOS_PRESENT for JNI" into rvc-dev am: 65c14feec9
Change-Id: I8cad276d4b13032184f4f55d63ec5e68e70af6d1
2020-05-07 03:49:48 +00:00
Andy Hung
65c14feec9 Merge "AudioMetadata: Translate KEY_ATMOS_PRESENT for JNI" into rvc-dev 2020-05-07 03:28:15 +00:00
Kyunglyul Hyun
0dc6a35ad7 Merge "Introduce APIs to deal with RCN case" into rvc-dev am: 0de25056a2
Change-Id: I0b4d83c783dd782b1348bc6560ae520fb1d435a2
2020-05-07 02:45:00 +00:00
Kyunglyul Hyun
0de25056a2 Merge "Introduce APIs to deal with RCN case" into rvc-dev 2020-05-07 02:25:09 +00:00
Andy Hung
db7fd16f1f AudioMetadata: Translate KEY_ATMOS_PRESENT for JNI
Translate KEY_ATMOS_PRESENT from Key<Boolean> to Key<Integer>
for JNI handling.

Test: AudioMetadataTest#testFormatKeys
Bug: 155392886
Change-Id: I69abbc451cdc6dfd23bf3d5d3a146ba884b9026e
2020-05-06 15:54:06 -07:00
Kyunglyul Hyun
21abd686f7 Merge "Clean up MediaRouter2Manager" into rvc-dev am: 8a028947c3
Change-Id: Id825a56a962252303ccc7c086e510890cd2ec2a5
2020-05-06 12:03:24 +00:00
Kyunglyul Hyun
8a028947c3 Merge "Clean up MediaRouter2Manager" into rvc-dev 2020-05-06 11:52:20 +00:00
Kyunglyul Hyun
e2dbbf79f9 Introduce APIs to deal with RCN case
This CL does following:
 - MR2Manager#getRoutingSessionForMediaController is added
 - MR2Manager#getAvailableRoutesForRoutingSession is added
 - Add a workaround for provider to provide a routing session
   not requested by the user (RCN case)

Using the added methods, we exepect System UI to implement UX easily.

Bug: 154780833
Bug: 152582294
Test: It is tested manually with two demo APKs. MediaRoute2ProviderDemo
app is updated to enable the user to create a routing session w/o
MediaRouter2 clients and Sample Output Switcher is updated to use the
new APIs. With updated APKs, transfer from cast to cast (Variable
Volume1 -> Variable Volume2) is enabled.

Change-Id: I03c261c1779725f43933bacad429e1a22f602818
2020-05-06 17:44:34 +09:00
Kyunglyul Hyun
fa6f06da30 Clean up MediaRouter2Manager
This CL removes unnecessary APIs.

Bug: 155306249
Test: atest android.media.cts.MediaRoute2InfoTest
  android.media.cts.MediaRouter2Test
  android.media.cts.RouteDiscoveryPreferenceTest
  android.media.cts.RoutingSessionInfoTest
  android.media.cts.MediaRoute2ProviderServiceTest
  mediaroutertest;
  make -j42 RunSettingsLibRoboTests
Change-Id: I7ee6546deeaca8f5e9cb9b0d119ab6fff734ca1c
2020-05-06 16:17:54 +09:00
Amy Zhang
25631f64ca Merge "Complete the acquireHardware API implementation in the TvInputHardwareManager" into rvc-dev am: de151fb3a4
Change-Id: Ifb374c9c07349aaee25605ca9d6d7d4b64f816df
2020-05-06 05:21:59 +00:00
Amy Zhang
a2249444a7 Complete the acquireHardware API implementation in the TvInputHardwareManager
This CL:
1. Finish the logic in TIHM to utilize the TRM for a client priority check.
2. FInish the TRM isHigherPriority API to allow the TIHM to compare the
client priority.
3. Finish the TRM isForeground method to check if a process is
foreground or not.
3. Add unit test for TRM isHigherPriority.

Test: atest com.android.server.tv.tunerresourcemanager
Bug: 155339425
Change-Id: I3887ccad31195d3386f1fc6b3de3e641df91092f
2020-05-05 21:05:14 -07:00
Phil Burk
eda81c1923 Merge "Bluetooth MIDI test: flush packets" into rvc-dev am: 4b2063c9d6
Change-Id: Ibebdb05031b912a20bb6c172760cda038d40833a
2020-05-05 05:32:26 +00:00
Phil Burk
f765984c69 Bluetooth MIDI test: flush packets
The simulation of the device timing was not very accurate.
That caused two encoder tests to fail:
testTwoNoteOnsTwoChannels and testTwoNoteOnsSameChannel.

This patch simulates a delayed completion
and is more accurate.

Bug: 35669198
Test: atest BluetoothMidiTests

Change-Id: I8d04900a792ffc29928ed0e358536f8d961bcb77
2020-05-04 23:54:25 +00:00
Andrew Sapperstein
3b0ca2b358 Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev am: 975ca816ec
Change-Id: I30efa4f3aefc466e138541b34ae8901005ee9902
2020-05-02 00:36:11 +00:00
Andrew Sapperstein
f181c2f44b Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ic95104f61b736d05f18c7465e77951771f39fcbf
2020-05-02 00:36:07 +00:00
Andrew Sapperstein
88d565e7e7 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
2020-05-01 18:33:15 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
James Wei
54850c9f62 Merge "MTP: media info can not be retrieved via MTP#2" into rvc-dev am: 6fb5f2c03a
Change-Id: I46913c0407af529844c9994ab240e9e68d6bc293
2020-05-01 12:50:21 +00:00
James Wei
f545a3ac9e MTP: media info can not be retrieved via MTP#2
Under the new MtpStorageManager design,
media info like MP3 Track title, album and artist, Genre, etc
can not be retrieved via MTP
by Windows Media Player, Linux Rhythmbox and Some Car Kits

Bug: 112635346
Test: atest MtpTests
Test: atest MediaProviderTests
Test: Manual test: Windows Media Player
Change-Id: I57a947fe6d3a583a0990be5bd2b0678f39d948f2
2020-05-01 07:52:55 +00:00
Wonsik Kim
8e09576f0c Merge "RELAND: "media: lazy MediaCodec.release()"" into rvc-dev am: c8a654c21a
Change-Id: Id2d8803338cdb9910de5fde9c637942216e92cc2
2020-04-30 17:38:48 +00:00
Wonsik Kim
c8a654c21a Merge "RELAND: "media: lazy MediaCodec.release()"" into rvc-dev 2020-04-30 17:12:33 +00:00
TreeHugger Robot
a08a5102e7 Merge "BluetoothMidiService: remove java_api_finder tag" into rvc-dev am: 40f632b78c
Change-Id: Ic42947651ef687524b7f87003df973698c9481b7
2020-04-30 01:07:40 +00:00
TreeHugger Robot
40f632b78c Merge "BluetoothMidiService: remove java_api_finder tag" into rvc-dev 2020-04-30 01:03:28 +00:00
TreeHugger Robot
d8e2a22533 Merge "Tuner JNI: linearBlock and OnDestroyNotify" into rvc-dev am: ee6b90ef7f
Change-Id: I223cb6428e1a655010b2b44a5574f8fbf782dc22
2020-04-30 00:59:22 +00:00
TreeHugger Robot
ee6b90ef7f Merge "Tuner JNI: linearBlock and OnDestroyNotify" into rvc-dev 2020-04-30 00:52:35 +00:00
Phil Burk
678847b3af BluetoothMidiService: remove java_api_finder tag
This was an unintentional build artifact that
was causing Mainline tests to fail.

Bug: 154289918
Test: dashboard mentioned in the bug should start passing
Change-Id: I09934abb3e0c785144aa6ca557592542354c69b4
2020-04-29 16:28:23 -07:00
TreeHugger Robot
4a3bf77025 Merge "Reset audio port generation when having recording callback event." into rvc-dev am: 2b5ba928e5
Change-Id: Ic217a640738c622f734ebe1696da64f5f4bad40f
2020-04-29 20:50:00 +00:00
jiabin
fa7a0252b0 Reset audio port generation when having recording callback event.
In RecordingActivityMonitor, compare audio device type and address to
know if legacy remote submix is active, which requires querying audio
patches. When there is a recording callback event, the audio patches in
AudioManager may not be up to date. In that case, when getting a
recording callback event, reset audio port generation if the patch
handle is not found in the cached audio patches.

Test: repro steps in the bug
Bug: 144063329
Change-Id: Ife5c9a65243d2e85e4cd9480e3b415f8bfddc6f5
2020-04-29 09:59:53 -07:00
Wonsik Kim
8966662d4b RELAND: "media: lazy MediaCodec.release()"
Bug: 129008570
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Test: manual app test
Change-Id: I991d9dbf4acc00b0d205da5ea516c5866423e2e6
2020-04-28 19:31:06 -07:00
Kyunglyul Hyun
df1db278e6 Merge "Correct SystemMediaRoute2Provider#requestCreateSession" into rvc-dev am: 61b20fd6e7
Change-Id: I277420bad329f82a8c2ed2a626550a5abea5f58c
2020-04-28 03:20:07 +00:00
Kyunglyul Hyun
61b20fd6e7 Merge "Correct SystemMediaRoute2Provider#requestCreateSession" into rvc-dev 2020-04-28 03:17:53 +00:00
Andy Hung
585bd9639e Merge "MediaMetrics: Track AudioTrack and AudioRecord callers" into rvc-dev am: c576f56c00
Change-Id: I6c2133fd4d67ad55354b39625749b7bb96a6ed4b
2020-04-27 22:56:09 +00:00
shubang
3aef4fe424 Tuner JNI: linearBlock and OnDestroyNotify
referred to ag/10877916 by Henry quxiangfang@

Bug: 139308734
Test: mmm
Change-Id: I7574d27cb1f582a5556e22eac4fff87335230b00
2020-04-27 13:18:46 -07:00
Andy Hung
ac5c3e6f37 MediaMetrics: Track AudioTrack and AudioRecord callers
Test: adb shell dumpsys media.metrics
Bug: 149850236
Change-Id: Ib8e14e8b3dbb6284e301483dee5306f014ddbcee
2020-04-27 10:48:25 -07:00
Kyunglyul Hyun
22d4e05e22 Correct SystemMediaRoute2Provider#requestCreateSession
It will call back onSessionCreated or onRequestFailed with
the correct arguments.

Bug: 152932787
Test: manually by cast -> phone multiple times via Output Switcher.
It includes the case that the target route changes (phone -> BT).

Change-Id: Icc324f3e7d6dfde71faa6d3bc919be383e7a5216
2020-04-27 21:44:55 +09:00
Ytai Ben-tsvi
20ec41785c Merge "Deliver internal server errors to the client" into rvc-dev am: f7d789b0ed
Change-Id: I3be1a7bdb367c9e583fb19fe92b973d1f658a921
2020-04-25 01:47:42 +00:00
Ytai Ben-tsvi
f7d789b0ed Merge "Deliver internal server errors to the client" into rvc-dev 2020-04-25 01:34:06 +00:00
TreeHugger Robot
e8e34cc33e Merge "AudioService: fix A2DP (dis)connection during media playback" into rvc-dev am: 11ddcad881
Change-Id: Ice11cc3a6ff76c1bd0096b214377453399cbd673
2020-04-25 01:11:16 +00:00
TreeHugger Robot
11ddcad881 Merge "AudioService: fix A2DP (dis)connection during media playback" into rvc-dev 2020-04-25 01:02:57 +00:00
Ytai Ben-Tsvi
458930753d Deliver internal server errors to the client
Due to a binder limitation (b/150808347), any unexpected exception
thrown by a binder service while processing an RPC call, will be
silently discarded and the client will get back a default-initialized
result parcelable (i.e. in most cases, won't know that anything wrong
happened).

We work around this issue by throwing a ServiceSpecificException,
which does get delivered, having a special code to designate an
internal error. Errors resulting from a HAL malfunctions will result
in a HAL reboot, which leads to recovery.

Bug: 154089179
Test: Manual verification of basic error recovery scenarios by
      injecting HAL error codes and crashes.
Change-Id: Ib5dbe08a362e545501c04204bebad5ab95f5d632
2020-04-24 16:39:36 -07:00
Phil Burk
6d3414e539 Merge "audio: E_AC3 is also Dolby Digital Plus" into rvc-dev am: abaa48139c
Change-Id: If3115f6b4ccbd8ea8fac894c53483143ba2401bb
2020-04-24 21:47:16 +00:00
Phil Burk
abaa48139c Merge "audio: E_AC3 is also Dolby Digital Plus" into rvc-dev 2020-04-24 21:36:27 +00:00
Jean-Michel Trivi
e9e4a3de4a AudioService: fix A2DP (dis)connection during media playback
Fix issue with A2DP connection/disconnection during media
playback by modifying:
- how messages related to A2DP connection/disconnection are
  removed from the AudioDeviceBroker message handler: have
  .equals() be used when checking which object to remove,
  and correct which class is used for the messages in the
  queue:
    * MSG_IL_SET_A2DP_SINK_CONNECTION_STATE_*CONNECTED is
      using BtHelper.BluetoothA2dpDeviceInfo
    * MSG_L_A2DP_DEVICE_CONNECTION_CHANGE_EXT_CONNECTION
      is using BtDeviceConnectionInfo
- locking: use the AudioDeviceBroker main lock, mDeviceStateLock
  to synchronize posting events on the handler, and removing
  some of those messages to avoid race conditions the thread
  in which events are posted (e.g. BT's event thread) and the
  AudioDeviceBroker handler thread.

  Cleanup: annotation around audio formats from native defined
in AudioSystem, moved conversions to AudioSystem.

Bug: 142293357
Test: atest AudioDeviceBrokerTest
Change-Id: I2e8dc813354829fb1b2c7ca95ad395a14f8b70cf
2020-04-24 12:06:10 -07:00
TreeHugger Robot
1944cb37d0 Merge "media: fix MediaCodec operations using HardwareBuffer" into rvc-dev am: 53897fd7d1
Change-Id: I93c335e2ba4bf364fa5e1123bbc382118b4e1bc2
2020-04-24 19:01:03 +00:00
TreeHugger Robot
53897fd7d1 Merge "media: fix MediaCodec operations using HardwareBuffer" into rvc-dev 2020-04-24 18:44:45 +00:00