Commit Graph

9431 Commits

Author SHA1 Message Date
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
Hangyu Kuang
a09bef7cb5 Merge "transoding: Add xml parsing to ApplicationMediaCapabilities." 2020-11-18 03:53:02 +00:00
hkuang
bbb7628545 transoding: Add xml parsing to ApplicationMediaCapabilities.
CTS-Coverage-Bug:172074159

Bug: 169849854
Test: Unit test

Change-Id: I4a8cabb850495cb14c51f25de607bdf47da8b26e
2020-11-17 16:41:46 -08:00
Amy Zhang
a2911b1f80 Improve the documentation of linkFrontendToCiCam and rename to
connectFrontendToCiCam

Test: make services
Bug: 170966213
Change-Id: Id06a95eda6148ac77ad363f6de786418c53c3d92
2020-11-17 13:28:47 -08:00
shubang
e708e600a0 Add initial playback metrics classes
Test: make;
Bug: 167036690
Change-Id: I78aa08374b45ffc86a3253037de724a2d3750977
2020-11-17 01:03:45 -08:00
TreeHugger Robot
8eea08cbd6 Merge "Adding AudioUsage converters to AudioAttributes" 2020-11-17 00:27:53 +00:00
Amy Zhang
4a14b48dee Merge "Add RestartEvent in Filter" 2020-11-16 22:04:41 +00:00
Hayden Gomes
24b336f82c 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
2020-11-16 08:46:00 -08:00
Jin Seok Park
4483aaab83 [Media ML] Make getActiveSessionsForUser system API
Bug: 160666400
Test: build
Change-Id: I163879a45f2544ab1b420d8ad85dc4286143b2f5
2020-11-16 17:19:04 +09:00
hkuang
396906c975 transcoding: Unhide setClientCapabilities.
And use the new ApplicationMediaCapabilities class.

CTS-Coverage-Bug:168990206

Bug: 169849854
Test:tracking in b/168990206

Change-Id: I0e0d801de019b453ad4171816e1d59d82a085a52
2020-11-14 12:48:24 -08:00
Hangyu Kuang
c318d8819a Merge "transcoding: Unhide ApplicationMediaCapabilities" 2020-11-14 06:09:26 +00:00
hkuang
10acecb23b transcoding: Unhide ApplicationMediaCapabilities
CTS-Coverage-Bug:172074159

Bug: 169849854
Test: Unit test
Change-Id: Ib043bf8e52c6868cd1dfeff5552755d394c4c851
2020-11-13 19:09:34 -08:00
Henry Fang
e18379f5d1 Support blink scan
Allow scan again if callback and executor are same as before.

bug: 173239634
Test: atest -c TunerTest
Change-Id: Iec5ba453b3d3d40c0d96fda5c7288b79898d9aea
2020-11-13 16:36:35 -08:00
Henry Fang
976002b688 Merge "use UID instead of user ID for metrics according to design doc." 2020-11-13 21:15:02 +00:00
Amy Zhang
83258e4e69 Add RestartEvent in Filter
Restart event would be sent when a filter is reconfigured and
restarted.

After stopping to reconfigure the filter, all the filter events
should be discarded until restart and receive the start event
from the newly configured filter.

Test: atest android.media.tv.tuner.cts
Bug: 172593389
Change-Id: I1c7c4391d8477ae191e318b1830dd8afed86ed87
2020-11-13 10:58:24 -08:00
Aurimas Liutikas
1394a019e7 Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:27:15 -08:00
Aurimas Liutikas
8f8eaec801 Merge "Suppress all hidden abstract methods in constructable classes." 2020-11-12 23:37:21 +00:00
Zimuzo Ezeozue
56e7af065a Merge "Revise seamless transcoding optimization flags" 2020-11-12 17:31:35 +00:00
Andy Hung
89c6513542 Merge "AudioFormat: Add ENCODING_PCM_32BIT ENCODING_PCM_24BIT_PACKED" 2020-11-12 16:58:57 +00:00
Zim
d2f9505d19 Revise seamless transcoding optimization flags
These flags determine if we bypass transcoding in several platform
media classes.

We previously, had non-perssitent, default-false flags for each
framework class.

Now, we have one persistent default-true 'optimize' flag:
persist.sys.fuse.transcode_optimize.

Of course, if the global transcode flag, persist.sys.fuse.transcode is
off, the code is a no-op.

