Commit Graph

9480 Commits

Author SHA1 Message Date
Kyunglyul Hyun
9f889ca4e6 MediaRouterService binds services when necessary
MediaRouterService maintained bindings to provider services
once those are established.

With this CL, it only binds services when there is a non-empty
discovery preference set by a foreground app or an app is casting.

This change may break output switcher, which enables transfer media
of background apps.

To alleviate that MediaRouter2Manager#startScan and #stopScan are added
so that system UI can force the service bind to the services and find
remote devices to cast.

Bug: 169575701
Bug: 172920557

Test: manually and CTS
Change-Id: I4a47fdb1c9fe05a04d26950485833c9cbfb91a69
2020-12-14 02:33:45 +00:00
Serik Beketayev
c869ab40bf Merge "[Mainline Migration] Migrate NetworkUtils" am: a086c295e7 am: c6218f7977 am: 006d043dfe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498168

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id0749108e03d88af0b8c50a36f1a4ca28b9a40ce
2020-12-10 01:05:32 +00:00
Serik Beketayev
c6218f7977 Merge "[Mainline Migration] Migrate NetworkUtils" am: a086c295e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498168

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc0a49e76f87a741f4410b53e9a40012e37fde36
2020-12-10 00:08:03 +00:00
Serik Beketayev
a086c295e7 Merge "[Mainline Migration] Migrate NetworkUtils" 2020-12-09 23:47:05 +00:00
Jean-Michel Trivi
15e3005386 AudioManager: fix implementation of isMusicActive()
Implementation of isMusicActive() should go through AudioService
as AudioSystem.isStreamActive() can only be called from system
service.

Bug: 175084989
Bug: 162423060
Test: atest AudioManagerTest
Change-Id: I15b3f7cd082a7497f857e6bf261f933224da853e
2020-12-09 12:04:22 -08:00
Amy Zhang
e0baa92030 Merge "Rename couldHandleDiseqcRxMessage to canHandleDiseqcRxMessage" 2020-12-08 19:24:14 +00:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
0ace970e19 Temporarily replace "android.com" accounts.
We're temporarily blocked on internal Gerrit tooling to support
relaxed OWNERS validation, so this change temporarily replaces all
"android.com" accounts with "google.com" equivalents.

Bug: 174932174,175111824
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I114f2a40cee1b65e21250da7372e11c18cd73e25
2020-12-08 17:54:13 +00:00
Jean-Michel Trivi
4e6dcbd017 Merge "AAudio player type." 2020-12-08 16:27:51 +00:00
Jeff Sharkey
c7c4a74a78 Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0211462ecbcd9ad66f66af87e31cf12e1582fc65
2020-12-08 16:01:16 +00:00
Jeff Sharkey
c2793cf12b Merge changes from topic "dec5"
* changes:
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
2020-12-08 15:39:59 +00:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Amy Zhang
abef97b77f Rename couldHandleDiseqcRxMessage to canHandleDiseqcRxMessage
Test: atest TunerFrontendTests
Bug: 171314799
Change-Id: I699613b016ff45fd6b327de2637be1a92b404918
2020-12-07 11:15:20 -08:00
Treehugger Robot
659f09f56f Merge "Adding AudioUsage converters to AudioAttributes" am: 87b5c6a2a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518202

Change-Id: I6e84fcacbc45e667f592ef247ea1e87d9ae8e248
2020-12-07 19:08:24 +00:00
Amy Zhang
799b044d30 Merge "Publish Descrambler.isValidKeyToken as a static system API" 2020-12-07 19:07:38 +00:00
Jean-Michel Trivi
8171de4a43 AAudio player type.
AAudio API as a recognized player type.

Bug: 170588492
Test: atest AudioPlaybackConfigurationTest
Change-Id: I8118829af381573ce65bd56b09628a4114da09fa
2020-12-07 10:41:39 -08:00
Santiago Seifert
1ce2a35deb Merge "Add javadoc for the nullable handler parameter" 2020-12-07 15:48:49 +00:00
Serik Beketayev
9817226d99 [Mainline Migration] Migrate NetworkUtils
Migrating makeStrings(), numericToInetAddress() APIs

