1. "Change CdmResponseType from enum into a struct"
Merged from http://go/wvgerrit/163199
Bug: 253271674
2. "Log request information when server returns 401"
Bug: 260760387
Bug: 186031735
Merged from http://go/wvgerrit/162798
3. "Specify server version on the command line"
Bug: 251599048
Merged from http://go/wvgerrit/158897
Test: build android.hardware.drm-service.widevine
Test: Netflix and Play Movies & TV
Test: build_and_run_all_unit_tests.sh
Bug: 253271674
Change-Id: I70c950acce070609ee0343920ec68e66b058bc23
(Merged from http://go/wvgerrit/160042.)
Since we don't have access to std::format yet, this patch adds a
function to wvutil to format text into a std::string.
Bug: 255466913
Test: x86-64
Test: raven
Change-Id: I28043da76af5b4772a29fa7e7241343caf9b54a1
Merged from http://go/wvgerrit/160797
Changed CdmResponseTypeToString param from int to CdmResponseType as per sigquit@ review comment in http://go/wvgerrit/160638.
Reorder the switch statements in CdmResponseTypeToString to follow the order in the enum declarations instead of sorting alphabetically. This should make future changes to the enum fields easier.
Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh
Bug: 258438956
Change-Id: I3f316cff5448e8e8078da7868e3c083e6766bfa1
* changes:
Core CDM: Remove usage info as a run-time type.
Core CDM: Do not store/retrieve USAGE_INFO entries.
Core CDM: Remove usage info API from DeviceFiles.
Core CDM: Removed ability to add secure stop entry.
[ Merge of http://go/wvgerrit/160857 ]
Reboot tests were attempting to clean up usage info records when the
tests were done. However, usage info are no longer supported.
Unfortunately, the clean up code would trigger a test failure if the
usage info records could not be deleted.
Bug: 258469123
Test: OfflineLicenseTest.VariousTests
Change-Id: I17cebd82da1e45ef53853d35dbe314365a1909be
[ Merge of http://go/wvgerrit/159219 ]
Most API functions of DeviceFiles related to usage info files have
been removed. Storing and retrieving usage info files are no longer
required by the CDM. The only function remaining are the ones that
enabled detecting and deleting the remaining usage info files on the
device.
Bug: 242289743
Test: run_x86_64_tests and device_files_unittest
Change-Id: I002202b47141121a0e5adac569e47d8b8bb69b1a
[ Merge of http://go/wvgerrit/159220 ]
Usage entry info elements of type USAGE_INFO are no longer stored by
DeviceFiles. An earlier CL removed the ability to store USAGE_INFO
entries; but now tests have been updated to exclude USAGE_INFO from
their test data.
A new DeviceFiles tests verifies that USAGE_INFO entries are not
retrieved and that the |has_usage_info_entries| flag is set when
they are encountered when loading pre-usage-info-deprecation
usage table info.
Bug: 242289743
Test: run_x86_64_tests and device_files_unittest
Change-Id: Iefbfe2dd2b0304b4075bfc7c1aeffe3b6ba52624
[ Merge of http://go/wvgerrit/159221 ]
This CL modifies how usage entry info is tracked internally by the
CDM at run time. It removes the different "storage types" that
entries represent (license or usage info), and instead it contains
only the information associated with license types. The presences
of a key-set-id allows the UsageTableHeader to determine if the
entry slot is currently being used, or if it can be treated as
unoccupied.
By removing this different type, it completely prevents the CDM and
its tests from using "usage-info" type entries. This required
significant updates to the UsageTableHeader tests.
Additionally, several of the variable names within the usage table
have been simplified and shortened to reflect their new meanings.
Bug: 242289743
Test: run_x86_64_tests and usage_table_header_unittest
Change-Id: I939e479779425550a17a3c9e6c6d1bc6885e493e
[ Merge of http://go/wvgerrit/158721 ]
This CL removes support for secure stop / usage info sessions from the
CDM engine and CDM session. APIs for related to secure stop
operations will return NOT_IMPLEMENTED_ERROR.
New secure stop licenses will be rejected by the CDM when added.
Bug: 242289743
Test: run_x86_64_tests request_license_test
Change-Id: I30cd47e580d63014e001c903382a28238746f6d4
[ Merge of http://go/wvgerrit/158722 ]
The CDM will delete all usage info / secure stop files on the device
when usage table entries labeled as USAGE_INFO are detected when
restoring the usage table. DeviceFiles no longer transfers the
stored USAGE_INFO entry info into the run-time entry info vector for
the table.
This CL makes only minor changes to test data. Significant updates
to both device file and usage table header unittests are required to
remove usage info / secure stop run-time resources.
Bug: 242289743
Test: run_x86_64_tests
Change-Id: I2d1fc0d6a4c994bc10bfce47818f101f95883979
[ Merge of http://go/wvgerrit/158877 ]
The UsageTableHeader's LRU algorithm for determining which entry to
evict when full uses special considerations based on the type of
entry (offline or secure stop).
This CL removes all secure-stop-specific considerations, and instead
treats secure stop's the same as an unused entry. Secure stop entries
will always be selected for removal before offline licenses (expired
or not).
Additionally, LRU table upgrading will ignore secure-stop entries.
This has no effect in practice as DeviceFiles will not load secure
stop usage entries when UsageTableHeader is initialized on a real
file system.
Bug: 242289743
Test: run_x86_64_tests and request_license_test
Change-Id: Ib3f71f191aed94aad62951667426911e4e202068
[ Merge of http://go/wvgerrit/158872 ]
This CL updates the UsageTableHeader API such that it is no longer
possible to add a "usage info" entry. All new entries that are added
are assumed to be offline licenses.
Bug: 242289743
Test: run_x86_64_tests and request_license_test
Change-Id: I09262da0e4301356156d1715b0301c616be2251b
[ Merge of http://go/wvgerrit/160277 ]
OEMCrypto v15 did not require core messages during DRM certificate
provisioning. The CDM's certificate provisioning flow was allowing
for either case (with or without core messages) when provisioning.
Now, devices can safely assume that all provsisioning responses will
be v16 or newer; all requests/response must contain a core message.
Bug: 252670759
Test: run_x86_64_tests and request_license_test
Change-Id: I9f51e07caf642eaf646ef40bdd640b3ccfe2533c
[ Merge of http://go/wvgerrit/160000 ]
OEMCrypto v15 licenses made use of several now-obsolete API functions
of OEMCrypto (mainly LoadKeys and RefreshKeys). All license handled
by the CDM must be v16 or newer. The CDM can now rely on all license
requests/responses containing a core message, using v16 policy timers,
and requires loading using LoadLicense() / LoadRenewal().
Bug: 252670759
Test: run_x86_64_tests and policy_engine_unittest
Change-Id: I3f65a6ec0326b4c89d1919b8911e065079cb90d2
Merge from http://go/wvgerrit/158917
Use go/yamllint as reference and obfuscate portion of output to
run on an online yaml validator.
Sample output: http://go/cl/481370906
Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh
Bug: 239462891
Change-Id: I1abf1aa50aa25b97b1f6c10995c324d6de04d056
[ Merge of http://go/wvgerrit/158720 ]
Support for secure stop licenses have been dropped. The MediaDRM
APIs have already documented their deprecation. Before support can
be removed from the plugin and CDM core implementation, the tests
associated with them must be removed.
This CL removes secure stop tests from the Android CDM integration
test `request_license_test` and from the MediaDRM plugin test
`libwvdrmdrmplugin_hal_test` and `libwvdrmdrmplugin_hidl_test`.
Bug: 242289743
Test: libwvdrmdrmplugin_hal_test request_license_test
Change-Id: Idb7ee53ab8115ce9b9a173eaf0a00f54325863a2
As of Android T, these need to start with the ro.vendor prefix. We are
doing it now so we can update ChromeOS to be in sync for either version.
Bug: 237492145, 248584954
Test: No properties errors in logcat during playback
Change-Id: Ic6fac64e621be65385d16808dbef52914a66967a
(cherry picked from commit 28a040d407b28d24dd4d5496dd08cfa2f6579d71)
(cherry picked from commit a932781fcc7d2d89d73c546bf244399daf02f5ac)
We added custom properties that are only used on ChromeOS and to avoid
having to bloat the sepolicy for all of Android we are adding a check
here so that we only query the properties on ChromeOS based on the
bertha hardware property.
Bug: b:237492145
Test: Access denied message is gone w/ ExoPlayer
Change-Id: I3a5781ad980dfae2e16501b655386287b5e245b7
(cherry picked from commit 890f71ef367aed683a89892000e40d0e0ca6fbdd)
(cherry picked from commit 4379b0545a2ae866ba9fc315551a5534fa163924)