Commit Graph

8849 Commits

Author SHA1 Message Date
Andrew Sapperstein
a296471054 Merge "Update inner class constructor refs to use proper syntax." 2020-05-01 18:00:05 +00:00
James Wei
bc6106c46d Merge "MTP: media info can not be retrieved via MTP#2" into rvc-dev am: 6fb5f2c03a am: 689cd2f58f am: bf3ed90508 am: f58cc557b8
Change-Id: I74879d49ce66e94add91af8a6f8c44bb7ec72ec4
2020-05-01 13:38:50 +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
Andrew Sapperstein
6b1e3188a3 Merge "Fix broken @see tags in public documentation." 2020-05-01 00:27:47 +00:00
TreeHugger Robot
5813773748 Merge "Tuner JNI: linearBlock and OnDestroyNotify" into rvc-dev am: ee6b90ef7f am: ac0f692f78 am: 171bc9d1b2 am: 07df38e663
Change-Id: I3725bac70071e20b3768a40832acdbff73576b33
2020-04-30 01:44:38 +00:00
TreeHugger Robot
ee6b90ef7f Merge "Tuner JNI: linearBlock and OnDestroyNotify" into rvc-dev 2020-04-30 00:52:35 +00:00
TreeHugger Robot
823a7fa971 Merge "Reset audio port generation when having recording callback event." into rvc-dev am: 2b5ba928e5 am: 520d7fae2f am: 367fb637f9 am: 98d3af0b15
Change-Id: I84ffc4b7699a2451d117be1dcaf343f4b70b0b9f
2020-04-29 21:31:54 +00:00
Andrew Sapperstein
4c4aa41272 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
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
2020-04-29 13:16:02 -07: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
Andrew Sapperstein
e0624c7a40 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
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-04-28 12:37:15 -07:00
Kyunglyul Hyun
f9ed659948 Merge "Correct SystemMediaRoute2Provider#requestCreateSession" into rvc-dev am: 61b20fd6e7 am: df1db278e6 am: 0171b86937 am: e2d08a8a67
Change-Id: I4c96c081e441fd066d57e031fbd30a77a518d27f
2020-04-28 04:09:24 +00:00
TreeHugger Robot
66e55af6f8 Merge "MediaTranscodingService: Separate jni file into a sperate library." 2020-04-27 20:20:31 +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
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
f7d789b0ed Merge "Deliver internal server errors to the client" into rvc-dev 2020-04-25 01:34:06 +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
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
53897fd7d1 Merge "media: fix MediaCodec operations using HardwareBuffer" into rvc-dev 2020-04-24 18:44:45 +00:00
hkuang
b942b53ea9 MediaTranscodingService: Separate jni file into a sperate library.
This is needed when we move MediaTranscodeManager into apex.
Also rework the MediaTranscodeManager test so it could be invoked with
instrument.

Bug: 145628554
Test: MediaTranscodeManagerTest.
Change-Id: If0572af30d3aa7b7189ea0fc89582b83dd0d5d35
2020-04-24 10:14:29 -07:00
Hyundo Moon
dc75d0436a Merge "MediaRouter2: Release controller when transfer result arrives" into rvc-dev 2020-04-23 11:27:16 +00:00
TreeHugger Robot
f24522ba3d Merge "RoutingSessionInfo: Modify toString() so that it can print uniqueId" into rvc-dev 2020-04-23 07:46:39 +00:00
Hyundo Moon
cacc4de46b MediaRouter2: Release controller when transfer result arrives
Previously when MediaRouter2#transferTo(route) is called, it directly
released current controller. This CL changes the release timing to
when the actual transfer result comes.

Also, this CL prevents a RoutingController instance from being passed
both to:
 - As 'oldController' in onTransfer()
 - As 'controller' in onStop()

These works make TransferCallback easy to use: when onStop() is called,
app can just stop playing media.

Bug: 154680146
Test: Passed CTS / Checked logs in onTransfer/onStop
      with output switcher
