Commit Graph

9079 Commits

Author SHA1 Message Date
Hangyu Kuang
5a6a574094 Merge "transcoding: Add HEVC->AVC transcoding test." 2020-06-24 19:02:10 +00:00
TreeHugger Robot
e7595723dd Merge "Fix CryptoInfo.toString" into rvc-dev am: 4b23ea8b74 am: a79ec4979e am: d8e4e24521 am: f6f58cce56
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11986780

Change-Id: I4f2c5014e1b4b0dd88a8d93b9efc848c46b57ae4
2020-06-24 17:42:59 +00:00
TreeHugger Robot
f6f58cce56 Merge "Fix CryptoInfo.toString" into rvc-dev am: 4b23ea8b74 am: a79ec4979e am: d8e4e24521
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11986780

Change-Id: Id6024c319cabc3d9efec3c689b732231cfaf0459
2020-06-24 17:29:05 +00:00
TreeHugger Robot
4b23ea8b74 Merge "Fix CryptoInfo.toString" into rvc-dev 2020-06-24 16:58:11 +00:00
hkuang
331fbc0434 transcoding: Add HEVC->AVC transcoding test.
1) This CL verifies hevc to avc transcoding is working.
Still need to verify the transcoding result in the
coming CLs.
2) This CL also fix a bug that the track format
is not set when sending job to transcoding service.

Bug: 145628554
Bug: 154734285
Test: Unit test

Change-Id: Ia740e1e969357c3f719966c114f1e5182f4d7f66
2020-06-24 09:31:04 -07:00
Makoto Onuki
b319264289 Merge "Remove unnecessarily @System/TestApi annotations" 2020-06-24 15:07:15 +00:00
Santiago Seifert
3c715d5778 Fix CryptoInfo.toString
It's using the key length when it should use the iv length.

Bug: 154120292
Test: Manually.
Change-Id: I98d71b974688acbeef0c7112298c5edf37d47ef7
2020-06-24 14:58:47 +01:00
TreeHugger Robot
df43b7146a Merge "Remove hidden API usage in ExifInterface" 2020-06-24 12:32:28 +00:00
Jin Seok Park
12c3a9b230 Remove hidden API usage in ExifInterface
Copying over util class methods
ArrayUtils#startsWith(byte[], byte[])
Streams#copy(InputStream, OutputStream)
IoUtils#closeQuietly(AutoCloseable)

Bug: 159569080, Bug: 159569444, Bug: 159569092
Test: atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: I5f7f3387e88728809b55a0049fb1937a458d02cb
2020-06-24 17:15:41 +09:00
Automerger Merge Worker
712bf9b72c Merge "Merge "MediaRouter: Defer releasing routing controller when transfer" into rvc-dev am: 82ff3f1472 am: 31353b7e2f am: c6b3963a9d" into rvc-qpr-dev-plus-aosp am: 5e45f13d12
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11593494

Change-Id: Iff7ddf30ce35f2a315616f3fb11aab6088d4d28b
2020-06-24 07:25:46 +00:00
Kyunglyul Hyun
87e73f53fe Merge "MediaRouter: Defer releasing routing controller when transfer" into rvc-dev am: 82ff3f1472 am: 31353b7e2f am: c6b3963a9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11593494

Change-Id: I45a250ffb6fdb7251094b0ea8bf9c19e7af08446
2020-06-24 07:10:54 +00:00
Kyunglyul Hyun
82ff3f1472 Merge "MediaRouter: Defer releasing routing controller when transfer" into rvc-dev 2020-06-24 06:41:39 +00:00
Makoto Onuki
4290301e85 Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.

Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
2020-06-23 10:51:50 -07:00
Madhava Srinivasan
4c7dbb0f39 Merge "Persisting setDeviceVolumeBehavior calls" into rvc-dev am: d03a59938e am: 6a7997c4e1 am: e307ab2c09 am: 3b006e755c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11838112

Change-Id: I2a5f97e080139af27923c8a4350593ddf2527974
2020-06-23 15:48:24 +00:00
Madhava Srinivasan
e307ab2c09 Merge "Persisting setDeviceVolumeBehavior calls" into rvc-dev am: d03a59938e am: 6a7997c4e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11838112

