Commit Graph

14 Commits

Author SHA1 Message Date
Bob Badour
6f047790e0 Cleanup vendor projects are proprietary.
Test: m droid dist
Change-Id: I0bdec38c4d12710fa97b91665d211ba6c0d4b24d
2023-02-03 14:37:11 -08:00
Ulya Trafimovich
07440a83bf Disable dexpreopt and <uses-library> check for tests.
Bug: 132357300
Test: treehugger
Change-Id: Ia2c6cba7a4a91f6d3b0b343a44c4257817c3a4cf
2021-04-27 14:27:37 +01:00
Bob Badour
7e3dcfe54a [LSC] Add LOCAL_LICENSE_KINDS to vendor/widevine
Added legacy_by_exception_only to:
  libwvdrmengine/test/castv2/Android.mk
  libwvdrmengine/test/java/MediaDrmApiTest/Android.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I71c2aaa0efb3730f56863bc9047f8794e6a9de01
2021-04-21 14:31:12 -07:00
Anton Hansson
fe7ca1ad87 vendor/widevine: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I1c0366e78fb44f06bc07329866440097275f5b51
2018-02-27 18:58:17 +00:00
Paul Duffin
00f28599b9 Add uses-library for org.apache.http.legacy
The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* libwvdrmengine/test/castv2/AndroidManifest.xml
    Add uses-library for org.apache.http.legacy because CastSignAPITest
    depends on org.apache.http.legacy library at build time so
    presumably needs it to be provided at runtime. Unfortunately,
    CastSignAPITest targets P and from P onwards the
    org.apache.http.legacy library is only provided when explicitly
    requested through the manifest.

* libwvdrmengine/test/java/AndroidManifest.xml
    Add uses-library for org.apache.http.legacy because MediaDrmAPITest
    depends on org.apache.http.legacy library at build time so
    presumably needs it to be provided at runtime. Unfortunately,
    MediaDrmAPITest targets P and from P onwards the
    org.apache.http.legacy library is only provided when explicitly
    requested through the manifest.

Bug: 72375096
Bug: 18027885
Test:  make checkbuild
Change-Id: I3a761a693918fd506ace26fd7c3502a2a42c031d
2018-02-23 14:55:50 +00:00
Rahul Frias
169d0b6cb6 Merges to android Pi release (part 4)
These are a set of CLs merged from the wv cdm repo to the android repo.