Change-Id: I4449021f98ca887252e05398356df9b53592c145
2020-04-23 16:11:26 +09:00
Hyundo Moon
18f8ac0ad2 RoutingSessionInfo: Modify toString() so that it can print uniqueId
Bug: 154778725
Test: Builds successfully
Change-Id: I6b0aacc45cf3297dae4ebad5f072c1484ef04426
2020-04-23 13:22:16 +09:00
TreeHugger Robot
42199418fd Merge "Tuner JNI: setLnb and close()" into rvc-dev 2020-04-22 23:25:35 +00:00
shubang
b3bfffeb97 Tuner JNI: setLnb and close()
Bug: 139308734
Test: mmm
Change-Id: I48ead59a638d83d2bfd9d8edabb0858715f0d473
2020-04-22 14:44:46 -07:00
Ytai Ben-Tsvi
d34d075175 Add OWNERS files to soundtrigger middleware
Bug: 154739107
Test: N/A
Change-Id: Ibbe7257a816af43fa604cb4c7782b7c792409e57
2020-04-22 19:01:18 +00:00
Andy Hung
6d5625c5ce Merge changes Ibca1d27b,I8cc6f5ce into rvc-dev
* changes:
  MediaMetrics: Update Audio Java logging
  MediaMetrics instrumentation
2020-04-22 17:04:27 +00:00
Andy Hung
adcf281cc8 Merge "MediaMetrics: Update Audio Java logging" 2020-04-22 15:26:54 +00:00
Andy Hung
062b9c5dcb MediaMetrics: Update Audio Java logging
Convert to typed keys to ensure consistent spelling / usage.
Track volume state.
Track device state.

Test: media metrics dumpsys
Bug: 149850236
Change-Id: Ibca1d27baca3bea6c5c363c7ef0dbce04fe5debc
2020-04-22 00:37:41 -07:00
Andy Hung
6983695951 MediaMetrics: Update Audio Java logging
Convert to typed keys to ensure consistent spelling / usage.
Track volume state.
Track device state.

Test: media metrics dumpsys
Bug: 149850236
Merged-In: Ibca1d27baca3bea6c5c363c7ef0dbce04fe5debc
Change-Id: Ibca1d27baca3bea6c5c363c7ef0dbce04fe5debc
2020-04-21 23:51:42 -07:00
James Wei
82062b99eb MTP: Fix MTP SD card issue
Modify MTP access path for SD card in accordance with Storage Permission change

Bug: 150188237

Test: atest MtpTests
Test: Manual test: MTP file browsing / copy on SD card
Change-Id: I7da699ca04844514827af18b0318c66d2a3fbc6e
2020-04-22 11:34:42 +08:00
James Wei
19ded228a3 MTP: Add MtpDatabase unit test
Add Thumbnail feature test cases

Bug: 117863715
Test: atest MtpTests
Change-Id: I5a09efef10df20e382a4c623481e048e7b35ff14
2020-04-22 03:20:02 +00:00
Wonsik Kim
b8ebdb38cb media: fix MediaCodec operations using HardwareBuffer
Bug: 154111004
Bug: 154108503
Test: atest CtsMediaTestCases:MediaCodecBlockModelTest
Change-Id: Ia2891f2fde5bc48055c093d450ca3ee2cc62f30d
2020-04-21 17:00:13 -07:00
Amy Zhang
aaa8e866d3 Merge "Complete the Cas System request/release/update implementation in TRM" into rvc-dev 2020-04-21 18:56:39 +00:00
Eric Laurent
81b99eda9b Merge "AudioManager: fix event handler" into rvc-dev 2020-04-21 16:07:15 +00:00
Kyunglyul Hyun
e66ac51ea3 Merge "Use session hints when create a session from MR2Manager" into rvc-dev 2020-04-21 11:17:38 +00:00
Kyunglyul Hyun
350d7b427e Clear routes when media router manager has no callback
This CL clears routes when the last callback of MediaRouter2Manager
is unregistered. By doing this, we can ensure
MediaRouter2Manager#getAvailableRoutes() returns correct routes
during at least a single callback is registered.

A test for the behavior is added as well.

This CL also fixed a bug that unregistering a callback from MediaRouter2
disconnects it when multiple callback is used.

