Commit Graph

2629 Commits

Author SHA1 Message Date
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
Adam Stone
d2bb122b40 Merge "Create two new metric types to simplify metrics." into oc-mr1-dev am: c0133bf3a4
am: e3586dbf4b

Change-Id: I4cf565a5cc35c7438e840ab457c834d9a665b0ab
2017-08-26 20:33:28 +00:00
Adam Stone
e3586dbf4b Merge "Create two new metric types to simplify metrics." into oc-mr1-dev
am: c0133bf3a4

Change-Id: Iaf656f4a835e860939b44634ddcc8cfd11180be1
2017-08-26 20:30:28 +00:00
Adam Stone
c0133bf3a4 Merge "Create two new metric types to simplify metrics." into oc-mr1-dev 2017-08-26 20:26:08 +00:00
John W. Bruce
4a1be60235 Silence Version Number Canary am: 890f535b06
am: 5bca40e547

Change-Id: I28aa55529c70bc09bdaf4d2f1fb3dcd2cf1b6b33
2017-08-25 18:02:22 +00:00
John W. Bruce
5bca40e547 Silence Version Number Canary
am: 890f535b06

Change-Id: I5cc2795041e4859d02d3384f377000625d8b8132
2017-08-25 17:53:49 +00:00
John W. Bruce
890f535b06 Silence Version Number Canary
(This is a merge of http://go/wvgerrit/32280)

At the same time as the last version number canary change went in, the
version number for O-MR1 was updated to its final value. Thus, the test
never stopped failing on the dashboard. This patch silences the canary
again. No Widevine version number update is needed, since we already
updated it for O-MR1 in the previous patch.

Bug: 64951985
Test: request_license_test
Change-Id: Idf3c4b96e3f200d08a089bd08afdee8b0fd9dd76
2017-08-24 16:04:38 -07:00
Adam Stone
466ec4e632 Create two new metric types to simplify metrics.
This is part one of a mult-part change to revise some metrics. Several
metrics are currently EventMetric type when they should be a simpler
type.

Test: Added unit tests for the new types. Also, re-ran existing tests.
Verified playback works with Google Play, and re-ran Widevine GTS tests.

Bug: 36220619
Change-Id: I2ec8fc355f66ad4834dd722aacd22541fb9c94ad
2017-08-24 12:19:17 -07:00
Fred Gylys-Colwell
ad712dc7ad Create new usage header if old one corrupted am: 481a1effcb
am: 26a1175ec4

Change-Id: Id14456733047eb4ff406bc37c629dd6b7f4b3547
2017-08-19 00:55:47 +00:00
Fred Gylys-Colwell
26a1175ec4 Create new usage header if old one corrupted
am: 481a1effcb

Change-Id: I5221468430423c348736356984663fcb8013e9dd
2017-08-19 00:54:17 +00:00
Fred Gylys-Colwell
481a1effcb Create new usage header if old one corrupted
Merge of http://go/wvgerrit/31561

If the usage table header is corrupted, or if it is stale, then the
CDM should create a new one.

bug: 64572642

Testing: pushed stale usage table to Fugu, and netflix recovered
gracefully.  New unit test UsageTableHeaderTest.StaleHeader.

Change-Id: Ic66854ff6b0b252a0f4ca20e09f27852a50d6fcc
2017-08-18 15:09:18 -07:00
John W. Bruce
4c46d09e18 Update Widevine Android Version Number to 5.1.0 am: ce9c5f35ac
am: 55af4ec7bb

Change-Id: Ia6d6567b5db38f77f74641eeb26996c78a353676
2017-08-18 18:11:29 +00:00
John W. Bruce
55af4ec7bb Update Widevine Android Version Number to 5.1.0
am: ce9c5f35ac

Change-Id: I165beb5d5124596f9e04cd3e0f50d255e5d64388
2017-08-18 18:00:12 +00:00
John W. Bruce
ce9c5f35ac Update Widevine Android Version Number to 5.1.0
(This is a merge from http://go/wvgerrit/31360)

This also updates the version number change canary.

Bug: 64209738
Test: request_license_test
Change-Id: Ibdf27256822a32988a848ef5bf79bf2e2633fd59
2017-08-17 02:42:54 -07:00
Fred Gylys-Colwell
9e28656fa9 Move Watchdog Timer to L3 Init Only am: 1438873443 -s ours am: 6e8f889795 -s ours
am: 66ca265915  -s ours

Change-Id: I4f99bf318e77ea999ed3f1a91e09c3a16842f3f3
2017-08-11 04:30:30 +00:00
Fred Gylys-Colwell
c932faa000 Move Watchdog Timer to L3 Init Only am: 1438873443 am: e2173a86ff -s ours
am: 87cda53b9a  -s ours

Change-Id: I433af5fee970d27d80c9dd4166ab15173e768404
2017-08-11 04:30:18 +00:00
Fred Gylys-Colwell
66ca265915 Move Watchdog Timer to L3 Init Only am: 1438873443 -s ours
am: 6e8f889795  -s ours

Change-Id: I09426af7d950ad1c8e51afa375280ed7209adc10
2017-08-11 04:12:42 +00:00
Fred Gylys-Colwell
87cda53b9a Move Watchdog Timer to L3 Init Only am: 1438873443
am: e2173a86ff  -s ours

Change-Id: I382dd4e5b4b1e0f0aa44c201081ec5573afded17
2017-08-11 04:12:14 +00:00
Fred Gylys-Colwell
6e8f889795 Move Watchdog Timer to L3 Init Only
am: 1438873443  -s ours

Change-Id: I7c2e49318fd820af3a46a9ed792aa0e3c8725568
2017-08-11 04:08:43 +00:00
Fred Gylys-Colwell
e2173a86ff Move Watchdog Timer to L3 Init Only
am: 1438873443

Change-Id: I424b5606f1b0fd4bd5cdee45085c6843a65818ee
2017-08-11 04:08:43 +00:00
Fred Gylys-Colwell
4026d47de0 Merge "Move Watchdog Timer to L3 Init Only" into oc-mr1-dev am: 07edf821c4
am: e5d96b9950

Change-Id: Id6cd7669c8da4729b263c11055c64bd97eb2e7e6
2017-08-11 01:49:30 +00:00
Fred Gylys-Colwell
e5d96b9950 Merge "Move Watchdog Timer to L3 Init Only" into oc-mr1-dev
am: 07edf821c4

Change-Id: I35cdd77ad3fcd19e5f61a53b5ee8c615ad49973d
2017-08-11 01:45:40 +00:00
TreeHugger Robot
07edf821c4 Merge "Move Watchdog Timer to L3 Init Only" into oc-mr1-dev 2017-08-11 01:27:51 +00:00
Fred Gylys-Colwell
5bb2e55318 Move Watchdog Timer to L3 Init Only
Merge from Widevine repo of http://go/wvgerrit/31340

This CL moves the oemcrypto watchdog timer so that it only watches the
L3 initialization.  This will allow L1 initialization to take more
than 5 seconds if it needs to.

TEST: oemcrypto unit tests, Media GTS tests, Play Movies
b/64069544

Change-Id: I7826e4d72eda52ae8b2c9f8b3ac360fb42cbb115
2017-08-11 01:24:32 +00:00
Fred Gylys-Colwell
1438873443 Move Watchdog Timer to L3 Init Only
Merge from Widevine repo of http://go/wvgerrit/31302

This CL moves the oemcrypto watchdog timer so that it only watches the
L3 initialization.  This will allow L1 initialization to take more
than 5 seconds if it needs to.

TEST: oemcrypto unit tests, Media GTS tests, Play Movies
b/64069544

Merged-In: I7826e4d72eda52ae8b2c9f8b3ac360fb42cbb115

Change-Id: I7826e4d72eda52ae8b2c9f8b3ac360fb42cbb115
2017-08-11 01:23:15 +00:00
Jiyong Park
a731bbcfbf Merge "Build widevine tests with BOARD_VNDK_VERSION set" into oc-mr1-dev am: 21715115bc
am: a8d6af5ec2

Change-Id: I494add05603760ee2acafa2b508b5d7f2585f0e2
2017-08-09 02:43:58 +00:00
Jiyong Park
a8d6af5ec2 Merge "Build widevine tests with BOARD_VNDK_VERSION set" into oc-mr1-dev
am: 21715115bc

Change-Id: I85a599643c184126da5f1f0046624e0e8f6c4a68
2017-08-09 02:38:22 +00:00
TreeHugger Robot
21715115bc Merge "Build widevine tests with BOARD_VNDK_VERSION set" into oc-mr1-dev 2017-08-09 02:32:48 +00:00
John Bruce
6f27c36dc4 Merge "Get System ID From OEM Cert" into oc-mr1-dev am: 6dad75e395
am: 985a3c4ea9

Change-Id: I418409dcf8ada4282137aebcceb0457132c6874a
2017-08-08 00:16:34 +00:00
Yifan Hong
14435d3ef4 Merge "Move widevine unit tests to vendor." into oc-mr1-dev am: 0e52773ff7
am: 44b5a84259

Change-Id: I3e8e9f2fa57159e2869397c209e1858eab0390e4
2017-08-08 00:16:25 +00:00
John Bruce
985a3c4ea9 Merge "Get System ID From OEM Cert" into oc-mr1-dev
am: 6dad75e395

Change-Id: I2cc708e25538c3a845938b104693cc84dbea7c7e
2017-08-08 00:00:56 +00:00
Yifan Hong
44b5a84259 Merge "Move widevine unit tests to vendor." into oc-mr1-dev
am: 0e52773ff7

Change-Id: I0fe6968f44e0ba211f360b57652e2e43002ea8a4
2017-08-08 00:00:45 +00:00
John Bruce
6dad75e395 Merge "Get System ID From OEM Cert" into oc-mr1-dev 2017-08-07 23:50:21 +00:00
TreeHugger Robot
0e52773ff7 Merge "Move widevine unit tests to vendor." into oc-mr1-dev 2017-08-07 23:40:40 +00:00
Jiyong Park
853773dd93 Build widevine tests with BOARD_VNDK_VERSION set
The tests are using vendor only libs such as libcdm and libwvlevel3,
thus marked as LOCAL_PROPRIETARY_MODULE to use the libs. In addition,
the dependency to libmedia is changed to libmedia_omx since libmedia is
not available to vendor modules. UniquePtr is replaced with
std::unique_ptr since UniquePtr.h in /libnativehelper is not available
to vendors (and will not be completely removed in a near future).

Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j tests

Change-Id: I4e9d3267b20c1d52f57664b89f15330e2ebd953d
2017-08-07 16:28:28 +09:00
Yifan Hong
5e8f727b71 Move widevine unit tests to vendor.
Test: BOARD_VNDK_VERSION=current m checkbuild -j
Test: ./build_and_run_all_tests.sh

Bug: 33241851
Change-Id: I97c8fcc84bc19d88e8aa941eb283089c8ecf47d5
2017-08-04 15:26:26 -07:00
Edwin Wong
c2145bbcef Replace toStatus indirection. am: 485f11483c
am: 213ef42448

Change-Id: I1d67208986e5d2f2eb3464d5d14a32b6beb47c90
2017-08-04 04:07:18 +00:00
Edwin Wong
213ef42448 Replace toStatus indirection.
am: 485f11483c

Change-Id: I4a650aaee96a659ec35d9be361f6027da91c47ff
2017-08-04 04:01:18 +00:00