Commit Graph

2591 Commits

Author SHA1 Message Date
John Bruce
f90e8e0027 Merge "Add SPOID Unit Tests" 2017-07-14 22:37:43 +00:00
Edwin Wong
06f8504688 Merge "Add property to query SRM support and version." 2017-07-14 17:25:29 +00:00
Jeff Tinker
d5d9d644d6 Temporarily disable WV L1 am: 0bbbf7d84e
am: 4477ef2901  -s ours

Change-Id: I7311088575039b95cdcfaa365374bdff5ffd0b90
2017-07-14 06:09:22 +00:00
Jeff Tinker
4477ef2901 Temporarily disable WV L1
am: 0bbbf7d84e

Change-Id: I40bb40b52d7de24108de0bf9afc85157ad1381af
2017-07-14 05:04:48 +00:00
Jeff Tinker
0bbbf7d84e Temporarily disable WV L1
For dogfooding, force fallback to widevine L3

bug:63673310
Change-Id: Ib222d4119e358ecfdaae44d1627d914a9b79d44e
2017-07-14 04:58:11 +00:00
Rahul Frias
a46a7182f9 Merge "Update error codes" 2017-07-14 01:18:42 +00:00
Edwin Wong
9f0adebb9f Add property to query SRM support and version.
Merge from http://go/wvgerrit/29800

Add QUERY_KEY_CURRENT_SRM_VERSION and
QUERY_KEY_SRM_UPDATE_SUPPORT.

Test: run unit test
  adb push $OUT/marlin/data/bin/libwvdrmdrmplugin_hidl_test
/vendor/bin/.
  adb shell LD_LIBRARY_PATH="/vendor/lib/mediadrm" \
    /vendor/bin/libwvdrmdrmplugin_hidl_test