* Correct RELEASE_ALL_USAGE_INFO_ERRORs

  Author: Rahul Frias <rfrias@google.com>

  [ Merge of http://go/wvgerrit/28742 ]

  RELEASE_ALL_USAGE_INFO_ERROR_4 and 5 were introduced and made use of in
  http://go/wvgerrit/24022 (branch: oc-dev). The error code definitions
  were merged over in http://go/wvgerrit/24602.

  When http://go/wvgerrit/24622 from cdm_partners_3.2 was merged to master
  (http://go/wvgerrit/27723) there was conflict in error codes. The error
  codes were adjusted to RELEASE_ALL_USAGE_INFO_ERROR_3 and 4
  and were made use of.

  To avoid renaming the errors between oc-dev and master, new errors
  RELEASE_ALL_USAGE_INFO_ERROR_6 and 7 have been added to handle the
  scenarios noted in the merge from cdm_partner_3.2. The other
  errors have been reverted back to RELEASE_ALL_USAGE_INFO_ERROR_4 and 5.
  They will be used when http://go/wvgerrit/24602 is merged.

* Address compilation issues

  Author: Rahul Frias <rfrias@google.com>

  [ Merge of http://go/wvgerrit/28740 ]

  These changes enable compilation of most of the cdm code on android
  expect for OEMCrypto unit tests (b/62739406) on wv master.

* Add property for binary/base64 provisioning msgs.

  Author: Gene Morgan <gmorgan@google.com>

  [ Merge of http://go/wvgerrit/28074 ]

  Property is "provisioning_messages_are_binary". Its default setting is
  false in the CE CDM, but it can be overridden by integrators.

  Added section to integration guide that discusses Provisioning Server
  message formats and the new property.

  Link: https://docs.google.com/document/d/1cBVbhgrajLpDe2W3_vzLzUqzpdDt73chvm4_sZlZlS8/edit#heading=h.hgxw53ddw7jo

BUG: 71650075
Test: Not currently passing. Will be addressed in a subsequent
      commit in the chain.

Change-Id: I9168193819974d1ff65d9a94dbd762e45ecc43ca
2018-01-16 19:27:13 -08:00
Rahul Frias
0419b55222 Merges to android Pi release (part: 1)
Below are a set of CLs being merged from the wv cdm repo to the android repo.

* Fix handling of OEM Cert public key.

  Author: Srujan Gaddam <srujzs@google.com>

  [ Merge of http://go/wvgerrit/27921 ]

  This is a potential fix for b/36656190. Set aside public
  key on first call to get the public key, and use it afterwards.
  This gets rid of extra calls to OEMCrypto_GetOEMPublicCertificate(),
  which has side-effect of staging the OEM private key.

  This also fixes a problem where the public cert string was
  not being trimmed to match the size returned by
  OEMCrypto_GetOEMPublicCertificate().

* Complete provisioning request/response for Provisioning 3.0

  Author: Gene Morgan <gmorgan@google.com>

  [ Merge of http://go/wvgerrit/27780 ]

  Fix bug on provisioning request path where GenerateDerivedKeys()
  was being called when preparing to generate the signature.

  Add message signature verification, and call correct OEMCrypto
  routine to rewrap the private key (OEMCrypto_RewrapDeviceRSAKey30).

* Implement Cdm::deleteAllUsageRecords()

  Author: Gene Morgan <gmorgan@google.com>

  [ Merge of http://go/wvgerrit/27780 ]

  Delete all usage records for current origin.  Removes usage
  records from file system and retains the PSTs.  The deletes
  any usage entries matching those PSTs held by OEMCrypto.

  BUG: 35319024

* Remove stringencoders library from third_party.

  Author: Jacob Trimble <modmaker@google.com>

  [ Merge of http://go/wvgerrit/27585 ]

  We have a fork of the stringencoders library that we use for base64
  encoding.  This reimplements base64 encoding to remove the extra
  dependency and to reduce the amount of code.

* Add Cdm::deleteUsageRecord() based on key_set_id.

  Author: Gene Morgan <gmorgan@google.com>

  [ Merge of http://go/wvgerrit/27605 ]

  Delete specified usage record from file system usage info and
  from OEMCrypto.

  BUG: 35319024

* Modifiable OEMCrypto

  Author: Fred Gylys-Colwell <fredgc@google.com>

  [ Merge of http://go/wvgerrit/24729 ]

  This CL adds a new variant of the OEMCrypto mock code that adjusts its
  behavior based on a configuration file.  This is intended for
  testing.

  For example, a tester can set current_hdcp to 2 in the options.txt
  file, push it to the device, and verify that a license is granted for
  HDCP 2.0.  Then the tester can edit the value of current_hdcp to 1 and
  push the file to the device.  Playback should stop because the license
  is no longer valid.

  This variant uses a real level 1 liboemcrypto.so to push data to a
  secure buffer.  That means we can test playback for a license that
  requires secure buffers on an Android device with real secure buffers.

  BUG: 35141278
  BUG: 37353534

BUG: 71650075
Test: Not currently passing. Will be addressed in a subsequent
      commit in the chain.

Change-Id: I58443c510919e992bb455192e70373490a00e2b6
2018-01-16 19:21:54 -08:00
Paul Duffin
940146a195 Add dependencies on org.apache.http.legacy where needed
Incorporates two main changes:
* Stops statically including the org.apache.http.legacy library. That library is
  a stubs library so it makes no sense to statically include it.
* Adds uses-library declaration for org.apache.http.legacy to those packages
  that depend on org.apache.http.legacy, either directly or transitively.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* libwvdrmengine/test/castv2/AndroidManifest.xml
    Added <uses-library> for org.apache.http.legacy to ensure classes
    are provided at runtime. It is marked as optional as the
    application is intended to be run on versions that do not provide
    the library, but provide the classes by default, i.e. its
    minSdkVersion is < M (23).

* libwvdrmengine/test/java/AndroidManifest.xml
    Added <uses-library> for org.apache.http.legacy to ensure classes
    are provided at runtime. It is marked as optional as the
    application is intended to be run on versions that do not provide
    the library, but provide the classes by default, i.e. its
    minSdkVersion is < M (23).

Bug: 18027885
Test: m -j32 droid && adb reboot bootloader && fastboot flashall -w
Change-Id: I4eb4621bc4c2f481c0d909acac871187f006e145
2017-07-25 09:14:51 +01:00
Kyle Alexander
038580c6c9 Update unit tests to build into /data/bin
Tradefed needs these tests to be in the /DATA directory.

Test: cd vendor/widevine && ./build_and_run_all_unit_tests
      All tests should build and pass.
      make tests
      unzip android-tests.zip and verify all tests located in DATA/bin

Bug: 62055647
Change-Id: I35925e29558561c4726bb2249499bfee4e54cf45
2017-06-12 23:48:15 -07:00
Jeff Tinker
92bf971ea8 Fix possible infinite loop in test code
Also handle ResourceBusyException

merge of http://go/wvgerrit/14470 from widevine repo

bug: 21172957
Change-Id: I6815786eb7a678725cf2632f1009c7f566ba7499
2015-05-27 16:52:28 -07:00
Jeff Tinker
2bab114f59 Fix cast v2 authentication unit test
Merge of https://widevine-internal-review.googlesource.com/#/c/10309 from the widevine cdm repo.

bug: 15341137

Change-Id: I188d7d7a3861dcbec1950dfbe8dd9504a60899bf
2014-05-30 15:45:40 +00:00
Jeff Tinker
99c76b901e Build cast v2 mediadrm signer library as non-static
Change-Id: I5e4401d06480c2122a2f353e789a78933b6882c3
related-to: 13988104
2014-05-21 18:18:32 +00:00
Jeff Tinker
aaf4427950 Add signature|system permission to MediaDrm signer APIs
Update test to require the system permission

Merge of https://widevine-internal-review.googlesource.com/#/c/9652
from the Widevine cdm repo.

Change-Id: I071e55f09f85c420e6778ebf170f5110cf39809e
related-to-bug: 12702350
2014-04-02 23:41:12 +00:00
Jeff Tinker
3db90f54c1 Support CAST V2 authentication
bug: 12702350

Squashed commit of these CLs from the widevine cdm repo:

Cast V2 cdm support
https://widevine-internal-review.googlesource.com/#/c/9190/

Add CASTv2 Support to DrmPlugin
https://widevine-internal-review.googlesource.com/#/c/9228/

Test for CastV2 authentication APIs
https://widevine-internal-review.googlesource.com/9550

Change-Id: I6d66bc1bbd653db5542c68687b30b441dd20617f
2014-04-01 14:26:27 -07:00