Bug: 173089079
Test: atest FrameworksNetTests
Change-Id: Ie914fd41bc3ce16d07f5d2768b89ce805b9245a9
2020-12-06 22:33:04 -08:00
Amy Zhang
8a5c57551c Publish Descrambler.isValidKeyToken as a static system API
Test: atest TunerTests
Bug: 173713008
Change-Id: I92fbd22f0e6a4c82d7ca1a326369fa9aa5ece17e
2020-12-04 16:01:00 -08:00
TreeHugger Robot
bd4b7bd4d5 Merge "Fix Tuner FrontendStatus documentations on getModulation and getSpectralInversion" 2020-12-04 23:04:05 +00:00
Henry Fang
56ab3ba898 Merge "Add thread protection for Filter/Descrambler table Use weak reference in the tables to allow objects released by caller" 2020-12-04 22:02:52 +00:00
Amy Zhang
ef2fb25c04 Fix Tuner FrontendStatus documentations on getModulation and getSpectralInversion
Test: make services
Bug: 171314749
Change-Id: Ia5ceed484ac10c3171b43239b43b09320fc3cfd3
2020-12-04 21:09:48 +00:00
Amy Zhang
801e409784 Merge "Improve the Tuner FrontendStatus javadoc" 2020-12-04 19:45:24 +00:00
Henry Fang
be8431c2ca Add thread protection for Filter/Descrambler table
Use weak reference in the tables to allow objects released by caller

bug: 174685399
bug: 174711353
Test: manual
Change-Id: I760d0a77ad9efe2709a14f0fb8a669f8f16652e1
2020-12-04 09:56:01 -08:00
Hayden Gomes
c164f6a4d1 Adding AudioUsage converters to AudioAttributes
audio_policy_configuration.xsd defines strings used by HAL
to represent audio usages. This adds converters between
those strings and the AudioAttributes#attributeUsage values

Bug: 171572311
Test: atest AudioAttributesTest
Change-Id: I5301276ebd6ea1539182e9925a1e19f515e80597
Merged-In: I5301276ebd6ea1539182e9925a1e19f515e80597
2020-12-04 16:48:35 +00:00
TreeHugger Robot
ca532f20cf Merge "AudioSystem master balance permission annotation" 2020-12-04 09:01:25 +00:00
Jean-Michel Trivi
0377204e94 AudioSystem master balance permission annotation
Add annotations for permissions that were always enforced but
never documented

Bug: 162423060
Test: see poc
Change-Id: I7ac181938fa4c32ceeffd1b64b9769ba2c2112ef
2020-12-03 16:48:13 -08:00
Hyundo Moon
b59ecae139 Merge "Add MediaController.getHandlerForCallback() for testing" 2020-12-03 10:48:19 +00:00
Amy Zhang
50b5e09240 Improve the Tuner FrontendStatus javadoc
Test: make services
Bug: 171314749
Change-Id: I2c60ca70767af623e4c02a8e6e5b5cc4a41d1ae7
2020-12-02 16:59:50 -08:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Henry Fang
e882c08a9f Change resource claim to sync to avoid resource conflict
bug: 174544018
Test: manual
Change-Id: Ib2688da2a85cdad896f9f2814828ce7659c8a695
2020-12-01 15:57:03 -08:00
Hyundo Moon
b921e03121 Add MediaController.getHandlerForCallback() for testing
Bug: 173571399
Test: Passed CTS
Change-Id: If8780f4fb5177259061e546ce65684a670781c60
2020-12-01 22:27:47 +09:00
shubang
d0e06f4d07 Add playback session class
Test: make;
Bug: 167036690
Change-Id: Iea7c1f76fcabeac9a48082d22d0d06cddd60a5de
2020-11-30 16:49:52 -08:00
Santiago Seifert
1c719712dc Add javadoc for the nullable handler parameter
Bug: 172934725
Test: Manually built the tree
Change-Id: If9d99d20c3dd3108532adf0d9f6b83d84fc48f34
2020-11-25 18:06:15 +00:00
Jean-Michel Trivi
988fc21a46 Merge "AudioRecord: ensure documented behavior of active rec config" 2020-11-24 23:18:47 +00:00
Jean-Michel Trivi
1412a1d20c AudioRecord: ensure documented behavior of active rec config
Make sure getActiveRecordingConfiguration() doesn't throw an
exception when queried after the recorder is released as this
isn't part of the API contract

