Commit Graph

8913 Commits

Author SHA1 Message Date
hkuang
6953d2bb6e Transcoding API: Hook up with media.transcoding service.
Note the test is tested with a mock transcoding service.
Another test will be added when the service's transcoding
is up and running.

Also remove the jni call and talk with service directly.

Bug: 145628554
Test: atest MediaTranscodeManagerTest
Change-Id: Ifd7babb235fcd034ba7ee1758985a9e4d031170c
2020-05-28 18:16:22 -07:00
Santiago Seifert
227a28f148 Merge "Complete CryptoInfo.toString" into rvc-dev am: a5dc451305 am: 0dff7ecaf3 am: 3acfa18bed am: 81cc755689
Change-Id: I7090af8dec65e9780e8a49786f1cf57b9e986c6c
2020-05-28 17:19:26 +00:00
Santiago Seifert
a5dc451305 Merge "Complete CryptoInfo.toString" into rvc-dev 2020-05-28 16:21:19 +00:00
Santiago Seifert
e5cc58f3a3 Complete CryptoInfo.toString
Bug: 154120292
Test: presubmit
Change-Id: I67fdd5ad3cc327d5ab91aa1bfe3928c67463be8f
2020-05-28 14:18:25 +01:00
TreeHugger Robot
4381c855bf Merge "Tuner API: make DvrPlayback.attach/detachFilter no-ops" into rvc-dev am: cc0b494bb0 am: ebbe9095e2 am: 7ee4c85e08 am: 7936af7954
Change-Id: I64b7d15d964bfc1e1c5507b396308102811760b7
2020-05-27 11:13:54 +00:00
shubang
1dc13378a2 Tuner API: make DvrPlayback.attach/detachFilter no-ops
Will mark them @deprecated or @removed in next version

Bug: 155435894
Test: make
Change-Id: If5bf3604ed10721f80162d54951eb38bb8084646
2020-05-27 08:18:58 +00:00
Automerger Merge Worker
432000fef9 Merge "Merge "Add support for TvInputManager.acquireTvInputHardware CTS" into rvc-dev am: f49fa1a9ea am: b7e62faf05 am: 1c4bcda424" into rvc-qpr-dev-plus-aosp am: cce2d11a1c
Change-Id: I8e145e9a194fad5b6e78f50016af542a0d384ef1
2020-05-27 05:28:15 +00:00
TreeHugger Robot
dc8e918f52 Merge "Tuner FW: fix filter type check." into rvc-dev am: 9c03ae0623 am: e0ab676c03 am: 6cd700178c am: 5740cc08dc
Change-Id: I7525b570e6d6d9a3073e21b9315159b6bf57ead4
2020-05-27 05:13:27 +00:00
TreeHugger Robot
f49fa1a9ea Merge "Add support for TvInputManager.acquireTvInputHardware CTS" into rvc-dev 2020-05-27 04:39:45 +00:00
shubang
491eaba9be Tuner FW: fix filter type check.
Java subtype and HAL subtype don't match, which lead to a bug in
configure();

Other minor fixes.

Bug: 157278203
Test: make; cts;
Change-Id: I791d3a06c68499cf359fd718d2ca24a20ac35796
2020-05-27 00:07:12 +00:00
TreeHugger Robot
6aa8940973 Merge "Replace "allow-frame-drop" with KEY_ALLOW_FRAME_DROP" 2020-05-26 15:21:40 +00:00
Robin Lee
3d3b67430a Merge "Fix volume key handling for key press repeat" into rvc-dev am: 59b3f7c7f0 am: 59d9917672 am: d0c9c6624f am: 0180eb2fc9
Change-Id: I31f6db40b1ea9092272f7f5428e50781a767fbc9
2020-05-25 20:57:51 +00:00
Ray Essick
43132a9ab8 Replace "allow-frame-drop" with KEY_ALLOW_FRAME_DROP
Also, provide javadoc describing the semantics.