Change-Id: Iff84d908762e9c195a0d029983be8cfc26c3e517
2020-06-23 15:20:13 +00:00
Madhava Srinivasan
d03a59938e Merge "Persisting setDeviceVolumeBehavior calls" into rvc-dev 2020-06-23 14:51:38 +00:00
Madhava Srinivasan
b5ed600d41 Persisting setDeviceVolumeBehavior calls
This change does the following
0. Robustly enforce setDeviceVolumeBehavior.
Prior to this change, setDeviceVolumeBehavior could have been overridden
in cases like HDMI_CEC enable/disable, HDMI re-plug, etc.

1. Persist setDeviceVolumeBehavior across AudioService restarts and
system reboots.
Prior to this change, setDeviceVolumeBehavior was lost on AudioService
crash/restart, or system restart.

2. Persist software volume across reboots.
Prior to this change, HDMI_OUT device was initialized as a "Fixed"
Volume device and then updated to either full volume device or
"variable" volume device based on the outcome of HDMI-Sink's CEC
capabilities. However, when connected to a non-CEC capable sink this
would result in audio resetting to 100% on each reboot.

3. Some refactoring around how mFixedVolumeDevices and
mFullVolumeDevices are updated in some instances.

Bug: 153193369
Bug: 155482023
Test: Locally on ADT3
Change-Id: I4adb38c64fe1ae7713992ab83acbd66bce4524a4
2020-06-22 20:22:01 -07:00
Kyunglyul Hyun
6a2f1d67b7 MediaRouter: Defer releasing routing controller when transfer
In order to allow media router to communicate with the old routing
controller for synchronizing media status during transfer,
this CL postpone releasing the old routing controller.

Basically media router should release the old routing controller by
itself when it's done with the old routing controller.
If it didn't, the old routing controller is automatically released
after timeout (30s for now)

This CL also clarifies "old routing controller" in onTransfer callback.
Now it is consistent regardless of who requested transfer.

A request from MediaRouter2Manager is handled by MediaRouter2 to
simplify session creation logic.
Limitation of this approach is that a routing session unknown to
MediaRouter2 can't be transferred to a different provider but it is out
of R scope so it's okay.

Bug: 158713035
Test: CTS test && atest mediaroutertest && manually transfer using
support v7 demos

Change-Id: I168af69e2a25240227aea0fd9e892eaa91e78ee3
2020-06-23 11:28:35 +09:00
Andy Hung
c4f387d60d Merge "AudioTrack: Update javadoc" into rvc-dev am: 72998aeaf7 am: 6176456336 am: 78a68c7d52 am: adf4610c68
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932147

Change-Id: Id9f454eccbc8dd5c5e98e268d07ec07980c96424
2020-06-22 18:10:21 +00:00
Andy Hung
adf4610c68 Merge "AudioTrack: Update javadoc" into rvc-dev am: 72998aeaf7 am: 6176456336 am: 78a68c7d52
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932147

Change-Id: I465a1b14889edc80ed401445ba86d973a3743415
2020-06-22 18:01:11 +00:00
Andy Hung
089a1435d0 Merge "AudioTrack: Update javadoc" into rvc-dev am: 72998aeaf7 am: 6176456336
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932147

Change-Id: Ife685c139b684edd186d0c2382c08e9bf0ab60b5
2020-06-22 17:35:34 +00:00
Andy Hung
72998aeaf7 Merge "AudioTrack: Update javadoc" into rvc-dev 2020-06-22 17:15:09 +00:00
Sungsoo Lim
a04d33d931 Merge "Prevent unnecessary call of setBluetoothA2dpOn(false)" into rvc-dev am: 7bfb0c31bf am: ca2e42f5c9 am: 8397173ae2 am: 2c0ba2e182
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926258

Change-Id: Ie55f9afb0d4bdfaf82c3c0fb5e4df52147d63041
2020-06-22 07:15:04 +00:00
Sungsoo Lim
8397173ae2 Merge "Prevent unnecessary call of setBluetoothA2dpOn(false)" into rvc-dev am: 7bfb0c31bf am: ca2e42f5c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926258

Change-Id: I31fec0a7e983e29a040980360bd63e29496d58a6
2020-06-22 06:51:26 +00:00
Sungsoo Lim
7bfb0c31bf Merge "Prevent unnecessary call of setBluetoothA2dpOn(false)" into rvc-dev 2020-06-22 06:23:42 +00:00
Kyunglyul Hyun
f034a802ce Merge "System routes are not automatically exposed" into rvc-dev am: c8f4a8a5e9 am: 387622bd1d am: d7243c4e39 am: de27fdfecb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926262

