Add Call to Install Keybox to Widevine CDM

This merges the following changes from the Widevine CDM repository:

1a72a7e  Combine utility code into single library on Android
  Combines several previously-separate files into a static library,
  libcdm_utils, so that it can easily be used by both CDM and
  OEMCrypto.

8c4d04d  Install Keybox
  If the keybox has not been installed, install it from
  /factory/wv.keys.

Bug: 9972451
Change-Id: I8688ecd0adcf321e0c7d0faf55dd10f3910c12ec
This commit is contained in:
John "Juce" Bruce
2013-08-08 14:52:31 -07:00
parent ddf957faa5
commit b0d85ac1af
14 changed files with 68 additions and 28 deletions

View File

@@ -31,17 +31,8 @@ LOCAL_SRC_FILES := \
$(CORE_SRC_DIR)/device_files.cpp \
$(CORE_SRC_DIR)/license.cpp \
$(CORE_SRC_DIR)/policy_engine.cpp \
$(CORE_SRC_DIR)/properties.cpp \
$(CORE_SRC_DIR)/string_conversions.cpp \
$(SRC_DIR)/clock.cpp \
$(SRC_DIR)/file_store.cpp \
$(SRC_DIR)/lock.cpp \
$(SRC_DIR)/log.cpp \
$(SRC_DIR)/properties_android.cpp \
$(SRC_DIR)/timer.cpp \
$(SRC_DIR)/wv_content_decryption_module.cpp
LOCAL_WHOLE_STATIC_LIBRARIES := libmodp_b64
LOCAL_MODULE := libcdm
LOCAL_MODULE_TAGS := optional

View File

@@ -47,6 +47,7 @@ class Properties {
static bool GetProductName(std::string* product_name);
static bool GetBuildInfo(std::string* build_info);
static bool GetDeviceFilesBasePath(std::string* base_path);
static bool GetFactoryKeyboxPath(std::string* keybox);
private:
static void set_begin_license_usage_when_received(bool flag) {

View File

@@ -92,4 +92,13 @@ bool Properties::GetDeviceFilesBasePath(std::string* base_path) {
return true;
}
bool Properties::GetFactoryKeyboxPath(std::string* keybox) {
if (!keybox) {
LOGW("Properties::GetFactoryKeyboxPath: Invalid parameter");
return false;
}
*keybox = "/factory/wv.keys";
return true;
}
} // namespace wvcdm

View File

@@ -34,15 +34,15 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(cdm_proto_gen_headers)
LOCAL_STATIC_LIBRARIES := \
libcdm \
libcdm_protos \
libgmock \
libgtest \
libgtest_main \
libwvwrapper \
libwvlevel3 \
libcdm_utils \
libprotobuf-cpp-2.3.0-lite
LOCAL_WHOLE_STATIC_LIBRARIES := libcdm_protos
LOCAL_SHARED_LIBRARIES := \
libcrypto \
libcutils \