Bug: 153165698
Test: build
Change-Id: I0deebe2ad9ab6857cf525f09f865b562142c1010
2020-05-25 11:46:54 -07:00
Jean-Michel Trivi
7c7016071a Fix volume key handling for key press repeat
The original code for translating volume key presses into CEC
commands was sending the equivalent of a key up / key down for
each call to adjustSuggestedStreamVolume. This behavior caused
CEC commands to pile up in HdmiControlService, and a repeated
key press (user keeping finger on volume button on remote) would
cause volume to still change on the CEC device handling volume
even after the key was released.
  The fix consists in changing how PhoneWindowManager communicates
with AudioService, by passing the key event directly, so AudioService
can communicate the key up / key down information to the CEC
library, which already deals with repeated commands on the CEC bus.

Bug: 137311120
Test: connect DUT to CEC TV or receiver capable of handling vol cmds,
  keep pressing on vol key, verify releasing key stops volume
  changes on TV/receiver.

Change-Id: I7a75af651b6b424129515a8991b5afb15c62dba3
Merged-In: I7a75af651b6b424129515a8991b5afb15c62dba3
(cherry picked from commit 12ba113894ec8ad7c24913a0a09ea70047d25353)
(cherry picked from commit 7e58c9145d71ba92053ad6629f910456566cfea9)
2020-05-25 10:22:38 +02:00
TreeHugger Robot
b185a72631 Merge "Tuner JNI: fix filter.read and DvrSettings" into rvc-dev am: 7b42f2d3e5 am: 317989579c am: 056ebb7d31 am: 7ab6a2ec9b
Change-Id: Ia442b873d6886a1294b564cdb18e0cd7e8c892b8
2020-05-22 01:59:17 +00:00
TreeHugger Robot
7b42f2d3e5 Merge "Tuner JNI: fix filter.read and DvrSettings" into rvc-dev 2020-05-22 00:53:38 +00:00
shubang
e8cb82c545 Tuner JNI: fix filter.read and DvrSettings
and some minor changes

Test: make; cts;
FIX: 157083380
Change-Id: I9dcd25594ab27f31bc417eefbb6424bec49fc27f
2020-05-20 18:51:06 -07:00
TreeHugger Robot
01208327a0 Merge "AudioService: permission for volume adjustment to lowest values" into rvc-dev am: 962f676619 am: 2d3be17e85 am: 47b29d9393 am: ca9554ae98
Change-Id: Ia33018351bf0a8599ae281b1b67c034506340f4a
2020-05-20 18:53:14 +00:00
Jean-Michel Trivi
803c3158b1 AudioService: permission for volume adjustment to lowest values
Define an attenuation threshold under which the
MODIFY_AUDIO_SETTINGS permission is required to adjust volume.
  Verify permission at the interface of audio service, and
propagate this information so its used when getting a valid
index during a volume adjustment or set.
  Make the audio service dump display the min index when it
differs from the normal min index.
  Enforcement is only for STREAM_ALARM.

Bug: 137015603
Test: use POC app in bug, verify ALARM volume not at 1 with \
      adb shell dumpsys audio
Change-Id: I7ccb50e314bb0e27ba25346eab9cdd3e4dd1dceb
2020-05-20 08:57:50 -07:00
TreeHugger Robot
547bf77641 Merge "Revert "AudioService: permission for volume adjustment to lowest values"" into rvc-dev am: f2856e3be5 am: c3a5d7b02c am: 4ab681d9d5 am: cbd8f00e17
Change-Id: Ica7a513e9def5b4ae309901c6cffa178df772a14
2020-05-20 12:33:06 +00:00
Mark Chien
455d373861 Revert "AudioService: permission for volume adjustment to lowest values"
This reverts commit a8f97ffdaa.

Reason for revert: break git_master of errorprone target