Change-Id: I3d6580fd406a72b3e1be68e40962872989b7e0ed
2020-06-22 05:49:00 +00:00
Kyunglyul Hyun
d7243c4e39 Merge "System routes are not automatically exposed" into rvc-dev am: c8f4a8a5e9 am: 387622bd1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926262

Change-Id: I06577d65a4f57e14fccddf90312be4054cb9b3ce
2020-06-22 05:21:00 +00:00
Kyunglyul Hyun
7e9568c241 Merge "Handle multiple active bluetooth devices" into rvc-dev am: 4b6472722e am: 4d65a4c37d am: 1597dfcf45 am: a7cc3651f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11947520

Change-Id: Ic944a387ed9cfcbccaa17b618fd5dae856ed16fb
2020-06-22 05:07:07 +00:00
Kyunglyul Hyun
c8f4a8a5e9 Merge "System routes are not automatically exposed" into rvc-dev 2020-06-22 04:52:17 +00:00
Kyunglyul Hyun
4d65a4c37d Merge "Handle multiple active bluetooth devices" into rvc-dev am: 4b6472722e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11947520

Change-Id: Ie1c4577698aab165e330516fad841641720b5293
2020-06-22 04:41:58 +00:00
Kyunglyul Hyun
e1b8006e2b Handle multiple active bluetooth devices
When dealing with a pair of hearing aid devices are active,
a single "selected route" is not sufficient.

Instead, this CL introduces activeRoutes which can hold multiple active
bluetooth route and deal with them.

Bug: 152585170
Test: cts tested & manually w/ A2dp BT devices
Change-Id: I2c2b8967d9f221db73f9d3b9332de7c76d07a0f9
2020-06-21 21:51:44 +09:00
Andy Hung
c1bd8cbfd3 AudioTrack: Update javadoc
Remove todo, audio TV metadata still pending final update for rvc-tv-dev.

AudioDeviceInfo.getEncapsulationModes suppresses return of
AudioTrack.ENCAPSULATION_MODE_NONE.

Test: make docs and check
Bug: 147778408
Change-Id: Ia7da6c3805e42f7a6b9a3b18d44f4c4ef92171a4
2020-06-19 18:57:14 -07:00
Kyunglyul Hyun
c036350122 System routes are not automatically exposed
From this CL, even for system routes (phone speaker, bt routes),
features are required to get notified of events on routes or to
get them as "available" routes.

By adding this, apps can disable cast -> phone feature.

Bug: 159090706
Test: cts test && atest mediaroutertest && manually
using support v7 demos such that
  with LIVE_AUDIO : nothing changed
  w/o LIVE_AUDIO : cast -> phone feature is disabled
  unregistering callback : cast -> cast (media transfer) and
                           phone -> phone is only enabled <- this is
                           the expected behavior for apps that updates
                           AndroidX library

Change-Id: I4bd27eb1d4776b9cedb59b10e1bac5868d56d305
2020-06-19 22:54:59 +09:00
TreeHugger Robot
1a6f38da2b Merge "Fix MediaEvent release issue" into rvc-dev am: c266b0398e am: c32bb0577d am: 1180b48519 am: b83982a989
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11897358

Change-Id: I677801fed78ff9c2c5e30b16d2e5c8a18d05fa69
2020-06-19 08:28:17 +00:00
TreeHugger Robot
1180b48519 Merge "Fix MediaEvent release issue" into rvc-dev am: c266b0398e am: c32bb0577d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11897358

Change-Id: Iaf342d5752aa46f22bc608615f312169f39e95fd
2020-06-19 08:00:23 +00:00
TreeHugger Robot
4c42e15d75 Merge "Fix MediaEvent release issue" into rvc-dev am: c266b0398e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11897358

Change-Id: Ib2994c8d94092733733254d92d9a5ef3238f6e6f
2020-06-19 07:47:17 +00:00
TreeHugger Robot
c266b0398e Merge "Fix MediaEvent release issue" into rvc-dev 2020-06-19 07:29:26 +00:00
Sungsoo Lim
0ea65316f4 Prevent unnecessary call of setBluetoothA2dpOn(false)
When an active BT device is changed, instead of just notifying that
the changed BT name, AudioService sometimes notify it with two steps.

