Commit Graph

15993 Commits

Author SHA1 Message Date
Kyunglyul Hyun
55e5ac8fc0 Merge "Add address to MediaRoute2Info" into rvc-dev 2020-06-11 10:53:55 +00:00
Hyundo Moon
f3ff3de37e Merge "Prevent abuse of MediaRoute2ProviderService#notifyRequestFailed()" into rvc-dev 2020-06-11 01:10:25 +00:00
Ytai Ben-tsvi
3917b729a6 Merge changes Ibf4ecdb4,I1e4adf9f into rvc-dev
* changes:
  Correctly propagate service state change
  Support null audio format in recognition event
2020-06-10 19:31:42 +00:00
Kyunglyul Hyun
1ea19b1d01 Add address to MediaRoute2Info
The route ID of a bluetooth route was its hardware address and
SettingsLib depended on that to get BluetoothDevice.

We can't use the address as ID for a pair of hearing devices,
which has their own address but should have the same route ID.

Instead, this CL adds "address" field explictly to be used for bluetooth
routes.
Maybe it can be used by other devices as well.

Bug: 157708273
Test: make -j42 RunSettingsLibRoboTests && cts test
Change-Id: Ib940da9975fc8d68ec3fb7cf2c4a85c0d1a195f3
2020-06-10 20:59:15 +09:00
Ytai Ben-Tsvi
7caef40ad0 Support null audio format in recognition event
The audio format doesn't always make sense in recognition events, for
example in a failure or abort event, so we allow it to be null.
However since the SoundTrigger.java API doesn't allow that, we inject
a default if it is not available.

Bug: 157496890
Test: Simulated a device that doesn't support concurrent capture,
      reproduced the bug, applied the fix, verified.
Change-Id: I1e4adf9f3ccdc0f62cb9ca5e8c07df3c40a9d2cd
2020-06-09 16:05:19 -07:00
TreeHugger Robot
275248ddfe Merge "media: further resource cleanup for async release" into rvc-dev 2020-06-09 17:41:01 +00:00
Hyundo Moon
9b5e3923d1 Prevent abuse of MediaRoute2ProviderService#notifyRequestFailed()
The method can be called with a random requestId, or called multiple
times with the valid requestId. It can result unnecessary calls
to MediaRouter2Manager#onRequestFailed().

This CL resolves this problem.

Bug: 157873556
Test: Passes CTS and mediaroutertest
Change-Id: Ia7dd4ddafd532b9f23bf19491a0820d5a74f6a70
2020-06-09 19:12:30 +09:00
Hyundo Moon
5aacc569c7 Merge "MediaRouter2: Add missing synchronized(sRouterLock) block" into rvc-dev 2020-06-09 06:40:51 +00:00
TreeHugger Robot
2950ebf07d Merge "Add MediaRouterManager.Callback#onSessionReleased" into rvc-dev 2020-06-09 06:10:19 +00:00
Kyunglyul Hyun
fe7b5b125b Add MediaRouterManager.Callback#onSessionReleased
Add the callback to let MediaRouter2Manager get notified
of released sessions.
A test is also added to check if the manager is aware of
a released session when the session is released from the
media router.

Bug: 157872573
Test: atest mediaroutertest
Change-Id: Ifb96b23ed61cc15f5015c453727a487c3b09a92b
2020-06-09 13:13:30 +09:00
Wonsik Kim
d4ce4e3074 media: further resource cleanup for async release
Bug: 158158088
Test: atest CtsMediaTestCases:MediaCodecCapabilitiesTest#testGetMaxSupportedInstances
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: Ie8ab527516836624837c96fa4fdae4dcffe18f43
2020-06-08 11:58:16 -07:00
Hayden Gomes
50980050a6 Merge "Adding lock to sendEventFromNative" into rvc-dev 2020-06-08 16:02:49 +00:00
TreeHugger Robot
e3767bdaae Merge "Ignore transfer to an unknown route" into rvc-dev 2020-06-08 11:34:35 +00:00
TreeHugger Robot
6b1cfced63 Merge "Notify a failure on transfer timeout" into rvc-dev 2020-06-08 11:34:13 +00:00
Hyundo Moon
23a9e17874 MediaRouter2: Add missing synchronized(sRouterLock) block
Bug: 157873496
Test: Builds successfully
Change-Id: I87882c642bcdd93a2fedd9ad2c6c5dc54eada598
2020-06-08 15:48:56 +09:00
Hyundo Moon
ebb7ae6679 Merge "MediaRouter2: Sync routes when first RouteCallback is registered" into rvc-dev 2020-06-08 06:07:31 +00:00
Hayden Gomes
14e3bd0c3e Adding lock to sendEventFromNative
Eliminate potential race condition for postEventFromNative.