Bug: 158465539
Test: Manual
Change-Id: Ie1442213d0744888bac45b43ad8a07f0ebf55066
2020-11-12 14:15:02 +00:00
Henry Fang
0077236f37 use UID instead of user ID for metrics according to design doc.
bug: 169537354
Test: atest -c MediaCasTest
Change-Id: I63e13eb20b1f16c6f28c6d0391bfcad836dc7a45
2020-11-11 18:50:46 -08:00
Amy Zhang
4ae37befa9 Merge "Add API to configure Scambling Status event to monitor specific status type" 2020-11-12 02:22:35 +00:00
Amy Zhang
99f0c3f36a Merge "Rename RecordEvent getFirstMbInSlice into getFirstMacroblockInSlice" 2020-11-12 02:21:35 +00:00
Amy Zhang
90068cf627 Merge changes from topic "frinfo"
* changes:
  Add comparator for FrontendInfo
  Expose FrontendInfo list of all the existed Frontends in Tuner java
2020-11-11 23:17:16 +00:00
Aurimas Liutikas
796760c56e Suppress all hidden abstract methods in constructable classes.
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.

Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
    no-op in terms of behavior
2020-11-11 23:16:32 +00:00
Vignesh Venkatasubramanian
cfcb1104e3 Merge "Add AVIF special case to ThumbnailUtils" 2020-11-11 21:48:20 +00:00
Vignesh Venkatasubramanian
a315e3a99a Merge "Add AVIF sniffing to ExifInterface" 2020-11-11 21:48:20 +00:00
Ytai Ben-tsvi
93f4464b76 Merge "Clean up on client death in SoundTriggerService" 2020-11-11 21:31:39 +00:00
Andy Hung
cec9647e0f AudioFormat: Add ENCODING_PCM_32BIT ENCODING_PCM_24BIT_PACKED
Add extended high definition integer formats to support direct
audio data delivery to the HAL.

Test: atest AudioRecordTest
Test: atest AudioTrackTest
Test: Clarity AudioManager
Bug: 152481314
Bug: 157671580
Change-Id: I92a099e98dd20ef900765928cbacea5e8a940c3c
2020-11-11 12:51:18 -08:00
Ytai Ben-Tsvi
3559e8693e Clean up on client death in SoundTriggerService
This change adds tracking of SoundTriggerService client death
and frees up resources whenever that happens.

Test: Kill Now Playing process and observer recovery.
Bug: 171026874
Change-Id: Ie31d0a3ed392b1513b4e81ec3c344f4e79adcf52
2020-11-11 10:12:59 -08:00
Amy Zhang
d92c637222 Add comparator for FrontendInfo
Test: atest android.media.tv.tuner.cts
Bug: 158818697
Change-Id: Idb7c12750d6b5a82a86bd0fa03afe151a1366bb4
2020-11-10 18:49:32 -08:00
Amy Zhang
1c15cee227 Expose FrontendInfo list of all the existed Frontends in Tuner java
Test: make
Bug: 158818697
Change-Id: Iddea804a2ab9c8609d843c6259763e092b003131
2020-11-10 18:45:27 -08:00
Amy Zhang
e7eee73024 Rename RecordEvent getFirstMbInSlice into getFirstMacroblockInSlice
Test: atest TunerTest
Bug: 172934764
Change-Id: Ie5803509b0ee3e9b3e7279eccf2249dfe29792e5
2020-11-10 18:20:12 -08:00
Vignesh Venkatasubramanian
78b19db50b Add AVIF sniffing to ExifInterface
The exif metadata extraction process for AVIF is similar to HEIC.
Adding AVIF sniffing so that avif files can be used wit
ExifInterface.

CTS tests for this feature will come in a separate CL as there are
still some CLs in flight to finish AVIF support.

Test: ExifInterfaceTest still passes.
Bug: 141654151
Change-Id: I5546a4f81e928a29d46f6c4b9db77032a09a8350
2020-11-10 13:47:58 -08:00
Vignesh Venkatasubramanian
b32a2f1c41 Add AVIF special case to ThumbnailUtils
Similar to HEIC, AVIF files can also have smaller thumbnail images
along with the main image in the container. So try to fetch that
first instead of decoding the main image when creating a thumbnail.

Test: ThumbnailUtils test still pass (with the new AVIF test).
Bug: 141654151
Change-Id: I74afffe0e180edd425154daad30e07fcb0781ee6
2020-11-10 13:44:33 -08:00