Bug: 170608713
Test: atest android.media.cts.AudioRecordTest#testGetActiveRecordingConfiguration
Change-Id: I8003056e65ab0e125b5478d6c765878b2840d4b9
2020-11-24 11:13:20 -08:00
Hangyu Kuang
b3c1ce5fca Merge "transcoding: Fix the null pointer exception due to invalid uid." 2020-11-24 17:19:11 +00:00
hkuang
a117746081 transcoding: Fix the null pointer exception due to invalid uid.
Also some minor fixes when testing pid and uid forwarding.

Test: Unit test
Bug: 174072110
Change-Id: I075a61882914491041bdab8b123b31bed9927711
2020-11-23 17:55:03 -08:00
Hyundo Moon
976aa3d404 Merge "Rating: Disallow putting Float.NaN as star/percent values" 2020-11-23 10:55:16 +00:00
Santiago Seifert
0deba940b9 Merge "Replace literal with constant in annotation" 2020-11-21 10:06:37 +00:00
Santiago Seifert
0acd7893f3 Replace literal with constant in annotation
Bug: 168585020
Bug: 173713007
Test: Manual build.
Change-Id: I8ffc52d9472a1a1eae83af439e477991c252337d
2020-11-20 18:46:47 +00:00
Amy Zhang
eeaa4d6544 Add a Descrambler KeyToken validator
Test: make services
Bug: 173712256
Bug: 173713008
Change-Id: I9754b8d57c7bd5da3647a57ec8db6f3b5e621c88
2020-11-19 13:09:08 -08:00
Hyundo Moon
76da1da533 Rating: Disallow putting Float.NaN as star/percent values
When creating a Rating instance, invalid values shouldn't be allowed.
However, Float.NaN passes the checks, which leads to creating invalid
ones. This CL fixes the code.

Bug: 173680971
Test: Passed CTS
Change-Id: I629f1568a2efb0c324cc11e94969356c59298db8
2020-11-19 20:58:06 +09:00
TreeHugger Robot
58ccd68127 Merge "Add Ip Cid Change Event for Filter" 2020-11-19 10:11:13 +00:00
Amy Zhang
a6c094bed2 Add Ip Cid Change Event for Filter
Merge the configuration of scrambling status change and ip cid change
into one API - configureMonitorEvent

Previously we only report scrambling status change on configured status,
now we change it to report any status change along with the initial
status

Test: atest TunerTets
Bug: 153595125
Change-Id: Ie6e26774dd3f3ab5753746795188a258e1a55393
2020-11-18 23:23:12 -08:00
TreeHugger Robot
c5be76c26e Merge "Fix renaming file and moving file issue in MTP" 2020-11-19 04:47:43 +00:00
Amy Zhang
89963128f4 Merge "Improve the documentation of linkFrontendToCiCam and rename to connectFrontendToCiCam" 2020-11-18 22:26:16 +00:00
Ivan Chiang
20079f1064 Fix renaming file and moving file issue in MTP
After the user renames/moves a file/directory, the database of
MediaProvider is not updated. It causes that the file can't be
opened via MediaProvider. Use scanFile to instead of MP.update
for the file/directory.

Handle the .nomedia case for create/copy/move/delete/rename.
Scan the parent directory to update the database.

Test: atest MtpTests
Test: atest --test-mapping packages/providers/MediaProvider
Test: manual. 1. Move/rename the file/directory.
              2. Open the file in DocumentsUI
	      3. create/copy/move/delete/rename for .nomedia case
Bug: 169300366
Bug: 171538933
Bug: 172029805
Bug: 170798581
Change-Id: Ia37be7a027bfe502e3f7c96babe5a5bbed5f942c
2020-11-19 00:32:00 +08:00
Shubang Lu
63e8a93dc9 Merge "Add initial playback metrics classes" 2020-11-18 09:32:31 +00:00
Jin Seok Park
0b058f643f Merge "[Media ML] Make getActiveSessionsForUser system API" 2020-11-18 05:52:13 +00:00