1) Notify prev BT disconnected
2) Notify new BT connected

By not calling setBluetoothA2dpOn(false) when BT is disconnected,
we can prvent the unnecessary call of it.

Bug: 144784716
Test: manual
Change-Id: I31442204cd4dd4a78552e0f993e9dfa37d6fc03f
2020-06-19 14:42:08 +09:00
Kyunglyul Hyun
7f34804624 Merge "Log transferring and fix verbose system logs" into rvc-dev am: 6edbf48c2b am: ee897cb490 am: 0750c40032 am: 5c1114aeb7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862403

Change-Id: I165f3cbbc581b273aaa8e96113011976e9506cef
2020-06-19 05:28:37 +00:00
Kyunglyul Hyun
0750c40032 Merge "Log transferring and fix verbose system logs" into rvc-dev am: 6edbf48c2b am: ee897cb490
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862403

Change-Id: I67c16725d9e2e0133ca6178c5272ff22b304b48c
2020-06-19 04:59:17 +00:00
Kyunglyul Hyun
bbc25f43d9 Merge "Log transferring and fix verbose system logs" into rvc-dev am: 6edbf48c2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862403

Change-Id: Ia5f92588f94f0150342e1a2f7233b3ff20b096f3
2020-06-19 04:42:53 +00:00
Kyunglyul Hyun
6edbf48c2b Merge "Log transferring and fix verbose system logs" into rvc-dev 2020-06-19 04:32:01 +00:00
Kyunglyul Hyun
fa2fba6812 Merge "Refresh mFilteredRoutes when routes are changed" into rvc-dev am: 099818be0e am: 89aa71b0bd am: 75dfec0725 am: 423006cd9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882563

Change-Id: I5afb3e7e31141d651a3dd1088ca447f62c6fccab
2020-06-18 03:49:14 +00:00
Kyunglyul Hyun
89aa71b0bd Merge "Refresh mFilteredRoutes when routes are changed" into rvc-dev am: 099818be0e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882563

Change-Id: I2b06d00344f29318e1869b313b4cb3b5419fde77
2020-06-18 02:52:50 +00:00
shubang
c84fe12f1d Fix MediaEvent release issue
Bug: 158876323
Test: make;
Change-Id: Idedf41620b5a32ca552836d00b1db78adcfd1a7f
2020-06-17 14:57:10 -07:00
Kyunglyul Hyun
f9ad0f6e3c Refresh mFilteredRoutes when routes are changed
When a route changes its features, the returned getRoutes() can be
changed.

Bug: 159142641
Test: run support v7 demos manually to check onRouteAdded callback is
invoked

Change-Id: Icea855d631a566fd9129f98306e3ea8af4920764
2020-06-17 20:29:04 +09:00
Kyunglyul Hyun
a464837e48 Log transferring and fix verbose system logs
This CL logs transfer between routes to easily track potential bugs.
Selecting a route was also logged in MediaRouter.

It also reverts the log level of SystemMediaRoute2Provider because
we resolved issues related to it.

Bug: 156996903
Test: N/A
Change-Id: I6d7e165a79679305fd21a378fd3ae35b941c17c6
2020-06-17 13:54:06 +09:00
hkuang
c1b763c91b transcoding: Fix the bug in openFileDescriptor and add more tests.
Bug: 145628554
Test: unit testing

Change-Id: If340c770ad396f45d6faa829915870a9da797adf
2020-06-15 16:54:39 +00:00
Hyundo Moon
481328dd81 Merge "Clear preferred feature when unregistering MediaRouter2" into rvc-dev am: e7ae494759 am: 8cb3412ac2 am: 3a22c2e3dd am: 7fc7a0c179
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11846909

Change-Id: I5255a0d182b70d6bd5c05e1a7fea6d450b7b5b8c
2020-06-15 10:32:07 +00:00
Hyundo Moon
3a22c2e3dd Merge "Clear preferred feature when unregistering MediaRouter2" into rvc-dev am: e7ae494759 am: 8cb3412ac2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11846909

Change-Id: I0f89f0d2c9e73c13aee4d22e167c45a3b49d023f
2020-06-15 09:58:29 +00:00