Fixes: 157755647
Test: atest com.android.car where race condition was hit
Change-Id: I5d11f8769d2c09a6a630332db447302e06a5869b
2020-06-05 10:15:42 -07:00
Kyunglyul Hyun
8df5fb6e7d Notify a failure on transfer timeout
When a transfer is ignored by the provider.
It is handled as a failure by MediaRouter2Manager.

A test is added for timeout, which takes 30 seconds.

Bug: 157875723
Test: atest mediaroutertest
Change-Id: I3f0ec77551309c96f8f589057800082f6121d4e2
2020-06-05 18:22:42 +09:00
Hyundo Moon
bc63327359 MediaRouter2: Sync routes when first RouteCallback is registered
Bug: 149526397
Test: Passed CTS and mediaroutertest
      Also checked logs that DEFAULT_ROUTE is not added.
Change-Id: Icc0a5f2ea8f93fd7baba132a9bd4a1f9d798bba9
2020-06-05 17:38:04 +09:00
Automerger Merge Worker
7daf2ca947 Merge "Merge "Fix TvRecordingClient api issues" am: cce2ca958e am: f7cbbae9e4" into rvc-dev-plus-aosp am: 14bd7ccbb0 am: f9061f953d am: 4276a00208
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/972628

Bug: 134042967

Change-Id: Ib3ca9467b68563383fef4dbc0f11b0f4aa8fd111
(cherry picked from commit 69244518dd)
2020-06-05 05:01:31 +00:00
Henry Fang
084e7473fb Merge changes I9f8ce2e5,I3142b073 into rvc-dev
* changes:
  Add the metrics for status of open cas session
  Add the metrics for DVR status
2020-06-04 17:18:14 +00:00
Kyunglyul Hyun
0eadc17150 Merge "Fix MediaRoute2ProviderService TODOs" into rvc-dev 2020-06-04 07:05:29 +00:00
Henry Fang
fd40c07abe Add the metrics for status of open cas session
Metrics review request:  b/155199791
Metrics design review is updated at https://eldar.corp.google.com/assessments/937523088/drafts/927800491

bug: 154661158
Test: Manual
Change-Id: I9f8ce2e52289130f9fb39a368240676c1792c154
2020-06-03 12:38:03 -07:00
Henry Fang
1ae85bb287 Add the metrics for DVR status
Metrics review request:  b/155199791
Metrics design review is updated at https://eldar.corp.google.com/assessments/937523088/drafts/927800491

bug: 154661158
Test: Manual
Change-Id: I3142b0737f7469a79a526281b75a06d3dbf97483
2020-06-03 12:31:00 -07:00
Kyunglyul Hyun
a3be2de6ec Ignore transfer to an unknown route
This CL ignores attempts to transfer to unknown route in
MediaRouter2Manager.
This CL also fixes wrong acquisition of locks when getXXXRoutes.

Bug: 157875504
Test: atest mediaroutertest
Change-Id: Ic3415844551c672b42d19d9744d7538a9d7df7c3
2020-06-03 18:04:18 +09:00
Jing Ji
322b748b8d Merge "Update docs for MediaProjectionManager.getMediaProjection" into rvc-dev 2020-06-02 19:12:49 +00:00
Jing Ji
fd7b013f71 Update docs for MediaProjectionManager.getMediaProjection
It actually needs the foregroud service to be the type "mediaProjection"

