Commit Graph

2364 Commits

Author SHA1 Message Date
Jeff Tinker
7a7a281adf Merge "Correct watchdog timeout am: bfef9c5748 am: 0d526131b9" into oc-mr1-dev-plus-aosp
am: bc89d3eab2

Change-Id: I4ffdf7a866d128a2e452cdda2b32a6d7771d8cc4
2017-07-21 22:17:32 +00:00
Jeff Tinker
96e67486e6 Correct watchdog timeout am: bfef9c5748 am: f0491381d6
am: bde861652c

Change-Id: Ia407b5ff9d85a876cf09e57c187fa91bbbcb9e5a
2017-07-21 22:17:21 +00:00
Android Build Merger (Role)
bc89d3eab2 Merge "Correct watchdog timeout am: bfef9c5748 am: 0d526131b9" into oc-mr1-dev-plus-aosp 2017-07-21 22:13:26 +00:00
Jeff Tinker
bde861652c Correct watchdog timeout am: bfef9c5748
am: f0491381d6

Change-Id: Ie5f942863f5d8a004571b4dc33215c2f68f93cca
2017-07-21 22:13:19 +00:00
Jeff Tinker
b7536ed96c Correct watchdog timeout am: bfef9c5748
am: 0d526131b9

Change-Id: I259cbb9ed9a4198c4a4425a6ea10c658b4e96b9f
2017-07-21 22:13:19 +00:00
Jeff Tinker
f0491381d6 Correct watchdog timeout
am: bfef9c5748

Change-Id: I5aa361f2ba38e5be9c6c2e673932f353332df1b7
2017-07-21 22:11:18 +00:00
Jeff Tinker
0d526131b9 Correct watchdog timeout
am: bfef9c5748

Change-Id: I07c5d81ba1289381a12b54a944c206c1845a21d0
2017-07-21 22:11:18 +00:00
Fred Gylys-Colwell
021f8c0bb9 Add watch dog timer to OEMCrypto L3 am: 08debe83c2
am: d50d6f7e87

Change-Id: I24aa0b3921fc16ea32768351a3da7007998f8c86
2017-07-21 19:58:22 +00:00
Fred Gylys-Colwell
d50d6f7e87 Add watch dog timer to OEMCrypto L3
am: 08debe83c2

Change-Id: Ic4faa7a2d051467c44642ecdd1f62b2a4447e04c
2017-07-21 19:52:18 +00:00
Jeff Tinker
bfef9c5748 Correct watchdog timeout
The L3 initialization watchdog was previously configured
for 2 seconds vs 5 seconds as originally intended.

Change-Id: Ie31251ac7a58c11262963ef9cb56d0dc08f5dc5b
related-to-bug:62106796
2017-07-21 12:09:43 -07:00
Fred Gylys-Colwell
08debe83c2 Add watch dog timer to OEMCrypto L3
Merge from Widevine repo of http://go/wvgerrit/29861

This code adds a watchdog timer to the oemcrypto initialization.  If
initialization does not finish within 5 seconds, the process will
abort.

For branch oc-dr1-dev, unlike nyc-mr2-dev, we save a metric indicating
there was a failure.

Testing: see code in patch 1.  Watch dog was forced while using Play
Movies.  The busy spinner spun for at least 5 seconds, but Play Movies
was able to restart itself.

b/62106796