out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/errorprone/srcjars/frameworks/base/services/core/java/com/android/server/audio/AudioService.java:4710: error: [EqualsNaN] == NaN always returns false; use the isNaN methods instead
                MIN_STREAM_VOLUME[AudioSystem.STREAM_ALARM], deviceForAlarm) == Float.NaN) {
                                                                             ^
    (see https://errorprone.info/bugpattern/EqualsNaN)
  Did you mean 'if (Float.isNaN(AudioSystem.getStreamVolumeDB(AudioSystem.STREAM_ALARM,'?

Bug: 157108450

Change-Id: Icf74dcbefccee6138473101e8dc23fba35faf5ce
2020-05-20 06:18:37 +00:00
Jean-Michel Trivi
2fe39e16a3 Merge "AudioService: permission for volume adjustment to lowest values" into rvc-dev am: f2a05b6210 am: 3150a36757 am: c93dc96aa3 am: f8fedbe421
Change-Id: Icdaf60839b315eafa7b7d0119adf8d8b477b40f4
2020-05-20 03:07:15 +00:00
Jean-Michel Trivi
a8f97ffdaa AudioService: permission for volume adjustment to lowest values
Define an attenuation threshold under which the
MODIFY_AUDIO_SETTINGS permission is required to adjust volume.
  Verify permission at the interface of audio service, and
propagate this information so its used when getting a valid
index during a volume adjustment or set.
  Make the audio service dump display the min index when it
differs from the normal min index.
  Enforcement is only for STREAM_ALARM.

Bug: 137015603
Test: use POC app in bug, verify ALARM volume not at 1 with \
      adb shell dumpsys audio

Change-Id: I083a26fd8eeebd4e5434ed02a4a803cbb920ab84
2020-05-19 14:07:43 -07:00
Henry Fang
1387ba00d6 Merge "Added 1st atom for Tuner Metrics" into rvc-dev am: d026dffb65 am: f5a1878aeb am: a20ae8b63c am: 83b563dffb
Change-Id: I3c96773f9827e68ab4f3ebb0a73cde10b8b6edca
2020-05-19 03:48:17 +00:00
Henry Fang
d026dffb65 Merge "Added 1st atom for Tuner Metrics" into rvc-dev 2020-05-19 02:44:27 +00:00
Gopalakrishnan Nallasamy
f466585785 Merge "MediaMuxer:Maintain proper state after stop()" into rvc-dev am: 7f42b75525 am: 700fa1f40d am: 65c68d8011 am: 177df91bae
Change-Id: I68dc781f367494c26f6fd331dcc10bb388ab1283
2020-05-19 01:08:09 +00:00
Gopalakrishnan Nallasamy
123e60ed82 MediaMuxer:Maintain proper state after stop()
MediaMuxer.java: move to stop state even if nativeStop() throws
exception.
android_media_MediaMuxer.java: revert recent change, throw
only runtime exception for any error as it used to be. Log error now.

Bug: 156649746

Test: atest android.media.cts.MediaMuxerTest
      atest android.media.cts.MediaRecorderTest
      atest android.mediav2.cts.MuxerTest

Change-Id: I82e16fcb065a40f25036bbad181798f1fd36132b
2020-05-18 16:45:16 +00:00
Eric Laurent
c753ca8e93 Merge "AudioService AudioDeviceBroker: fix speakerphone control" into rvc-dev am: bf01a79a83 am: 65701ab11d am: a8cad7250f am: 26454bc3b9
Change-Id: I7f453fb7ce8fb88ee6aff562f66acc9c89bc0067
2020-05-16 04:54:51 +00:00
Eric Laurent
bf01a79a83 Merge "AudioService AudioDeviceBroker: fix speakerphone control" into rvc-dev 2020-05-16 03:58:21 +00:00
TreeHugger Robot
9d01aab4e9 Merge "Have IMMS report IME UID to AudioService" into rvc-dev am: d61819746b am: ab64a27732 am: 1ffd0533a4 am: 942420e5bb
Change-Id: I2e682517bcf59be2a7f8cd9e6885c630961e54a3
2020-05-16 01:57:07 +00:00
Eric Laurent
3aad0adc9f AudioService AudioDeviceBroker: fix speakerphone control
Add a list of clients for speakerphone mode requests similar
to Bluetooth SCO clients. This allows to keep track of requests
by different apps in case of overlap or concurrency and to apply
the most relevant mode according to current audio mode owner.

Also:
- Restore requested speakerphone mode when SCO audio is disconnected
instead of returning to earpiece.

- Remove special check on permission while in call in
AudioService.setSpeakerphoneOn because the priority is now
managed by AudioDeviceBroker based on audio mode owner (the owner
for MODE_IN_CALL must have the modify phone state permission).

- Fix condition in AudioService.setMode() preventing from changing
mode while in call. Now allows releasing mode to NORMAL or
reapplying the same mode and just change mode owner.

- Add more information in dumpsys for AudioDeviceBroker and BtHelper.

Bug: 154464603
Test: test transitions between cell call and VoIP calls
Test: Test regressions with calls in speakerphone mode and Bluetooth
Test: AudioManagerTest#testRouting, NoAudioPermissionTest#testRouting

Change-Id: I0d288acf2373c96d52eb91a6ab7142cc3535c719
2020-05-15 16:15:23 -07:00
TreeHugger Robot
03baf1d960 Merge "Modify java doc" 2020-05-15 20:36:52 +00:00
Yohei Yukawa
d5f402bd0b Have IMMS report IME UID to AudioService
This is a follow up CL to our previous CL [1], which enabled
AudioService to be notified about the UID of the currently used IME.

Although there is no change in the overall approach, with the help
from InputMethodManagerService AuditoService can be notified new IME
UIDs more quickly especially when IMEs are switching to other ones
(e.g. due to user switching or profile switching).

 [1]: I11e17b13513627c88ccb8e4db66c5359e9ee7f7b
      ed4e8c3fab

Bug: 147037345
Test: use voice input with Gboard 9.5.0 during a simulated RTT call.
Change-Id: I44e3331a7bad6d36227f7e2d0523dd14d933b6a1
2020-05-15 10:23:32 -07:00
Amy Zhang
5f8498bcf1 Add support for TvInputManager.acquireTvInputHardware CTS
1. Add a test api in TvInputManager to add hardware device for testing
2. Add Shell permission for TV_INPUT_HARDWARE
3. Add TUNER_RESOURCE_ACCESS permission for TvInput Framework.

Test: atest android.media.tv.cts
Bug: 155114656
Change-Id: I227f13cbf14532d8732729412ae9c2518755ef02
2020-05-14 17:37:52 -07:00
Henry Fang
e316ab61e6 Added 1st atom for Tuner Metrics
Metrics review request b/155199791

This Cl follows up http://ag/c/11203604/8

bug: 154661158
Test: Manual
Change-Id: I7d41a71c724b7f5395d213dc63000739e55b4a43
2020-05-15 00:16:33 +00:00
Dichen Zhang
e36fd0282c Modify java doc
Modified java doc for METADATA_KEY_SAMPLERATE and
METADATA_KEY_BITS_PER_SAMPLE in MediaMetadataRetriever.

Test: api update
Bug: 155718941

Change-Id: I3d0d7acf1cafc53d635744810238e9bb6b57b917
2020-05-12 16:05:59 -07:00
Alan Stokes
3f6b755362 Merge "Grant SYSTEM_ALERT_WINDOW during screen capture." into rvc-dev am: 9b081e496d am: 1b822b337b am: 4c88e950f5 am: 20be15fe43
Change-Id: If7030303222ca136efffcc3a5d64b09908abf24d
2020-05-12 15:58:46 +00:00
Alan Stokes
b3d4b64c0d Grant SYSTEM_ALERT_WINDOW during screen capture.
While an app has an active screen capture MediaProjection, enable the
SYSTEM_ALERT_WINDOW app op for it if it requests the permission and
the user hasn't explicitly allowed or denied it. This enables the app
to use TYPE_APPLICATION_OVERLAY windows to show custom UI on top of
what is being captured. Needed for live-streaming apps.

Test: Manual, using a hand-written fake recording app and a real one
Test: atest MediaProjectionTest
Bug: 148002116
Change-Id: I503f3223608627c80520e98be840f793efd53d2a
2020-05-12 14:17:21 +01:00
TreeHugger Robot
0dc151636a Merge "MediaRouter2: Fix getRoutes() returning an empty list" into rvc-dev am: 81fd503701 am: 7f1571e92a am: 5729ee5296 am: 44fb125c5e
Change-Id: I3865b2b828cefd49c8d8644b4ab7670126cd1dcd
2020-05-12 09:02:12 +00:00
TreeHugger Robot
81fd503701 Merge "MediaRouter2: Fix getRoutes() returning an empty list" into rvc-dev 2020-05-12 07:42:33 +00:00
Automerger Merge Worker
c8d808b27c Merge "Merge "Make MediaRouter2Manager connect to the system ASAP" into rvc-dev am: 15cd47ed26" into rvc-dev-plus-aosp am: 4b91451a62 am: e05e6dd25b am: 2a65e84274
Change-Id: Ia5172a9ded99eb25de4afbb04552e2377ad63826
2020-05-12 07:19:45 +00:00
Hyundo Moon
ef682fd78b MediaRouter2: Fix getRoutes() returning an empty list
By doing this, calling getRoutes() after instantiation will not return
an empty list.

Bug: 156319555
Test: Passed CTS
Change-Id: I4e5158b89d54e06f36dc37a3ca345849f0c91440
2020-05-12 14:02:24 +09:00
Kyunglyul Hyun
ccb9587ae1 Make MediaRouter2Manager connect to the system ASAP
With this CL, some methods such as getAllRoutes, getActiveSessions
can be used without registering a callback.

Bug: 155042836
Test: atest mediaroutertest
Change-Id: Iba38d73a95c1d184bc89ff91d128b00109029d0a
2020-05-12 13:21:30 +09:00
Jiabin Huang
743ec0cb1d Merge "Support query encapsulation information." into rvc-dev am: acc2acafe7 am: b6f9d6aa03 am: 9318d709d6 am: 4eb6d7c348
Change-Id: I3386bb18e12a7741470671ebe7a9943aae646fd8
2020-05-10 05:59:56 +00:00
Jiabin Huang
acc2acafe7 Merge "Support query encapsulation information." into rvc-dev 2020-05-08 18:26:31 +00:00
Kyunglyul Hyun
8feb0a6087 Merge "Filter selectable/deselectable routes" into rvc-dev am: 2eec783e52 am: 65600663fa am: 4be44c0129 am: 5c97bcef8e
Change-Id: Iee524a888dc8011f8d128013397b5c570ee9449c
2020-05-08 11:18:10 +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
hkuang
a44bca0840 MediaTranscodingService: Implement TranscodingRequest.
Also add a lot of TODOs to make sure we document all the things
in the API at the end.

Bug: 145628554
Test: atest MediaTranscodeManagerTest
Change-Id: Ia77ce381b3bbbe546c96ffe4e1c37675b0d238ee
2020-05-07 19:27:03 +00:00
Andy Hung
648e98f70e Merge "AudioMetadata: Translate KEY_ATMOS_PRESENT for JNI" into rvc-dev am: 65c14feec9 am: ad914e2c08 am: 13047d0bf6 am: 33d0361e2e
Change-Id: I8d8e8ff9477c424f73bca1e15a1ce5ee25b0c970
2020-05-07 04:45:30 +00:00