Commit Graph

2516 Commits

Author SHA1 Message Date
Rahul Frias
a42a52f89c Fixes for usage table upgrades
am: 20eeb1e546

Change-Id: Ifb5755b3f84e9b4b87e3d0cdaf618daff0bac141
2017-09-20 18:36:08 +00:00
Rahul Frias
20eeb1e546 Fixes for usage table upgrades
[ Merge of http://go/wvgerrit/34060 ]

License were not being upgraded successfully from usage
tables to usage table headers and entries (big usage tables).

Bug: 65730713

Test: WV unit/integration tests
Test: GTSMediaDrmTests
Test: Playback using netflix and play movies
Test: Manual upgrade from N (L3)
Change-Id: I7ef127204104fa36dd1ee385bc80ed6a81172b4b
2017-09-19 14:27:03 -07:00
Fred Gylys-Colwell
31437aae1e Merge "Add watch dog timer to OEMCrypto L3" into oc-mr1-dev am: ec9e1343ee
am: dc403e611b

Change-Id: I29b13f556e107e166b5d1bf1c7adb9f38ad6a2f8
2017-09-15 10:03:40 +00:00
Fred Gylys-Colwell
dc403e611b Merge "Add watch dog timer to OEMCrypto L3" into oc-mr1-dev
am: ec9e1343ee

Change-Id: Id4f005663c19ac490c4e5374d7f9612d1dcbef8a
2017-09-15 06:11:52 +00:00
TreeHugger Robot
ec9e1343ee Merge "Add watch dog timer to OEMCrypto L3" into oc-mr1-dev 2017-09-15 06:05:21 +00:00
Fred Gylys-Colwell
7ca2b21363 Add watch dog timer to OEMCrypto L3
Merge from Widevine repo of http://go/wvgerrit/33540

This code adds a watchdog timer to the level 3 initialization.  If
initialization does not finish within 5 seconds, the process will
abort, printing a small amount of debugging information.

arm/libwvlevel3.a Level3 Library 4445 Sep 11 2017 14:05:15

Test: unit tests on bullhead. Video on Play Movies.  
Kyle ran the GTS tests on loop overnight.

bug: 65379279

Change-Id: I0e0e4b158dbce193abbd8ee2cf6b366060c768b8
2017-09-14 18:16:21 +00:00
Rahul Frias
75f268ffbb Clock consistency checks am: 1f32bef75b
am: d6b0ff208e

Change-Id: Ie9751ec03281cf98c0c87c29fc4a755d2b6fe80c
2017-09-14 04:23:00 +00:00
Rahul Frias
d6b0ff208e Clock consistency checks
am: 1f32bef75b

Change-Id: Iafacc464d0acd3310b1d12807b43b8bd06007983
2017-09-14 04:21:39 +00:00
TreeHugger Robot
2026b4b4d1 Merge "Add 'vendor.' prefix to a vendor HAL service name" 2017-09-12 06:34:55 +00:00
Rahul Frias
1f32bef75b Clock consistency checks
[ Merge from http://go/wvgerrit/33440 ]

Introduce checks to guard against clock tampering.

Bug: 62037413

Test: WV unit, integration tests on angler
Test: Manual clock rollback test
Test: Playback testing (Netflix, Play movies) on sailfish
Test: GTS test on angler
Change-Id: I47938109adb5c0f5e9aefc58eb5dac156b9f16ef
2017-09-11 11:56:32 -07:00
Rahul Frias
8d454b2846 Merge "Correct when usage entry information is updated" into oc-mr1-dev am: 8309922a89
am: 8c10719658

Change-Id: I3b5e1af6e310e6fa1aa96e09dc35c64cd49502a4
2017-09-10 05:00:31 +00:00
Rahul Frias
8c10719658 Merge "Correct when usage entry information is updated" into oc-mr1-dev
am: 8309922a89

Change-Id: Id8c65a1897ecf3206c5c1a7b6f06cd0d44a38a4f
2017-09-10 04:58:31 +00:00
Rahul Frias
8309922a89 Merge "Correct when usage entry information is updated" into oc-mr1-dev 2017-09-10 04:55:59 +00:00
Rahul Frias
a40aeec7bf Correct when usage entry information is updated
[ Merge of http://go/wvgerrit/33340 ]

Update usage entry information only when usage entries are
supported.

Bug: 65483034

Test: wv unit/integration tests on angler
Test: GTS tests
Test: playback using play movies and netflix

Change-Id: If5a33900a30ce88f97ef46a800817cd4c71d195e
2017-09-08 11:24:15 -07:00
Adam Stone
df12ff1574 Merge "Fix support for app package name." into oc-mr1-dev am: f2e7f23f00
am: 9e74df736d

Change-Id: I91627c65de063e536d9cac88bd18a75f51b97d59
2017-09-07 19:32:00 +00:00
Adam Stone
9e74df736d Merge "Fix support for app package name." into oc-mr1-dev
am: f2e7f23f00

Change-Id: I0dc122e0bfe920132b8232cf9250b3f9c87784b8
2017-09-07 19:30:03 +00:00
TreeHugger Robot
f2e7f23f00 Merge "Fix support for app package name." into oc-mr1-dev 2017-09-07 19:25:10 +00:00
Rahul Frias
b080f8a718 Merge "Corrections when releasing usage information" into oc-mr1-dev am: d355e505c7
am: 637a4d10ad

Change-Id: I4e940aee5361db310d617ab1fcbb17cbb9569a62
2017-09-07 18:11:08 +00:00
Rahul Frias
eadab892aa Merge "Remove ExpiryOnReleaseOfflineKeyTest" into oc-mr1-dev am: 4c69cf6245
am: 5f92786d31

Change-Id: Ic61622799037e2a69d4ba967ed6864bf9ecc76a2
2017-09-07 18:10:51 +00:00
Rahul Frias
637a4d10ad Merge "Corrections when releasing usage information" into oc-mr1-dev
am: d355e505c7

Change-Id: Ieb64e92d52b856910dcbfe013c886b8a04788158
2017-09-07 18:00:27 +00:00
Rahul Frias
5f92786d31 Merge "Remove ExpiryOnReleaseOfflineKeyTest" into oc-mr1-dev
am: 4c69cf6245

Change-Id: Ia1ff1150cb9764f36cfaa8671052c81787aec387
2017-09-07 18:00:09 +00:00
Adam Stone
1b9c6ea789 Fix support for app package name.
The app package name was not being reported to the media stats. This
change adds the package name as part of the report to media stats.

This is one of two parts to this change. The other part is in
frameworks/av.

Bug: 64584568

Test: Unit tests, GTS tests, tried with Google Play Movies.
Change-Id: I1ca09db3a59d9a0950f424d977f8774dffd09c2b
2017-09-06 22:25:13 -07:00
Rahul Frias
d355e505c7 Merge "Corrections when releasing usage information" into oc-mr1-dev 2017-09-07 01:18:59 +00:00
Rahul Frias
4c69cf6245 Merge "Remove ExpiryOnReleaseOfflineKeyTest" into oc-mr1-dev 2017-09-07 00:42:51 +00:00
Rahul Frias
cb8bb251e4 Remove ExpiryOnReleaseOfflineKeyTest
The test verifies that a downloaded license receives an expiry event
in a session if it is released from another session. With
the introduction of the big usage table feature loading a
license/usage entry into multiple sessions is not permitted and
so this test is no longer needed.

Some OEMCrypto implementations might require OEMCrypto_UpdateUsageEntry
to be called between calls to OEMCrypto_LoadKeys and
OEMCrypto_ReportUsage. This CL adds the call to
OEMCrypto_UpdateUsageEntry.

Test: WV unit/integration test
Test: Playback using play movies and netflix
Test: GTS tests

Bug: 64988654
Change-Id: Ic737c3200ea1858736a168be835507378eaf7b3e
2017-09-06 12:06:05 -07:00
Rahul Frias
120c28cd9a Corrections when releasing usage information
[ Merge of http://go/wvgerrit/32940 ]

Releasing usage entries may cause other entries to be moved or
information updated. Instead of retrieving all entries once and trying
to release them, refetch them after each release.

Test: WV Unit/Integration tests
Test: GTS tests (failures seen, but no additional failures due to this CL)
Test: Playback testing using play movies and netflix.

Bug: 65372189
Change-Id: I700e60834c7f711c9146dfd720f9cac014981311
2017-09-06 10:22:43 -07:00
Fred Gylys-Colwell
41c6128724 Merge "Call pthread_join to clean up watchdog thread" into oc-mr1-dev am: 6e680854ed
am: 9ca2306402

Change-Id: I340076ad83dd4dce691e67fafbd70643c14ffba1
2017-09-06 01:29:59 +00:00
Adam Stone
25ac9ebad4 Merge "Fixes reporting of dynamic adapter metrics." into oc-mr1-dev am: b3654fb2ab
am: 572105deb0

Change-Id: I17df9eec9b61c0c7040a0ac68a9401443e913506
2017-09-06 01:29:45 +00:00
Fred Gylys-Colwell
9ca2306402 Merge "Call pthread_join to clean up watchdog thread" into oc-mr1-dev
am: 6e680854ed

Change-Id: Iddd04877630e2c9c96e573073c24dd9d99fecf12
2017-09-06 00:33:57 +00:00
TreeHugger Robot
6e680854ed Merge "Call pthread_join to clean up watchdog thread" into oc-mr1-dev 2017-09-06 00:23:03 +00:00
Adam Stone
572105deb0 Merge "Fixes reporting of dynamic adapter metrics." into oc-mr1-dev
am: b3654fb2ab

Change-Id: If53013cd3b38e1a7c60f1d5fdc464b7b30a33912
2017-09-05 23:52:31 +00:00
Adam Stone
b3654fb2ab Merge "Fixes reporting of dynamic adapter metrics." into oc-mr1-dev 2017-09-05 23:46:58 +00:00
Fred Gylys-Colwell
e659655886 Call pthread_join to clean up watchdog thread
Merge from Widevine repo of http://go/wvgerrit/32880

This CL calls pthread_join on the watchdog thread to clean up its
stack and other memory usage.

Test: unit tests on bullhead, GTS tests run in loop, 
Play Movies on bullhead.

bug: 65302198

Change-Id: I90f993333dfd019c1ffb96647a6472e4828d50aa
2017-09-05 23:21:47 +00:00
Adam Stone
4d6cfd414c Fixes reporting of dynamic adapter metrics.
The metrics from the dynamic adapter were not previously being reported.
This change allows them to be reported when all other DRM metrics are
reported.

Bug: 64566432

Test: Unit tests, GTS tests, and Play movies.
Change-Id: I916fb028146fdd04b4cf5bbb5c10ecdaffae6c95
2017-09-05 11:11:49 -07:00
Fred Gylys-Colwell
7ce5089fbc Merge "Update PerOriginProvisioningSupportsOldPaths" into oc-mr1-dev am: 4a4f9ff815
am: 6594e35bad

Change-Id: Ib1617a90473d150b3606f4fc1ec61b94b1197043
2017-09-01 01:16:14 +00:00
Fred Gylys-Colwell
6594e35bad Merge "Update PerOriginProvisioningSupportsOldPaths" into oc-mr1-dev
am: 4a4f9ff815

Change-Id: Ic4c16c14c0bdb5e19396c48b77c7b0b17fe95fd1
2017-09-01 00:57:02 +00:00
John W. Bruce
f2266b8955 Merge "Unified State-Changing API for LicenseKeyStatus" into oc-mr1-dev am: cd6178cf82
am: 753f6c6d27

Change-Id: Ic324a0bf46bc0d862de9c95072c5e4d53f157e51
2017-09-01 00:52:24 +00:00
TreeHugger Robot
4a4f9ff815 Merge "Update PerOriginProvisioningSupportsOldPaths" into oc-mr1-dev 2017-09-01 00:48:27 +00:00
John W. Bruce
753f6c6d27 Merge "Unified State-Changing API for LicenseKeyStatus" into oc-mr1-dev
am: cd6178cf82

Change-Id: I6d33560abca4253b83f72751846b3d4b34724321
2017-08-31 23:57:33 +00:00
TreeHugger Robot
cd6178cf82 Merge "Unified State-Changing API for LicenseKeyStatus" into oc-mr1-dev 2017-08-31 23:45:41 +00:00
Fred Gylys-Colwell
fb1e0623ad Update PerOriginProvisioningSupportsOldPaths
Merge from Widevine repo of http://go/wvgerrit/32067

PerOriginProvisioningSupportsOldPaths is changed to allow for there to
be several other device files.

bug:64952779
Test: unit tests on bullhead.

Change-Id: I0593d95a877c236c9a87c5893bbec22abe25fde9
2017-08-31 14:42:49 -07:00
Jaekyun Seok
69d93e5d53 Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I6199c7c4f7f978637443f73ec5428805a9ae658c
2017-08-31 13:00:46 +09:00
Rahul Frias
5a75269046 Merge "Add SRM integration tests" into oc-mr1-dev am: e492811200
am: e523cf2b76

Change-Id: I5a45b2b0298e0db6856ec63eac69faa11e5da1a7
2017-08-30 23:32:41 +00:00
Rahul Frias
e523cf2b76 Merge "Add SRM integration tests" into oc-mr1-dev
am: e492811200

Change-Id: I32e72caf2abb060aabef2ee348c01b8e2b8fa23e
2017-08-30 22:28:03 +00:00
Rahul Frias
e492811200 Merge "Add SRM integration tests" into oc-mr1-dev 2017-08-30 20:57:06 +00:00
Adam Stone
ef14e1699b Apply recommended type and name changes to metrics. am: 5d2693536c
am: 51bf15a380

Change-Id: I6831dea3b778bb366d00940c409eda67dcb3fc51
2017-08-30 20:28:02 +00:00
Adam Stone
51bf15a380 Apply recommended type and name changes to metrics.
am: 5d2693536c

Change-Id: I7c2e3ea2ab76ec874a46a1245d5ff402ee4b418b
2017-08-30 20:09:06 +00:00
Adam Stone
5d2693536c Apply recommended type and name changes to metrics.
Bug: 36220619
BUG: 64071905

Test: Re-ran existing unit tests. Ran GTS tests. Tested with Google Play.
Change-Id: I79ddc8ed3290e6d74364cf96305054e55243c5ff
2017-08-29 17:12:44 -07:00
John W. Bruce
b8e31487a4 Unified State-Changing API for LicenseKeyStatus
(This is a merge of http://go/wvgerrit/31040)

Because the Policy Engine was only consulting the result of the Max-Res
Decode check when it was in kLicenseStateCanPlay and not in other states
that imply kKeyStatusUsable, like kLicenseStateWaitingLicenseUpdate, the
Max-Res Decode results would not be honored during the interval between
requesting a renewal and receiving the result. (Or until the key
expired.) This was particularly problematic for keys with renewal delays
less than ten seconds long, which would freeze the Max-Res state before
it had a chance to update for the first time, effectively disabling
Max-Res Decode until renewal was received.

Fixing this required changing how the Policy Engine and the
LicenseKeyStatus objects communicate about the changing usability state
of the LicenseKeyStatus objects. Before, a call to ApplyConstraints()
might calculate a Max-Res failure, but this failure would be pending
until the Policy Engine deigned to call ApplyStatusChange() again.
Without a call to ApplyStatusChange(), it could pend forever. This put a
burden on the PolicyEngine to poll the LicenseKeys with redundant
ApplyStatusChange() calls using the same CdmKeyStatus that the keys were
already in, just in case Max-Res had changed since the last necessary
call to ApplyStatusChange().

If the Policy Engine got the timing of these calls wrong, it would
result in Max-Res results being ignored. (as in the linked bug) If it
ever polled with the wrong CdmKeyStatus, it would update the
LicenseKeys' status when it did not mean to. It would be preferable if
this polling were not needed, so that the Policy Engine couldn't get it
wrong.

This patch changes the API between these classes so that when Max-Res
fails, the state change can be reported immediately instead of pending
until ApplyStatusChange() is called, eliminating the need for polling.
All state changes to the LicenseKeyStatus objects go through a unified
ApplyStatusChange() method that can update the CdmKeyStatus, resolution,
and/or HDCP level and report any resulting usability changes
immediately. This patch updates the unit tests to exercise this new API
instead of the old API.

Previously, the linked bug slipped past our unit tests because we only
test unrenewable, streaming licenses against Max-Res. This patch adds
several more variants to
policy_engine_constraints_unittest so that it tests six kinds of
license to provide better coverage.

Bug: 62393949
Test: build_and_run_all_unit_tests
Change-Id: I0dfdbf6b8ea39abb446089aef5f6ea0502e9b4c6
2017-08-29 16:37:49 -07:00
Rahul Frias
0c66866902 Add SRM integration tests
[ Merge of http://go/wvgerrit/30582 ]

Bug: 34285383

Test: WV unit, integration tests, cdm_feature_test.sh

Change-Id: I725150a12a589144e58ab04470d50ba9317a4c46
2017-08-29 12:14:57 -07:00