Change-Id: Ib59f5bc4a484eff1dc386e07a4b198ecb713c69b
2017-07-21 10:17:54 -07:00
Rahul Frias
ab2a37da99 Merge "Support provisioning 3.0" 2017-07-20 06:28:04 +00:00
Rahul Frias
7e2e90841e Support provisioning 3.0
[ Merge of http://go/wvgerrit/29004 ]

Enable support for provisioning with OEM certificates as root of
trust.

b/62972441

Test: WV unit/intgration test and cdm_feature_test

Change-Id: I30576fc0bb68a873eeaaca03f6b9c89fa6a14327
2017-07-20 06:24:52 +00:00
Fred Gylys-Colwell
a81caa5bf1 Add watch dog timer to OEMCrypto L3 am: e20e909cbd
am: 6de0bd8486

Change-Id: I60c2d5848e4e731b048118fea88b0367e9cf31a3
2017-07-20 01:46:41 +00:00
Fred Gylys-Colwell
6de0bd8486 Add watch dog timer to OEMCrypto L3
am: e20e909cbd

Change-Id: I9298abc1539cb7170c5b11b14af5f7dacd09a970
2017-07-20 01:42:58 +00:00
Fred Gylys-Colwell
e20e909cbd Add watch dog timer to OEMCrypto L3
Merge from Widevine repo of http://go/wvgerrit/29861

This code adds a watchdog timer to the oemcrypto initialization.  If
initialization does not finish within 5 seconds, the process will
abort.

Testing: see code in patch 1.  Watch dog was forced while using Play
Movies.  The busy spinner spun for at least 5 seconds, but Play Movies
was able to restart itself.

b/62106796

Change-Id: Ib59f5bc4a484eff1dc386e07a4b198ecb713c69b
2017-07-19 16:35:46 -07:00
TreeHugger Robot
24a9ce769e Merge "Remove BoringSSL static targets in widevine." 2017-07-18 23:55:26 +00:00
Robert Sloan
02fb7421b9 Remove BoringSSL static targets in widevine.
Test: WidevineDashPolicyTests, MediaDrmTest, WidevineFailureTests, WidevineGenericOpsTests, WidevineH264PlaybackTests, WidevineHLSPlaybackTests, WidevineVP9WebMPlaybackTests, WidevineCodecStressTests

I saw (probably unrelated) in
com.google.android.media.gts.WidevineHEVCPlaybackTests#testL1WithUHD30
com.google.android.media.gts.WidevineH264PlaybackTests#testL1WithUHD30
com.google.android.media.gts.WidevineVP9WebMPlaybackTests#testVP9WebMCencSubSampleL1With240P30fps
com.google.android.media.gts.WidevineCodecStressTests#testVideoSecureH264
com.google.android.media.gts.WidevineCodecStressTests#testVideoSecureH265

BUG: 62945210
Change-Id: I5b5274d99ca5ad9299dc9cf9d83cb23fb6f6c13e
2017-07-18 21:44:52 +00:00
Edwin Wong
6cdf6d5a95 Merge "Check for nullptr IMemory." 2017-07-18 21:15:22 +00:00
TreeHugger Robot
d163337839 Merge "Add UniquePtr.h to libcdm" 2017-07-17 20:37:49 +00:00
Edwin Wong
d1a84b2bed Check for nullptr IMemory.
mapMemory can return a nullptr, must check for nullptr
IMemory.

Test: Play Movies (stream and pin movies)
Test: VtsHalDrmV1_0TargetTest

bug: 38386082
Change-Id: I66f9bfd08e36d575c7a45fe2eacd8fc981380c86
2017-07-17 09:54:00 -07:00
Jiyong Park
3d3655c4e6 Add UniquePtr.h to libcdm
The header in libnativehelper is not available for vendors building
against VNDK. So, copying it to local directory.

Bug: 63686260
Test: BOARD_VNDK_VERSION=current m -j libcdm
Change-Id: I5b6fd09103e2c2ae7c970fd898675aa4afe84ee2
2017-07-17 12:18:48 +09:00
John W. Bruce
740e1ca12b Report Widevine Version on Android
(This is a merge of http://go/wvgerrit/29282)

The Android API has long mandated that plugins respond to queries for a
version number, but we'd never hooked it up to the CDM's actual version
number until now.

Bug: 36867286
Test: libwvdrmdrmplugin_test
Test: libwvdrmdrmplugin_hidl_test
Change-Id: I952de4943f8e78b44d526bee66c54d31e9fe5ff1
2017-07-14 15:43:37 -07:00
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