Bug: 157265923
Test: m -j ds-docs-java
Change-Id: Ia5aab928be1755e3117432bdec423e88f997c55b
2020-06-02 10:39:46 -07:00
Kyunglyul Hyun
d344655969 Fix MediaRoute2ProviderService TODOs
This CL ignores requests that contain unknown session IDs and
make sure sequence of binder calls are aligned with notifySession
Created/Updated/Released.

Bug: 157873546
Bug: 157873487
Test: Run CTS and atest mediarouter test
Change-Id: Ie31e2fca8160093cf54886180e67d40865a35d6d
2020-06-02 17:32:57 +09:00
Hyundo Moon
5c8f3b20d5 Merge "Add bug numbers for TODOs in MediaRouter2 related classes" into rvc-dev 2020-06-02 08:16:58 +00:00
Andy Hung
09e865b694 SoundPool: fix fcntl argument
Fixes flakiness introduced by commit 77eb2bda0e

Test: android.media.cts.SoundPoolAacTest
Test: android.media.cts.SoundPoolHapticTest
Test: android.media.cts.SoundPoolMidiTest
Test: android.media.cts.SoundPoolOggTest
Test: android.media.cts.AudioManagerTest#testSoundEffects
Bug: 157924783
Change-Id: I8371c93337852424e2b47a17e5a19a1caaf2600f
2020-06-01 16:38:26 -07:00
Andy Hung
7360685765 Merge "SoundPool: Fix verbose logging compilation" into rvc-dev 2020-06-01 21:04:33 +00:00
Andy Hung
ce8e6daa9a SoundPool: Fix verbose logging compilation
Make compatible with clang warning / thread safety.

Test: build verbose and logcat
Bug: 157618660
Change-Id: I773f446561b86a0f3a8b5ddc355cfe6adf0d4294
2020-06-01 09:51:46 -07:00
Hyundo Moon
0f78fc6ab8 Add bug numbers for TODOs in MediaRouter2 related classes
This CL adds bug nubmers for TODOs which are needed to resolve in
Android R timeframe.

Bug: 157875570
Test: Builds successfully
Change-Id: I8d5adcabb4ec42feabf38ac3cedcd63e9a5a9cf2
2020-06-01 17:40:08 +09:00
Jeff Sharkey
3744bcd288 Load video thumbnails using ARGB_8888 for quality.
Based on feedback from a partner, it sounds like getFrameAtTime()
and getScaledFrameAtTime() may end up returning low-quality bitmaps.

To make it clear that we want to create high-quality thumbnails,
this change explicitly requests ARGB_8888.

Bug: 157448043
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I39c7c552e8fa715ec13efa75c1c3a30d58492bfb
2020-05-30 12:12:18 -06:00
Wonsik Kim
dc53f28811 Merge "media: fix JNI call for 32-bit" into rvc-dev 2020-05-29 20:18:13 +00:00
Wonsik Kim
d319a44c11 media: fix JNI call for 32-bit
Bug: 157528365
Test: atest CtsMediaTestCases:MediaCodecBlockModelTest
Change-Id: Ibe64c8c5187a6c00b14027823a4d19de1c131530
2020-05-28 17:57:17 -07: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
Andy Hung
8b5bc1ff73 Merge "SoundPool: Add clang-tidy and fix" into rvc-dev 2020-05-27 19:31:29 +00:00
Andy Hung
77eb2bda0e SoundPool: Add clang-tidy and fix
Test: soundpool_stress
Test: SoundPoolAacTest
Test: SoundPoolHapticTest
Test: SoundPoolMidiTest
Test: SoundPoolOggTest
Bug: 157501605
Change-Id: I7bba857a8b44b6255d423086127da0e2df4ce1c4
2020-05-27 10:47:41 -07: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
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
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
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
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
Henry Fang
d026dffb65 Merge "Added 1st atom for Tuner Metrics" into rvc-dev 2020-05-19 02:44:27 +00:00
Gopalakrishnan Nallasamy
7f42b75525 Merge "MediaMuxer:Maintain proper state after stop()" into rvc-dev 2020-05-19 00:33:30 +00:00
Wonsik Kim
33db90860f Merge "media: fix encrypted buffer handling" into rvc-dev 2020-05-18 19:54:35 +00:00