bug: 63390310
Change-Id: Ie51056d22178565bd7b987aa901f7b7616d29328
2017-07-13 14:12:38 -07:00
Rahul Frias
346f8883c8 Update error codes
[ Merge from http://go/wvgerrit/29041 ]

This brings error codes up to date with wv master

b/62972441

Test: WV Unit/Integration tests on android

Change-Id: If676b35275bb992018b2b8bfcb76079a2fc2d1f9
2017-07-13 11:20:54 -07:00
Tom Cherry
fb0bbd740b remove extraneous using namespace android and deprecate utils/Log.h am: 6b2787121c
am: 6e8c82a416

Change-Id: Ic5c65fb6000a3a87feba28836d326618a347752f
2017-07-13 16:16:51 +00:00
Tom Cherry
6e8c82a416 remove extraneous using namespace android and deprecate utils/Log.h
am: 6b2787121c

Change-Id: I1c2e5311a126295a98650dde433c111b22d894b5
2017-07-13 16:13:55 +00:00
Tom Cherry
6b2787121c remove extraneous using namespace android and deprecate utils/Log.h
This namespace is not used by this file and its declaration is removed
in a separate CL from utils/Log.h, which is the only place it is
defined, so we must remove this extraneous line.

Also, since that separate CL is deprecating utils/Log.h in favor of
log/log.h, we make the switch to the new header.

Test: Build

Change-Id: Iac4bc8faffbd2d68dc4ccccaf569db0c5a13a7bc
2017-07-12 17:13:01 -07:00
John W. Bruce
4853871026 Add SPOID Unit Tests
(This is a merge of http://go/wvgerrit/29121)

This commit adds unit tests for globally unprovisioning with a SPOID and
to validate that SPOIDs vary in the expected ways depending on the
inputs they are given.

This change also fixes some indentation that was off and was getting
copied around the file.

Bug: 37179588
Test: libwvdrmdrmplugin_hidl_test
Change-Id: Ie9604b974228d151e1b32680c42824a66412bad7
2017-07-12 16:21:19 -07:00
Adam Stone
457aceb859 Fixes metrics collection during CdmEngine close.
This fixes a problem where a CdmEngine instance (and its sessions) could
be closed before its metrics could be collected. The change allows the
wv_content_decryption_module to extract metrics from instances about to
be closed. These are held until reported to the caller.

Test: Manually verified that collection is now occurring correctly. Also
added unit test: wv_cdm_metric_test.

This is a merge from wvgerrit/29069

Change-Id: If82bfd5cae3b72b9d14ab4741424a7ae7cc0a3a6
2017-07-12 13:07:15 -07:00
Jiyong Park
efad3eea21 Add missing dependency to liblog
Bug: 33241851
Test: BOARD_VNDK_VERSION=current m -j libwvdrmcryptoplugin
Test: BOARD_VNDK_VERSION=current m -j libwvdrmdrmplugin
Change-Id: If21f903cb3087bd26c0526686392e7686f5152c6
2017-07-07 16:27:32 +09:00
Jiyong Park
aa74124fc2 Build widevide modules with BOARD_VNDK_VERSION
Header libs are added since global include path is not provided when
building with BOARD_VNDK_VERSION. Also, some static libs are marked as
proprietary so that they can be linked against to the drm hal
service.

Bug: 33241851
Test: BOARD_VNDK_VERSION=current m -j
android.hardware.drm@1.0-service.widevine
Change-Id: Iab85869e21917ea212a09d6eaabdb6ba3ace9248
2017-07-06 17:13:48 -07:00
Rahul Frias
ccaa50b92e Merge "Correct openssl error logging" 2017-07-03 07:53:19 +00:00
John W. Bruce
d163479752 Add Bounds Check to initDataResemblesPSSH am: ce01000c1b
am: c48711d0ff

Change-Id: Ief842a2fa6ff75d1a4ef19a786a906ca7d56ebfb
2017-06-30 01:14:42 +00:00
John W. Bruce
c48711d0ff Add Bounds Check to initDataResemblesPSSH
am: ce01000c1b

Change-Id: Ia40ae99bc17f2006901ca2cd91054a9ae3768a59
2017-06-30 01:10:11 +00:00
John W. Bruce
ce01000c1b Add Bounds Check to initDataResemblesPSSH
(Merge from http://go/wvgerrit/29180)

initDataResemblesPSSH was not checking if the buffer was large enough to
contain the PSSH markers that it was looking for. Consequently, it could
read data past the end of the buffer.

Bug: 63076692
Test: Unit Tests
Test: Google Play Movies
Change-Id: I6a4a3fa4b05d98554645f3c3149569702c96fd66
2017-06-28 19:26:37 -07:00
Adam Stone
db365d4c16 Merge "Add template type checking for EventMetric." 2017-06-28 01:16:01 +00:00
Adam Stone
cce6dffe92 Merge "Renames a few metrics for consistency." 2017-06-27 01:10:05 +00:00
Adam Stone
0963400d57 Add template type checking for EventMetric.
Add template var arg type checking for EventMetric.

This change adds some type checking for the variable argument
EventMetric which assures that there are no mismatches between
the definition of an EventMetric instance and the overloaded
constructor.

This is a merge from wvgerrit/28424.

BUG: 34846989
Test: Manually verified appropriate compile time errors.
Change-Id: I3e501abf76b78211f9cef19960ef11c179a0ff93
2017-06-26 20:54:43 +00:00
Adam Stone
80a95a1b64 Renames a few metrics for consistency.
Renames a few metrics for consistency with the logs processing module.

This CL changes the names of several metrics to be consistent with what
we use for the logs parsing module. E.g. for metrics consistency,
CdmSecurityLevel is referred to as "security_level" and SecurityLevel
is referred to as "requested_security_level".

The GetSecurityLevel method was modified to use CdmSecurityLevel instead
of the previous string type.

This CL is a merge from wvgerrit/28423

BUG: 37627621
BUG: 37627483
Test: Updated and ran unit tests to verify no regressions.
Change-Id: Ia4a8b202325386f2e02dcda4f58010dd7957a048
2017-06-26 20:49:39 +00:00
Adam Stone
d3758e9ce4 Merge changes I2618c2be,Ie8b9d8b9,I2f39f99c
* changes:
  Support GetPropertyByteArray for getting metrics.
  CDM Metrics Protocol buffer serialization.
  Refactored metrics to support pull model.
2017-06-26 20:32:15 +00:00
Steven Moreland
b0154ffe3d Use vendor variant of libstagefright_foundation. am: 6af84a8821
am: ee41ad8b01

Change-Id: I48c255046dd9fa23136adb1cc580ce59801fbb79
2017-06-26 18:05:07 +00:00
Steven Moreland
ee41ad8b01 Use vendor variant of libstagefright_foundation.
am: 6af84a8821

Change-Id: I5bb09d744733eeb107c1e5a4227f58553fa6266e
2017-06-26 17:59:58 +00:00
Rahul Frias
0dbc087eab Correct openssl error logging
[ Merge of http://go/wvgerrit/29041/ ]

Releasing allocated BIO buffers before logging failure causes the
openssl error to be erased.

b/62486203

Test: Ran WV unit, integration tests on angler

Change-Id: I3315edae2d3bd34887569ab88817f9591c12f409
2017-06-24 17:13:32 -07:00
Steven Moreland
6af84a8821 Use vendor variant of libstagefright_foundation.
Rather than having a lib called libstagefright_foundation and one
called libstagefright_foundation_vendor, we now just have one library
and the build system keeps track of the vendor APIs that are exposed.

Test: (sanity) boot device, watch (part of) DRM protected movie.
Change-Id: I38d5391475432ba9597e0bf20f669042b6265859
2017-06-22 17:11:30 -07:00
Jiyong Park
a6bc2c61e1 Merge "Use libstagefright_foundation_vendor" into oc-dr1-dev am: 5fb6323de8
am: 56102aedaf

Change-Id: I36c0ab87259211dff17af78227c7fd7e51da9bda
2017-06-20 05:48:56 +00:00
Jiyong Park
56102aedaf Merge "Use libstagefright_foundation_vendor" into oc-dr1-dev
am: 5fb6323de8

Change-Id: I8db43f57e08c5744ca0c76a1c0ea20526f8819bd
2017-06-20 05:46:55 +00:00
TreeHugger Robot
5fb6323de8 Merge "Use libstagefright_foundation_vendor" into oc-dr1-dev 2017-06-20 05:40:13 +00:00
Adam Stone
a0da1f067b Support GetPropertyByteArray for getting metrics.
Adds support for GetPropertyByteArray to return a serialized set of metrics
to the caller. This should be the last part of the widevine plugin
changes that fix the referenced bug.  More changes are coming on the
MediaDrm side.

This is a merge of wvgerrit/28422

I intend to submit 2048751, 2048750, and 2048509 together.

Bug: 36217927
Test: Added additional unit tests for affected code.
Change-Id: I2618c2be48d7d780127e35f237e2276efd080879
2017-06-20 03:09:59 +00:00
Adam Stone
b851dd8cfd CDM Metrics Protocol buffer serialization.
An implementation that serializes metrics to a protocol buffer.

This is a merge from wvgerrit/28440.

I intend to submit 2048751, 2048750, and 2048509 together.

Bug: 36217927
Bug: 36220975
Test: Added unit tests to cover modified code.
Change-Id: Ie8b9d8b91d2602b015f5568890a16c0419c126df
2017-06-20 02:39:25 +00:00
Adam Stone
a34e279d0f Refactored metrics to support pull model.
MetricsGroup split into 3 groups, session, engine, and crypto.
MetricsFrontEnd and Report removed.

This is a merge from wvgerrit/28420

Bug: 36217927
Test: Added unit tests to cover modified code.
Change-Id: I2f39f99ce88cc2229d6d1aa9459c67c5b86ccef4
2017-06-19 19:37:37 -07:00
John W. Bruce
12596a6a55 Pass CdmIdentifier to UsageInfo Methods am: 43b8522b70 am: 32b6cb55e7
am: 5f40a98ced

Change-Id: Ia073d02b6ef1ebb5ee7cb91ea72242316cb6ab49
2017-06-20 00:16:01 +00:00
John W. Bruce
3459020b00 Pass CdmIdentifier to UsageInfo Methods am: 43b8522b70 am: ed50683f80
am: 6db464ca54

Change-Id: I4dd629161df7a1f1e07b1913d8cf422ef58e8c6d
2017-06-20 00:15:50 +00:00
John W. Bruce
5f40a98ced Pass CdmIdentifier to UsageInfo Methods am: 43b8522b70
am: 32b6cb55e7

Change-Id: I78164b2721078ca2e2eda81e9b67f6f9065f35e0
2017-06-19 23:51:15 +00:00
John W. Bruce
6db464ca54 Pass CdmIdentifier to UsageInfo Methods am: 43b8522b70
am: ed50683f80

Change-Id: I4f53e33add64146e595ea0366b5830e2fbc15436
2017-06-19 23:45:21 +00:00
John W. Bruce
32b6cb55e7 Pass CdmIdentifier to UsageInfo Methods
am: 43b8522b70

Change-Id: Idff718d6a370fd927f4cc9019a482698313175a0
2017-06-19 23:34:21 +00:00
John W. Bruce
ed50683f80 Pass CdmIdentifier to UsageInfo Methods
am: 43b8522b70

Change-Id: Ida417b7043115f54c9b8daaa75d417dea39aafe6
2017-06-19 23:32:23 +00:00
John W. Bruce
43b8522b70 Pass CdmIdentifier to UsageInfo Methods
The methods on WvContentDecryptionModule related to UsageInfo (Secure
Stops) do not work if kDefaultCdmIdentifier has not been provisioned.
This can occur if an app provisions and uses an origin without any app
on that device ever provisioning the default origin. More concerningly,
this will happen 100% of the time on SPOID-using devices, as there is no
way to provision the default identifier on these devices.

The fix is to pass the current identifier to these methods so that they
do not have to use kDefaultCdmIdentifier.

Test: build_and_run_all_unit_tests.sh
Test: WV GTS Tests
Bug: 62431478
Change-Id: I92a8b4acb69c964abe8129bccf2ff48a66c4a9e0
2017-06-16 17:59:24 -07:00
Jiyong Park
a632dd3bb4 Use libstagefright_foundation_vendor
libwvdrmengine is a library in vendor. When BOARD_VNDK_VERSION is turned
on, any lib in vendor partition can only link against to other vendoor
libs or libs marked as vendor_available:true. This lib is using
libstagefright_foundation and the lib is not available to vendors.
Instead, libstagefright_foundation_vendor is provided as a
vendor-variant of the foundation library. Thus switching to the vendor
variant.

Bug: 37462569
Test: m libwvdrmengine
Change-Id: I1f83eb71a3ba496889f1fa5771029cd8b603f258
2017-06-15 11:02:17 +09:00
Rahul Frias
0a5fe1ffad Merge "Usage license handling corrections" into oc-dev am: c3cdb531d4 am: ab0cb541d0
am: 98ce1a0666

Change-Id: Ia32cb292a421af098a3b20fe49849f89b172066c
2017-06-14 00:08:03 +00:00
Rahul Frias
5e6e6737f1 Merge "Usage license handling corrections" into oc-dev am: c3cdb531d4 am: 1073526555
am: 93f5f43107

Change-Id: I1398ae005403d3a502da2163cee428a8a53b7deb
2017-06-14 00:07:47 +00:00
Kyle Alexander
75287fdc90 Merge "Update unit tests to build into /data/bin" into oc-dev am: b683d2be57 am: 15cfe0abfa
am: d64d29d241

Change-Id: I21aa438a1ffac27ab65794b6734e35d4f3029d3e
2017-06-14 00:07:35 +00:00
Kyle Alexander
f7ef98b60a Merge "Update unit tests to build into /data/bin" into oc-dev am: b683d2be57 am: fc7e636bdf
am: b13900af37

Change-Id: I46970986c1c1b7188226b2df0a7626aae55762e7
2017-06-14 00:07:21 +00:00
Rahul Frias
98ce1a0666 Merge "Usage license handling corrections" into oc-dev am: c3cdb531d4
am: ab0cb541d0

Change-Id: I63c3503d9021e5ab7e9fb21c0b38efaa431bff73
2017-06-13 23:06:52 +00:00
Rahul Frias
93f5f43107 Merge "Usage license handling corrections" into oc-dev am: c3cdb531d4
am: 1073526555

Change-Id: Ib7f14ce42b9aba16025c5396e32b6427f92b759c
2017-06-13 22:52:23 +00:00
Rahul Frias
ab0cb541d0 Merge "Usage license handling corrections" into oc-dev
am: c3cdb531d4

Change-Id: Ideb1ee0c9735fc83c28ac3064f804650ab98c99e
2017-06-13 22:46:07 +00:00
Rahul Frias
1073526555 Merge "Usage license handling corrections" into oc-dev
am: c3cdb531d4

Change-Id: Ib7a6b14cd009abf2247bad28939c06938c07db0a
2017-06-13 22:45:53 +00:00