Bug: 153515567
Test: atest mediaroutertest & cts test & manually
 using MediaRouter2Demo and Sample OutputSwitcher to see
 if forgotten BT device is correctly removed.
 (w/o this CL forgotten BT device remains)
Change-Id: I31a5001115f1f163c8971bbd906516551b860252
2020-04-21 14:58:31 +09:00
Kyunglyul Hyun
f0eb51bc40 Use session hints when create a session from MR2Manager
When MR2Manager requests to create a routing session, it should pass
session hints to the target provider.
This CL adds a logic that MR2Manager asks media router instance to
get session hints to be passed to the provider.

Bug: 152851868
Test: atest mediaroutertest
Change-Id: Ib421f61f663090c6ed95c8b1a2f7deeb80e5be16
2020-04-21 14:17:08 +09:00
Eric Laurent
f3a10cd244 AudioManager: fix event handler
Fix access by reference to listener list outside of
synchronized block by cloning the list.

Bug: 154341343
Test: AudioPolicyTest#testAudioPorts, AudioManagerTest#testVolumeGroupCallback, AudioRoutingTest
Change-Id: I1f0fd62c1894dc0dbb07b01f2fd78899e48b4932
2020-04-21 01:17:12 +00:00
TreeHugger Robot
7c33cc554d Merge "Make some minor improvements to MediaFormat" into rvc-dev 2020-04-20 19:37:26 +00:00
Santiago Seifert
2a747f8d53 Make some minor improvements to MediaFormat
Test: atest CtsMediaTestCases:MediaExtractorTest
Test: atest CtsMediaParserTestCases
Bug: 154524134
Change-Id: Ie1d42b200f13a2ce5292c5a06ee979e8d74bbe43
2020-04-20 19:37:07 +00:00
Andrei Litvin
3b92b9682d Add support for GamePad api in ITvRemoteServiceInput.
Gamepad-specific API is a separtate input path from standard "remote"
service. Specifically it adds:
  - openGamepad that creates a virtual input device with
  gamepad-specific suport
  - send gamepad keys
  - send gamepad axis updates, which support joysticks, analog triggers
  and HAT axis (as an alternative to DPAD buttons).

Bug: 150764186

Test: atest media/lib/tvremote/tests/src/com/android/media/tv/remoteprovider/TvRemoteProviderTest.java

Test: flashed a ADT-3 device after the changes. Android TV Remote
      on my phone still worked in controlling the UI.

Merged-In: I49612fce5e74c4e00ca60c715c6c72954e73b7a3
Change-Id: I49612fce5e74c4e00ca60c715c6c72954e73b7a3
(cherry picked from commit 9b9f556af1)
2020-04-20 10:42:58 -04:00
shubang
40454dbdcb Tuner JNI: descrambler
And minor filter changes

Bug: 139308734
Test: mmm
Change-Id: Ibf4ac61476690438f86a93142547f7c80d1375d6
2020-04-17 21:23:06 -07:00
Amy Zhang
e1e65f18c0 Complete the Cas System request/release/update implementation in TRM
Test: atest
Bug: 154076250
Change-Id: Ifaf80a3e91807e1b47e780d2b5fd699412e1e7cc
2020-04-18 01:19:34 +00:00
Amy Zhang
8b28b4b058 Merge "Add client Id as the parameter of all the release resources APIs in TRM" into rvc-dev 2020-04-17 03:31:43 +00:00
Amy Zhang
2e5801340c Add client Id as the parameter of all the release resources APIs in TRM
Test: atest com.android.server.tv.tunerresourcemanager
Bug: 150952662
Change-Id: I7a028dfde8d93148f3a4c0dd1a607533f8a7b1a7
2020-04-16 17:32:59 -07:00
Amy Zhang
21095a62eb Merge "Complete Lnb update/request/release implementation in TRM" into rvc-dev 2020-04-16 23:26:50 +00:00
TreeHugger Robot
13646bb12e Merge changes from topic "tuner_cts_scanning" into rvc-dev
* changes:
  Complete Frontend release implementation in TRM
  Tuner FW: handle release frontend
2020-04-16 23:15:06 +00:00