This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
<add g3 doc link>
Bug: 304529413
Test: N/A
Change-Id: I204c137da43a021bcebe316759d1aadaec99fe2a
also remove `use_vndk_as_stable: true` to remove dependency to VNDK
libs.
Bug: 251299786
Test: build WV APEX with V and install it on U device
Change-Id: Ie7f7f9b699119478d4b33f95ab9e6ba7f459346c
[ Merge of http://go/wvgerrit/168397 ]
When CdmResponseType (enum) was transformed to CdmResponseType
(struct), the test printers where not updated to print the result
of failed comparisons. In addition, several logs statements were
updated haphazardly, leaving inconsistencies and potential
compiler-specific behavior.
This CL replaces CdmResponseType std::string operator with a ToString()
method. This is to make it consistent with Google's C++ style guide
on conversion operators vs methods. The string conversion function is
now defined in wv_cdm_types.cpp instead of inline in the header file.
The PrintTo function has been implemented along with the other CDM
test printers in test_printers.cpp.
Bug: 273989359
Test: run_x86_64_tests
Test: MediaDrmParameterizedTests on redfin
Test: Forrest drm_compliance
Change-Id: Ibfaa17029046b75b1c8c278f7bd7e04a24379848
No-Typo-Check: From a third party header file
Bug: 260918793
Test: unit tests
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I36effd6a10a99bdb2399ab1f4a0fad026d607c70
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
[ 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/151749 ]
Extended CryptoSession for recording the result of
OEMCrypto_ProductionReady().
Only OEMCrypto_SUCCESS is considered "production ready". With the
exception of OEMCrypto_ERROR_NOT_IMPLEMENTED, any other result is
vendor-specific and indicates not being production ready.
Bug: 231655151
Test: metrics_collections_unittest
Change-Id: Ia0e5603d7ee1290238cce63d0194ae1aced424c1
[ Merge of http://go/wvgerrit/148552 ]
Extended the CDM layer to report OEMCrypto's watermarking support.
The reporting of watermarking comes in three (3) mechanisms:
1) ClientCapabilities in license requests
2) CryptoSession metrics when queried to OEMCrypto
3) String property query by apps
If OEMCrypto implementents OEMCrypto_GetWatermarkingSupport(), then
the reported watermarking support by the CDM will match that of
OEMCrypto.
If OEMCrypto does not implement OEMCrypto_GetWatermarkingSupport()
or an error occurs, it is assumed that OEMCrypto does not support
watermarking, and the CDM will report "Not Supported".
Bug: 226443788
Test: run_x86_64_tests request_license_test and license_unittest
Change-Id: Id929a356c395e6bcf45d371ee6887eec40d35329
The interface is defined in
hardware/interfaces/drm/aidl(http://go/ag/15329852).
Test: build
m android.hardware.drm-service.widevine -j128
Test: build_and_run_all_unit_tests.sh
for hidl tests
Test: atest VtsAidlHalDrmTargetTest
Bug: 200055138
Bug: 170964303
Change-Id: If2f2a129914436ba5cef1c46f6cb9415e12c3d1c
(This is a merge of http://go/wvgerrit/139629.)
This patch fixes several places where the override keyword was missing.
These were found when future patches that enable stricter checking of
the override keyword were enabled. There are two basic categories of
missing override:
* Destructors found to be overriding a virtual destructor without using
the override keyword.
* Test methods overriding methods on test-only or mock objects.
Some of these were previously marked as virtual, following our pre-C++11
style guidelines, but this is not necessary now that we have override.
Bug: 207684988
Test: x86-64 build
Change-Id: I09aa499bd3ea80d925e2fc422290d61eb005a769
[ Merge of http://go/wvgerrit/137951 ]
ValueMetric was not checking whether certain unsigned types will
overflow when casted to protobuf's signed int64 type. This CL
adds a max value to prevent potential overflows.
The value metric has also been updated to an emum to represent its
possible three state, as opposed to using two boolean flags. For basic
value metrics, this saves about 4 bytes of space. This works out to
being ~100 bytes per crypto session, ~20 bytes per CDM session and ~20
bytes per engine metrics.
Bug: 204946540
Test: Metric unit tests
Change-Id: I688bece8f31cccaf2a25bd8f99d9b080b0efd0de
[ Merge of http://go/wvgerrit/137811 ]
Renamed TimerMetric to Timer. Timer is used to generate durations
included in metrics, but is not a metric itself. The method of
getting the current time did not require creating an instance of
std::steady_clock.
Updated Distribution and Timer to use default initializers instead of
constructor initialization list.
Bug: 204946540
Test: Metric unit tests
Change-Id: I7ed291b586347dd0b7ab305960883bec04637315
(This is a merge of http://go/wvgerrit/134314.)
This patch fixes code that would trigger -Wshorten-64-to-32 by
implicitly narrowing a variable from 64 to 32 bits. The caclulation is
now done at size_t resolution instead of downcasting to 32 bits.
Bug: 194971260
Test: x86-64 tests
Change-Id: I2fd0a3a3ec67f697d58d1ba00dba66452603c753
[ Merge of http://go/wvgerrit/111903 ]
CDM metrics has been updated to include the DRM key type. The CDM
session records the key type when the wrapped DRM key is successfully
loaded into an OEMCrypto session.
Now that the API refers to a general DRM key rather than an RSA key,
the timer metric for loading the DRM key has been renamed on the client
to reflect this.
Test: Metric unit tests
Bug: 140813486
Change-Id: I9069f13ac7c979cc8556e08591e1cf8f623d0a84
(cherry picked from commit 47fc031576)
Merged-In: I9069f13ac7c979cc8556e08591e1cf8f623d0a84
Replace Makefile with Android.bp.
Remove duplication of protos in proto directory.
Since we are now building the metrics_dump tool
under Android, use frameworks metrics.proto
directly. Also, reference cdm's wv_metrics.proto
from the cdm directory instead of creating a
subset in proto directory.
bug: 161783052
bug: 170607430
Test: build
m -j128 metrics_dump
Test: metrics_dump [bugreport from adt-3-r.zip]
Test: metrics_dump [bugreport from sabrina-q.gz]
Test: metrics_dump --widevine [adb shell dumpsys media.metrics output]
Change-Id: I82c7e723453ac2a6335cb2bb732a376d535b9ea3
Merge from http://go/wvgerrit/105767
To avoid conflict with metrics.proto in
frameworks/av/drm/libmediadrm/proto.
This is in preparation of moving metrics_dump tool
to build under Android.
bug: 161783052
Test: unit test
Test: Play Movies & Tv and Netflix streaming
Change-Id: I2406b66db4d61cca7c6260ea8847a555d96c8d42
[ Merge of http://go/wvgerrit/105025 ]
Clang and GCC allow for warnings against the arguments for printf-like
functions (e.i. LOGx). These validate that the format type specified
in the format string match the corresponding argument type.
Most of the time, format specifer errors are benign; hence why they
haven't been seen as an error so far. However, with the enabling of
specifier warnings and the enabling of warnings as errors on certain
platforms, these existing errors need to be addressed.
This CL enables format specifier warnings for most of the Widevine
code, with the OEMCrypto L3 implementation which has a single error
which requires a fix in the haystack code before being fixed in the
Widevine branch.
Strict format string warnings are not enabled for non-LP64 systems.
Bug: 137583127
Test: Compiled for Linux and Android
Change-Id: I051398332d31a20457b86563a90ad8f6d428445f
Merge from Widevine repo of http://go/wvgerrit/93404
This is the unit tests, reference code, and documentation for
OEMCrypto v16.2. Backwards compatibility should work for a v15
OEMCrypto.
Some review comments will be addressed in future CLs.
Bug: 141247171
Test: Unit tests
Test: Media GTS tests on bonito
Change-Id: I9d427c07580e180c0a4cfdc4a68f538d351c0ddd
Merge of http://go/wvgerrit/93404
This CL updates the Widevine CDM to support OEMCrypto v16.1
Test: Tested in 16.2 CL
Bug: 141247171
Change-Id: I69bd993500f6fb63bf6010c8b0250dc7acc3d71b
[ Merge of http://go/wvgerrit/88016 ]
In the event of an LRU replacement event on AddKey, we gather some
metrics on what the state of the usage table is and some info on the
the entry that was removed.
Metrics collected:
- How many usage info (streaming license) in the table
- How many offline licenses in the table
- What type of entry was evicted from the table
- How stale (time since last use) was the evicted entry
This also enables unit tests for marshalling the metrics into proto
message on Android unit test.
Bug: 135046978
Test: Android and Linux unit tests
Change-Id: If8e562ae6f98270a0e6c5aa4251127ce9b79a8b0
[ Merge of http://go/wvgerrit/85408 ]
Replacing a few instances of C's NULL with C++'s nullptr in some of the
smaller sub-directories in the CDM.
Bug: 120602075
Test: Linux and Android unittests
Change-Id: I62bb548051434b4b974d89a6d57a9a17a0d66bd2
[ Merge from http://go/wvgerrit/74924 ]
These were not previously being collected or were collected
insufficiently.
BUG: http://b/121090396http://b/112919252
Test: Unit tests, Gplay, Nflix, GTS
Change-Id: I32b7206cbe6071519b4a483fbcd0920dc1a26961
[ Merge from http://go/wvgerrit/72724 ]
This adds a message that contains SDK and service version information
useful for debugging problems that occur because of different services.
BUG: 80536436
Test: Unit tests and manual GPlay testing.
Change-Id: I095f893b907ea7c2cd149155fb2cd4c7181e7bb2
(This is a merge of http://go/wvgerrit/72723)
ValueMetric, unlike the other metrics, was not safe to call from
multiple threads. This patch adds internal locking to ValueMetric to
ensure its safety.
Bug: 124459322
Bug: 70889998
Bug: 118584039
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: I55855ba8a5cdb2bbe1e15be7742304293245b5aa
[ Merge from http://go/wvgerrit/71923 ]
Plumb through the device files error detail and add the detail to
metrics.
Bug: http://b/115382201
Test: Unit tests, manual GPlay.
Change-Id: I18139f6712b6670be5fed863a97f9f03440745c7
[ Merge from http://go/wvgerrit/71726 ]
Adds an error detail metric attribute to RestoreUsageSession and
RestoreOfflineSession. These metrics will now report an additional
attribute providing additional error detail for debugging.
BUG: http://b/115517916
Test: CDM Unit Tests. Manually tried GPlay.
Change-Id: Ib48361ef29d33a16150473d8967e4850bc0c623d
[ Merge from http://go/wvgerrit/71443 ]
The assumption that the metrics will always outlive the CdmSession
instance appears not to always hold (at least in a non-android
multi-threaded solution). The shared_ptr ensures that the metrics
are available even in these rare race conditions.
BUG: http://b/123321465
Test: CDM unit tests. Also http://go/wvgerrit/71264 parallel tests.
Change-Id: Iaa6a8f6c0fdc46a911789759d6e1228d849aa237
[ Merge of http://go/wvgerrit/71326 ]
Nonce flood, frame size, session and system invalidation errors
will now bubble up to the app. OEMCrypto v15 returns
OEMCrypto_ERROR_BUFFER_TOO_LARGE, OEMCrypto_ERROR_SESSION_LOST_STATE,
OEMCrypto_ERROR_SYSTEM_INVALIDATED and a variety of nonce errors.
These will be reported to HIDL as OUTPUT_TOO_LARGE_ERROR,
ERROR_DRM_SESSION_LOST_STATE, ERROR_DRM_INVALID_STATE and
ERROR_DRM_RESOURCE_CONTENTION.
Bug: 120572706
Test: Unit/Integration tests
Change-Id: Ida177300046327ce81592a273028ef6c3a0d9fd9
[ Merge of http://go/wvgerrit/65983 ]
Add support to drop closed metrics in order to save space for
long-running applications (and CdmEngine instances). The code now keeps
only a limited number of metrics collections after the session is closed.
As a session (and its metrics session) is closed, the oldest, closed metrics
session is dropped. This means those metrics will not be reported nor
accessible in the client.
Bug: http://b/118664842
Test: CDM Unit tests. Android Unit Test. Ran GPLay Manually.
Change-Id: I27d6e61a8fe4148ad1ef2a433c8e5f4cdd84cc72
Import from http://go/wvgerrit/68385
Adds the build information returned from OEMCrypto_BuildInformation()
to the CDM session metrics.
Bug: 117117555
Test: Unit tests. GPlay manual. GTS Tests.
Change-Id: I505c46fec61a7c62538f843185ec0358f860da79
Import of http://go/wvgerrit/68188
This adds an attribute to metrics indicating if the license was online
or offline.
Also, added a unit test for CdmEngineMetricsImpl.
Test: Unit tests. GPlay manual. GTS tests.
Bug: 115523917
Change-Id: Id315c643048914a2c51904451f9665987bc87eb7