diff --git a/proprietary/Android.mk b/proprietary/Android.mk deleted file mode 100644 index 8d24b2f9..00000000 --- a/proprietary/Android.mk +++ /dev/null @@ -1,7 +0,0 @@ -# widevine prebuilts only available for ARM -# To build this dir you must define BOARD_WIDEVINE_OEMCRYPTO_LEVEL in the board config. -ifdef BOARD_WIDEVINE_OEMCRYPTO_LEVEL - -include $(call all-subdir-makefiles) - -endif # BOARD_WIDEVINE_OEMCRYPTO_LEVEL diff --git a/proprietary/cryptoPlugin/Android.mk b/proprietary/cryptoPlugin/Android.mk deleted file mode 100644 index 79016d8a..00000000 --- a/proprietary/cryptoPlugin/Android.mk +++ /dev/null @@ -1,23 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -ifeq ($(BOARD_WIDEVINE_OEMCRYPTO_LEVEL),1) -LOCAL_CFLAGS := -DREQUIRE_SECURE_BUFFERS -endif - -LOCAL_SRC_FILES := \ - WVCryptoPlugin.cpp - -LOCAL_C_INCLUDES := \ - $(TOP)/vendor/widevine/proprietary/wvm/include \ - -LOCAL_CFLAGS += -Wno-unused-parameter - -LOCAL_MODULE:= libwvdecryptcommon -LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libcrypto_static - -# Not 64-bit compatible, WVCryptoPlugin::decrypt stores a pointer in a uint32 -LOCAL_MULTILIB := 32 - -include $(BUILD_STATIC_LIBRARY) diff --git a/proprietary/cryptoPlugin/WVCryptoPlugin.cpp b/proprietary/cryptoPlugin/WVCryptoPlugin.cpp deleted file mode 100644 index e7dd5abb..00000000 --- a/proprietary/cryptoPlugin/WVCryptoPlugin.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -//#define LOG_NDEBUG 0 -#define LOG_TAG "wv_crypto_plugin" -#include -#include -#include -#include - -#include -#include -#include - -#include "WVCryptoPlugin.h" - -#ifdef REQUIRE_SECURE_BUFFERS -#include -#endif - -android::CryptoFactory *createCryptoFactory() { - return new android::WVCryptoFactory; -} - -namespace android { - -// static -const uint8_t WVCryptoFactory::kUUIDWidevine[16] = { - 0xED,0xEF,0x8B,0xA9,0x79,0xD6,0x4A,0xCE, - 0xA3,0xC8,0x27,0xDC,0xD5,0x1D,0x21,0xED -}; - -WVCryptoPlugin::WVCryptoPlugin(const void *data, size_t size) - : mInitCheck(NO_INIT) -{ - memset(mEncKey, 0, sizeof(mEncKey)); - - // not using data at this time, require - // size to be zero. - if (size > 0) { - mInitCheck = -EINVAL; - } else { - mInitCheck = OK; - -#ifdef REQUIRE_SECURE_BUFFERS - OEMCryptoResult res = OEMCrypto_Initialize(); - if (res != OEMCrypto_SUCCESS) { - ALOGE("OEMCrypto_Initialize failed: %d", res); - mInitCheck = -EINVAL; - } -#endif - } -} - -WVCryptoPlugin::~WVCryptoPlugin() { - -#ifdef REQUIRE_SECURE_BUFFERS - if (mInitCheck == OK) { - OEMCryptoResult res = OEMCrypto_Terminate(); - if (res != OEMCrypto_SUCCESS) { - ALOGW("OEMCrypto_Terminate failed: %d", res); - } - } -#endif -} - -status_t WVCryptoPlugin::initCheck() const { - return mInitCheck; -} - -bool WVCryptoPlugin::requiresSecureDecoderComponent(const char *mime) const { -#ifdef REQUIRE_SECURE_BUFFERS - return !strncasecmp(mime, "video/", 6); -#else - return false; -#endif -} - -// Returns negative values for error code and -// positive values for the size of decrypted data, which can be larger -// than the input length. -ssize_t WVCryptoPlugin::decrypt( - bool secure, - const uint8_t key[16], - const uint8_t iv[16], - Mode mode, - const Pattern &pattern, - const void *srcPtr, - const SubSample *subSamples, size_t numSubSamples, - void *dstPtr, - AString *errorDetailMsg) { - Mutex::Autolock autoLock(mLock); - - - CHECK(mode == kMode_Unencrypted || mode == kMode_AES_WV); - - size_t srcOffset = 0; - size_t dstOffset = 0; - for (size_t i = 0; i < numSubSamples; ++i) { - const SubSample &ss = subSamples[i]; - - size_t srcSize; - - if (mode == kMode_Unencrypted) { - srcSize = ss.mNumBytesOfClearData; - CHECK_EQ(ss.mNumBytesOfEncryptedData, 0u); - } else { - CHECK_EQ(ss.mNumBytesOfClearData, 0u); - srcSize = ss.mNumBytesOfEncryptedData; - } - - //ALOGD("size[%d]=%d", i, srcSize); - if (srcSize == 0) { - continue; // segment size is zero, do not call decrypt - } - -#ifdef REQUIRE_SECURE_BUFFERS - // decrypt using OEMCrypto API, used for L1 devices - OEMCrypto_UINT32 dstSize = srcSize; - - OEMCryptoResult res; - - OEMCrypto_UINT8 _iv[16]; - const OEMCrypto_UINT8 *iv = NULL; - - if (mode != kMode_Unencrypted) { - memset(_iv, 0, sizeof(_iv)); - iv = _iv; - } - - if (secure) { - //ALOGD("calling DecryptVideo, size=%d", srcSize); - res = OEMCrypto_DecryptVideo( - iv, - (const OEMCrypto_UINT8 *)srcPtr + srcOffset, - srcSize, - (OEMCrypto_UINT32)dstPtr, - dstOffset, - &dstSize); - } else { - //ALOGD("calling DecryptAudio: size=%d", srcSize); - res = OEMCrypto_DecryptAudio( - iv, - (const OEMCrypto_UINT8 *)srcPtr + srcOffset, - srcSize, - (OEMCrypto_UINT8 *)dstPtr + dstOffset, - &dstSize); - } - - if (res != OEMCrypto_SUCCESS) { - ALOGE("decrypt result: %d", res); - return -EINVAL; - } - - dstOffset += dstSize; -#else - if (mode == kMode_Unencrypted) { - memcpy((char *)dstPtr + dstOffset, (char *)srcPtr + srcOffset, srcSize); - } else { - status_t status = decryptSW(key, (uint8_t *)dstPtr + dstOffset, - (const uint8_t *)srcPtr + srcOffset, srcSize); - if (status != OK) { - ALOGE("decryptSW returned %d", status); - return status; - } - } - - dstOffset += srcSize; -#endif - srcOffset += srcSize; - } // for each subsample - - return static_cast(dstOffset); -} - -// SW AES CTS decrypt, used only for L3 devices -status_t WVCryptoPlugin::decryptSW(const uint8_t *key, uint8_t *out, - const uint8_t *in, size_t length) -{ -#ifndef REQUIRE_SECURE_BUFFERS - unsigned char iv[kAES128BlockSize] = {0}; - - if (memcmp(key, mEncKey, sizeof(mEncKey)) != 0) { - // key has changed, recompute mAesKey from key - uint8_t hash[MD5_DIGEST_LENGTH]; - char value[PROPERTY_VALUE_MAX] = {0}; - char seed[] = "34985woeirsdlkfjxc"; - - property_get("ro.serialno", value, NULL); - - MD5_CTX ctx; - MD5_Init(&ctx); - MD5_Update(&ctx, (uint8_t *)seed, sizeof(seed)); - MD5_Update(&ctx, (uint8_t *)value, strlen(value)); - MD5_Final(hash, &ctx); - - AES_KEY aesKey; - if (AES_set_decrypt_key(hash, sizeof(hash) * 8, &aesKey) == 0) { - uint8_t clearKey[kAES128BlockSize]; - AES_ecb_encrypt(key, clearKey, &aesKey, 0); - - if (AES_set_decrypt_key(clearKey, sizeof(hash) * 8, &mAesKey) == 0) { - memcpy(mEncKey, key, sizeof(mEncKey)); - } else { - return -EINVAL; - } - } else { - return -EINVAL; - } - } - - size_t k, r = length % kAES128BlockSize; - - if (r) { - k = length - r - kAES128BlockSize; - } else { - k = length; - } - - AES_cbc_encrypt(in, out, k, &mAesKey, iv, 0); - - if (r) { - // cipher text stealing - Schneier Figure 9.5 p 196 - unsigned char peniv[kAES128BlockSize] = {0}; - memcpy(peniv, in + k + kAES128BlockSize, r); - - AES_cbc_encrypt(in + k, out + k, kAES128BlockSize, &mAesKey, peniv, 0); - - // exchange the final plaintext and ciphertext - for (size_t i = 0; i < r; i++) { - *(out + k + kAES128BlockSize + i) = *(out + k + i); - *(out + k + i) = *(in + k + kAES128BlockSize + i); - } - AES_cbc_encrypt(out + k, out + k, kAES128BlockSize, &mAesKey, iv, 0); - } -#endif - return OK; -} - -} // namespace android - diff --git a/proprietary/cryptoPlugin/WVCryptoPlugin.h b/proprietary/cryptoPlugin/WVCryptoPlugin.h deleted file mode 100644 index 21ee1a68..00000000 --- a/proprietary/cryptoPlugin/WVCryptoPlugin.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef WV_CRYPTO_PLUGIN_H_ - -#define WV_CRYPTO_PLUGIN_H_ - -#include -#include -#include - -namespace android { - -struct WVCryptoPlugin : public CryptoPlugin { - WVCryptoPlugin(const void *data, size_t size); - virtual ~WVCryptoPlugin(); - - const static size_t kAES128BlockSize = 16; - - status_t initCheck() const; - - virtual bool requiresSecureDecoderComponent(const char *mime) const; - - virtual ssize_t decrypt( - bool secure, - const uint8_t key[kAES128BlockSize], - const uint8_t iv[kAES128BlockSize], - Mode mode, - const Pattern &pattern, - const void *srcPtr, - const SubSample *subSamples, size_t numSubSamples, - void *dstPtr, - AString *errorDetailMsg); - -private: - status_t decryptSW(const uint8_t *key, uint8_t *out, const uint8_t *in, size_t length); - - Mutex mLock; - - status_t mInitCheck; - AES_KEY mAesKey; - uint8_t mEncKey[kAES128BlockSize]; - - WVCryptoPlugin(const WVCryptoPlugin &); - WVCryptoPlugin &operator=(const WVCryptoPlugin &); -}; - -struct WVCryptoFactory : public CryptoFactory { - static const uint8_t kUUIDWidevine[16]; - - virtual bool isCryptoSchemeSupported( - const uint8_t uuid[16]) const { - return !memcmp(uuid, kUUIDWidevine, 16); - } - - virtual status_t createPlugin( - const uint8_t uuid[16], const void *data, size_t size, - CryptoPlugin **out) { - *out = NULL; - - if (memcmp(uuid, kUUIDWidevine, 16)) { - return -ENOENT; - } - - WVCryptoPlugin *plugin = new WVCryptoPlugin(data, size); - - status_t err; - if ((err = plugin->initCheck()) != OK) { - delete plugin; - plugin = NULL; - - return err; - } - - *out = plugin; - - return OK; - } -}; - -} // namespace android - -#endif // WV_CRYPTO_PLUGIN_H_ - diff --git a/proprietary/cryptoPlugin/decrypt-core.mk b/proprietary/cryptoPlugin/decrypt-core.mk deleted file mode 100644 index 65900c64..00000000 --- a/proprietary/cryptoPlugin/decrypt-core.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# To be included by platform-specific vendor Android.mk to build -# Widevine wvm static library. Sets up includes and defines the core libraries -# required. -# -include $(TOP)/vendor/widevine/proprietary/wvm/common.mk - -ifndef BOARD_WIDEVINE_OEMCRYPTO_LEVEL -$(error BOARD_WIDEVINE_OEMCRYPTO_LEVEL not defined!) -endif - -LOCAL_WHOLE_STATIC_LIBRARIES := \ - libwvdecryptcommon - -LOCAL_STATIC_LIBRARIES := \ - liboemcrypto diff --git a/proprietary/docs/Widevine_Security_Integration_Guide_For_Android_Based_Devices_2.4.pdf b/proprietary/docs/Widevine_Security_Integration_Guide_For_Android_Based_Devices_2.4.pdf deleted file mode 100644 index 52b04fb2..00000000 Binary files a/proprietary/docs/Widevine_Security_Integration_Guide_For_Android_Based_Devices_2.4.pdf and /dev/null differ diff --git a/proprietary/drmwvmplugin/Android.mk b/proprietary/drmwvmplugin/Android.mk deleted file mode 100644 index 8184436c..00000000 --- a/proprietary/drmwvmplugin/Android.mk +++ /dev/null @@ -1,51 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -######################## -# Feature file for clients to look up widevine drm plug-in - -include $(CLEAR_VARS) -LOCAL_MODULE := com.google.widevine.software.drm.xml -LOCAL_SRC_FILES := $(LOCAL_MODULE) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := widevine -LOCAL_MODULE_CLASS := ETC - -# This will install the file in /system/etc/permissions -# -LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions - -include $(BUILD_PREBUILT) - -######################## -# Dummy library used to indicate availability of widevine drm - -include $(CLEAR_VARS) -LOCAL_MODULE := com.google.widevine.software.drm -LOCAL_SRC_FILES := src/StubLib.java -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := widevine -LOCAL_MODULE_CLASS := JAVA_LIBRARIES - -include $(BUILD_JAVA_LIBRARY) - -######################## - -include $(CLEAR_VARS) -include $(TOP)/vendor/widevine/proprietary/drmwvmplugin/common.mk - -LOCAL_SRC_FILES:= \ - src/WVMDrmPlugin.cpp \ - src/WVMLogging.cpp - -LOCAL_CFLAGS += -Wno-unused-parameter -Werror - -LOCAL_MODULE := libdrmwvmcommon -LOCAL_MODULE_TAGS := optional - -LOCAL_MODULE_TARGET_ARCH := $(WIDEVINE_SUPPORTED_ARCH) - -include $(BUILD_STATIC_LIBRARY) - -# invoke Android.mk files in subdirs -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/proprietary/drmwvmplugin/com.google.widevine.software.drm.xml b/proprietary/drmwvmplugin/com.google.widevine.software.drm.xml deleted file mode 100644 index f75abf96..00000000 --- a/proprietary/drmwvmplugin/com.google.widevine.software.drm.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/proprietary/drmwvmplugin/common.mk b/proprietary/drmwvmplugin/common.mk deleted file mode 100644 index b2edb6d9..00000000 --- a/proprietary/drmwvmplugin/common.mk +++ /dev/null @@ -1,8 +0,0 @@ -LOCAL_C_INCLUDES:= \ - $(TOP)/vendor/widevine/proprietary/streamcontrol/include \ - $(TOP)/vendor/widevine/proprietary/drmwvmplugin/include \ - $(TOP)/frameworks/av/drm/libdrmframework/include \ - $(TOP)/frameworks/av/drm/libdrmframework/plugins/common/include \ - $(TOP)/frameworks/av/include - -LOCAL_C_INCLUDES_x86 += $(TOP)/system/core/include/arch/linux-x86 diff --git a/proprietary/drmwvmplugin/include/WVDRMPluginAPI.h b/proprietary/drmwvmplugin/include/WVDRMPluginAPI.h deleted file mode 100644 index 19d7df56..00000000 --- a/proprietary/drmwvmplugin/include/WVDRMPluginAPI.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2011 Widevine Technologies, Inc., All Rights Reserved - * - * Declarations for Widevine DRM Plugin API - */ - -#ifndef __WVMDRMPLUGIN_API_H__ -#define __WVMDRMPLUGIN_API_H__ - -#include -#include "WVStreamControlAPI.h" - -class WVDRMPluginAPI { - public: - virtual ~WVDRMPluginAPI() {} - - enum { - RIGHTS_VALID, - RIGHTS_INVALID, - RIGHTS_EXPIRED, - RIGHTS_NOT_ACQUIRED - }; - - enum { - PLAYBACK_START, - PLAYBACK_STOP, - PLAYBACK_PAUSE, - PLAYBACK_INVALID - }; - - // provisionedFlags - enum { - DEVICE_IS_PROVISIONED, - DEVICE_IS_NOT_PROVISIONED, - DEVICE_IS_PROVISIONED_SD_ONLY - }; - - static const int PlaybackMode_Default = 0; - static const int PlaybackMode_Streaming = 1; - static const int PlaybackMode_Offline = 2; - static const int PlaybackMode_Any = PlaybackMode_Streaming | - PlaybackMode_Offline; - - static WVDRMPluginAPI *create(); - static void destroy(WVDRMPluginAPI *plugin); - - virtual bool OpenSession(const char *uri) = 0; - virtual void CloseSession() = 0; - virtual bool IsSupportedMediaType(const char *uri) = 0; - - virtual bool RegisterDrmInfo(std::string &portal, std::string &dsPath) = 0; - virtual bool RegisterDrmInfo(std::string &portal, std::string &dsPath, uint32_t *status) = 0; - virtual bool UnregisterDrmInfo(std::string &portal, std::string &dsPath) = 0; - virtual bool AcquireDrmInfo(std::string &assetPath, int assetOpenFd, WVCredentials &credentials, - std::string &dsPath, const std::string &systemIdStr, - const std::string &assetIdStr, - const std::string &keyIdStr, - uint32_t *systemId, uint32_t *assetId, - uint32_t *keyId) = 0; - - virtual bool ProcessDrmInfo(std::string &assetPath, int playbackMode) = 0; - virtual int CheckRightsStatus(std::string &path) = 0; - - virtual bool GetConstraints(std::string &path, uint32_t *timeSincePlayback, - uint32_t *timeRemaining, - uint32_t *licenseDuration, std::string &lastError, - bool &allowOffline, bool &allowStreaming, - bool &denyHD) = 0; - - virtual bool SetPlaybackStatus(int playbackStatus, off64_t position) = 0; - virtual bool RemoveRights(std::string &path) = 0; - virtual bool RemoveAllRights() = 0; - virtual bool Prepare(char *data, int len) = 0; - virtual int Operate(char *in, int inLength, char *out, int outLength, char *iv) = 0; - virtual std::string GetVersion() const = 0; - - enum EventType { - EventType_AcquireDrmInfoFailed, - EventType_ProcessDrmInfoFailed, - EventType_RightsInstalled, - EventType_RightsRemoved, - - EventType_HeartbeatServer, - EventType_HeartbeatPeriod, - EventType_AssetId, - EventType_DeviceId, - EventType_StreamId, - EventType_UserData - }; - - enum EventDestination { - EventDestination_JavaAPI, - EventDestination_MediaPlayer - }; - - // Returns true if event sent, false if no handler - typedef bool (*EventHandler)(EventType type, EventDestination destination, - const std::string &path); - virtual void SetEventHandler(EventHandler handler) = 0; - -protected: - // use create factory method, don't construct directly - WVDRMPluginAPI() {} -}; - -#endif diff --git a/proprietary/drmwvmplugin/include/WVMDrmPlugin.h b/proprietary/drmwvmplugin/include/WVMDrmPlugin.h deleted file mode 100644 index 33ea0ac0..00000000 --- a/proprietary/drmwvmplugin/include/WVMDrmPlugin.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) 2011 Google, Inc. All Rights Reserved - */ - -#ifndef __WVMDRMPLUGIN_H__ -#define __WVMDRMPLUGIN_H__ - - -#include - -#include "WVDRMPluginAPI.h" - - -namespace android { - - class WVMDrmPlugin : public DrmEngineBase - { - -public: - WVMDrmPlugin(); - virtual ~WVMDrmPlugin(); - -protected: - DrmConstraints* onGetConstraints(int uniqueId, const String8* path, int action); - - DrmMetadata* onGetMetadata(int uniqueId, const String8* path); - - status_t onInitialize(int uniqueId); - - status_t onSetOnInfoListener(int uniqueId, const IDrmEngine::OnInfoListener* infoListener); - - status_t onTerminate(int uniqueId); - - bool onCanHandle(int uniqueId, const String8& path); - - DrmInfoStatus* onProcessDrmInfo(int uniqueId, const DrmInfo* drmInfo); - - status_t onSaveRights(int uniqueId, const DrmRights& drmRights, - const String8& rightsPath, const String8& contentPath); - - DrmInfo* onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest); - - String8 onGetOriginalMimeType(int uniqueId, const String8& path, int fd); - - int onGetDrmObjectType(int uniqueId, const String8& path, const String8& mimeType); - - int onCheckRightsStatus(int uniqueId, const String8& path, int action); - - status_t onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve); - - status_t onSetPlaybackStatus( - int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position); - - bool onValidateAction( - int uniqueId, const String8& path, int action, const ActionDescription& description); - - status_t onRemoveRights(int uniqueId, const String8& path); - - status_t onRemoveAllRights(int uniqueId); - - status_t onOpenConvertSession(int uniqueId, int convertId); - - DrmConvertedStatus* onConvertData(int uniqueId, int convertId, const DrmBuffer* inputData); - - DrmConvertedStatus* onCloseConvertSession(int uniqueId, int convertId); - - DrmSupportInfo* onGetSupportInfo(int uniqueId); - - status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle, - int fd, off64_t offset, off64_t length) { - return DRM_ERROR_CANNOT_HANDLE; - } - - status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle, - int fd, off64_t offset, off64_t length, - const char* mime); - - status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle, - const char* uri) { - return DRM_ERROR_CANNOT_HANDLE; - } - - status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle, - const char* uri, - const char* mime); - - status_t onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle); - - status_t onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, - int decryptUnitId, const DrmBuffer* headerInfo); - - status_t onDecrypt(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, - const DrmBuffer* encBuffer, DrmBuffer** decBuffer, - DrmBuffer *ivBuffer); - - - status_t onFinalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId); - - ssize_t onPread(int uniqueId, DecryptHandle* decryptHandle, - void* buffer, ssize_t numBytes, off64_t offset); - - class Listener { - public: - Listener() : mListener(NULL), mUniqueId(-1) {} - - Listener(IDrmEngine::OnInfoListener *listener, int uniqueId) - : mListener(listener), mUniqueId(uniqueId) {}; - - IDrmEngine::OnInfoListener *GetListener() const {return mListener;} - int GetUniqueId() const {return mUniqueId;} - - private: - IDrmEngine::OnInfoListener *mListener; - int mUniqueId; - }; - - enum MessageType { - MessageType_HeartbeatServer = 4000, - MessageType_HeartbeatPeriod = 4001, - MessageType_AssetId = 4002, - MessageType_DeviceId = 4003, - MessageType_StreamId = 4004, - MessageType_UserData = 4005 - }; - -private: - bool isSupportedMimeType(const char* mime); - static bool SendEvent(WVDRMPluginAPI::EventType code, WVDRMPluginAPI::EventDestination dest, - const std::string &path); - - static Vector *sNativeListeners; - static Vector *sJavaAPIListeners; - static const char *sFileExtensions[]; - - WVDRMPluginAPI *mDrmPluginImpl; -}; - -}; - -#endif /* __WVMDRMPLUGIN__ */ diff --git a/proprietary/drmwvmplugin/include/WVMLogging.h b/proprietary/drmwvmplugin/include/WVMLogging.h deleted file mode 100644 index 0ce332cb..00000000 --- a/proprietary/drmwvmplugin/include/WVMLogging.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (C) 2011 Google, Inc. All Rights Reserved - */ - -#ifndef __WVMLOGGING_H__ -#define __WVMLOGGING_H__ - -void android_printbuf(const char *buf); - -#endif diff --git a/proprietary/drmwvmplugin/lib/Android.mk b/proprietary/drmwvmplugin/lib/Android.mk deleted file mode 100644 index 5053e7d6..00000000 --- a/proprietary/drmwvmplugin/lib/Android.mk +++ /dev/null @@ -1 +0,0 @@ -include $(call all-subdir-makefiles) diff --git a/proprietary/drmwvmplugin/lib/arm/Android.mk b/proprietary/drmwvmplugin/lib/arm/Android.mk deleted file mode 100644 index 3e972c61..00000000 --- a/proprietary/drmwvmplugin/lib/arm/Android.mk +++ /dev/null @@ -1,38 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -ifneq ($(BOARD_USES_GENERIC_WIDEVINE),false) - -######################################################################### -# libwvdrm_L?.so - -include $(CLEAR_VARS) - -LOCAL_MODULE := libwvdrm_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -LOCAL_MODULE_SUFFIX := .so -LOCAL_SRC_FILES := $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) -LOCAL_PROPRIETARY_MODULE := true -LOCAL_STRIP_MODULE := true - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := widevine -LOCAL_MODULE_TARGET_ARCH := arm -LOCAL_MULTILIB := 32 -include $(BUILD_PREBUILT) - -######################################################################### -# libwvocs_L?.a - -include $(CLEAR_VARS) - -LOCAL_MODULE := libwvocs_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE_SUFFIX := .a -LOCAL_SRC_FILES := $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_TARGET_ARCH := arm -include $(BUILD_PREBUILT) - -endif - diff --git a/proprietary/drmwvmplugin/lib/arm/libwvdrm_L1.so b/proprietary/drmwvmplugin/lib/arm/libwvdrm_L1.so deleted file mode 100755 index 21cd338c..00000000 Binary files a/proprietary/drmwvmplugin/lib/arm/libwvdrm_L1.so and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/arm/libwvdrm_L3.so b/proprietary/drmwvmplugin/lib/arm/libwvdrm_L3.so deleted file mode 100755 index 149b82a3..00000000 Binary files a/proprietary/drmwvmplugin/lib/arm/libwvdrm_L3.so and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/arm/libwvocs_L1.a b/proprietary/drmwvmplugin/lib/arm/libwvocs_L1.a deleted file mode 100644 index 5256e7d2..00000000 Binary files a/proprietary/drmwvmplugin/lib/arm/libwvocs_L1.a and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/arm/libwvocs_L3.a b/proprietary/drmwvmplugin/lib/arm/libwvocs_L3.a deleted file mode 100644 index 6cc86ad1..00000000 Binary files a/proprietary/drmwvmplugin/lib/arm/libwvocs_L3.a and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/mips/Android.mk b/proprietary/drmwvmplugin/lib/mips/Android.mk deleted file mode 100644 index 1f588399..00000000 --- a/proprietary/drmwvmplugin/lib/mips/Android.mk +++ /dev/null @@ -1,38 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -ifneq ($(BOARD_USES_GENERIC_WIDEVINE),false) - -######################################################################### -# libwvdrm_L?.so - -include $(CLEAR_VARS) - -LOCAL_MODULE := libwvdrm_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -LOCAL_MODULE_SUFFIX := .so -LOCAL_SRC_FILES := $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) -LOCAL_PROPRIETARY_MODULE := true -LOCAL_STRIP_MODULE := true - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := widevine -LOCAL_MODULE_TARGET_ARCH := mips -LOCAL_MULTILIB := 32 -include $(BUILD_PREBUILT) - -######################################################################### -# libwvocs_L?.a - -include $(CLEAR_VARS) - -LOCAL_MODULE := libwvocs_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE_SUFFIX := .a -LOCAL_SRC_FILES := $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_TARGET_ARCH := mips -include $(BUILD_PREBUILT) - -endif - diff --git a/proprietary/drmwvmplugin/lib/mips/libwvdrm_L1.so b/proprietary/drmwvmplugin/lib/mips/libwvdrm_L1.so deleted file mode 100755 index 55ef0fec..00000000 Binary files a/proprietary/drmwvmplugin/lib/mips/libwvdrm_L1.so and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/mips/libwvdrm_L3.so b/proprietary/drmwvmplugin/lib/mips/libwvdrm_L3.so deleted file mode 100755 index c811fd64..00000000 Binary files a/proprietary/drmwvmplugin/lib/mips/libwvdrm_L3.so and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/mips/libwvocs_L1.a b/proprietary/drmwvmplugin/lib/mips/libwvocs_L1.a deleted file mode 100644 index 2350cdd8..00000000 Binary files a/proprietary/drmwvmplugin/lib/mips/libwvocs_L1.a and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/mips/libwvocs_L3.a b/proprietary/drmwvmplugin/lib/mips/libwvocs_L3.a deleted file mode 100644 index 44a0a717..00000000 Binary files a/proprietary/drmwvmplugin/lib/mips/libwvocs_L3.a and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/x86/Android.mk b/proprietary/drmwvmplugin/lib/x86/Android.mk deleted file mode 100644 index 1146b79d..00000000 --- a/proprietary/drmwvmplugin/lib/x86/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -######################################################################### -# libwvdrm_L?.so - -include $(CLEAR_VARS) - -LOCAL_MODULE := libwvdrm_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -LOCAL_MODULE_SUFFIX := .so -LOCAL_SRC_FILES := $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) -LOCAL_PROPRIETARY_MODULE := true -LOCAL_STRIP_MODULE := true - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_TARGET_ARCH := x86 -include $(BUILD_PREBUILT) - -######################################################################### -# libwvocs_L?.a - -include $(CLEAR_VARS) - -LOCAL_MODULE := libwvocs_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE_SUFFIX := .a -LOCAL_SRC_FILES := $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_TARGET_ARCH := x86 -include $(BUILD_PREBUILT) diff --git a/proprietary/drmwvmplugin/lib/x86/libwvdrm_L1.so b/proprietary/drmwvmplugin/lib/x86/libwvdrm_L1.so deleted file mode 100755 index e26b76ec..00000000 Binary files a/proprietary/drmwvmplugin/lib/x86/libwvdrm_L1.so and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/x86/libwvdrm_L3.so b/proprietary/drmwvmplugin/lib/x86/libwvdrm_L3.so deleted file mode 100755 index 8de12f88..00000000 Binary files a/proprietary/drmwvmplugin/lib/x86/libwvdrm_L3.so and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/x86/libwvocs_L1.a b/proprietary/drmwvmplugin/lib/x86/libwvocs_L1.a deleted file mode 100644 index abc8e1a4..00000000 Binary files a/proprietary/drmwvmplugin/lib/x86/libwvocs_L1.a and /dev/null differ diff --git a/proprietary/drmwvmplugin/lib/x86/libwvocs_L3.a b/proprietary/drmwvmplugin/lib/x86/libwvocs_L3.a deleted file mode 100644 index 43315acb..00000000 Binary files a/proprietary/drmwvmplugin/lib/x86/libwvocs_L3.a and /dev/null differ diff --git a/proprietary/drmwvmplugin/plugin-core.mk b/proprietary/drmwvmplugin/plugin-core.mk deleted file mode 100644 index d7e0a058..00000000 --- a/proprietary/drmwvmplugin/plugin-core.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# To be included by platform-specific vendor Android.mk to build -# Widevine DRM plugin. Sets up includes and defines the core libraries -# required to build the plugin. -# -include $(TOP)/vendor/widevine/proprietary/drmwvmplugin/common.mk - -ifndef BOARD_WIDEVINE_OEMCRYPTO_LEVEL -$(error BOARD_WIDEVINE_OEMCRYPTO_LEVEL not defined!) -endif - -LOCAL_WHOLE_STATIC_LIBRARIES := \ - libdrmframeworkcommon \ - libdrmwvmcommon \ - libwvocs_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) - -LOCAL_SHARED_LIBRARIES := \ - libbinder \ - libutils \ - libcutils \ - liblog \ - libz \ - libwvdrm_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) \ - libWVStreamControlAPI_L$(BOARD_WIDEVINE_OEMCRYPTO_LEVEL) \ - libdl diff --git a/proprietary/drmwvmplugin/src/StubLib.java b/proprietary/drmwvmplugin/src/StubLib.java deleted file mode 100644 index f434a16b..00000000 --- a/proprietary/drmwvmplugin/src/StubLib.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.google.widevine.software.drm; - -class StubLib { -} diff --git a/proprietary/drmwvmplugin/src/WVMDrmPlugin.cpp b/proprietary/drmwvmplugin/src/WVMDrmPlugin.cpp deleted file mode 100644 index 17afe6f8..00000000 --- a/proprietary/drmwvmplugin/src/WVMDrmPlugin.cpp +++ /dev/null @@ -1,913 +0,0 @@ -/* - * Copyright (C) 2011 Google, Inc. All Rights Reserved - */ - -//#define LOG_NDEBUG 0 -#define LOG_TAG "WVMDrmPlugIn" -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "WVMDrmPlugin.h" -#include "WVMLogging.h" -#include "AndroidHooks.h" - -using namespace std; -using namespace android; - - -// This extern "C" is mandatory to be managed by TPlugInManager -extern "C" IDrmEngine* create() { - _ah006(android_printbuf); - libocs_setup(); - return new WVMDrmPlugin(); -} - -// This extern "C" is mandatory to be managed by TPlugInManager -extern "C" void destroy(IDrmEngine* pPlugIn) { - delete pPlugIn; -} - -// Needed for event callout from implementation object -Vector *WVMDrmPlugin::sNativeListeners = NULL; -Vector *WVMDrmPlugin::sJavaAPIListeners = NULL; - -// File extensions that Widevine can handle. -// Note: the empty extension is needed because some proxy servers will strip the extension. -const char *WVMDrmPlugin::sFileExtensions[] = {".wvm", ".m3u8", ".vob", ".smil", "", NULL}; - - -WVMDrmPlugin::WVMDrmPlugin() - : DrmEngineBase(), - mDrmPluginImpl(WVDRMPluginAPI::create()) -{ - sNativeListeners = new Vector(); - sJavaAPIListeners = new Vector(); - mDrmPluginImpl->SetEventHandler(&SendEvent); -} - -WVMDrmPlugin::~WVMDrmPlugin() { - delete sNativeListeners; - delete sJavaAPIListeners; - WVDRMPluginAPI::destroy(mDrmPluginImpl); -} - - -/** - * Initialize plug-in - * - * @param[in] uniqueId Unique identifier for a session - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onInitialize(int uniqueId) { - //ALOGD("WVMDrmPlugin::onInitialize : %d", uniqueId); - return DRM_NO_ERROR; -} - -/** - * Terminate the plug-in - * and release resource bound to plug-in - * - * @param[in] uniqueId Unique identifier for a session - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onTerminate(int uniqueId) { - //ALOGD("WVMDrmPlugin::onTerminate : %d", uniqueId); - - for (size_t i = 0; i < sNativeListeners->size(); i++) { - if ((*sNativeListeners)[i].GetUniqueId() == uniqueId) { - sNativeListeners->removeAt(i); - break; - } - } - - for (size_t i = 0; i < sJavaAPIListeners->size(); i++) { - if ((*sJavaAPIListeners)[i].GetUniqueId() == uniqueId) { - sJavaAPIListeners->removeAt(i); - break; - } - } - - return DRM_NO_ERROR; -} - -/** - * Register a callback to be invoked when the caller required to - * receive necessary information - * - * @param[in] uniqueId Unique identifier for a session. uniqueId is a random - * number generated in the DRM service. If the DrmManagerClient - * is created in native code, uniqueId will be a number ranged - * from 0x1000 to 0x1fff. If it comes from Java code, the uniqueId - * will be a number ranged from 0x00 to 0xfff. So bit 0x1000 in - * uniqueId could be used in DRM plugins to differentiate native - * OnInfoListener and Java OnInfoListener. - * @param[in] infoListener Listener - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onSetOnInfoListener( - int uniqueId, const IDrmEngine::OnInfoListener* infoListener) { - //ALOGD("WVMDrmPlugin::onSetOnInfoListener : add %d", uniqueId); - - Listener newListener = Listener(const_cast(infoListener), uniqueId); - bool found = false; - - const int nativeUniqueIdFlag = 0x1000; - if (uniqueId & nativeUniqueIdFlag) { - // Replace old listener for this id if it exists - for (size_t i = 0; i < sNativeListeners->size(); i++) { - if ((*sNativeListeners)[i].GetUniqueId() == uniqueId) { - sNativeListeners->replaceAt(newListener, i); - found = true; - break; - } - } - if (!found) - sNativeListeners->push(newListener); - } else { - // Replace old listener for this id if it exists - for (size_t i = 0; i < sJavaAPIListeners->size(); i++) { - if ((*sJavaAPIListeners)[i].GetUniqueId() == uniqueId) { - sJavaAPIListeners->replaceAt(newListener, i); - found = true; - break; - } - } - if (!found) - sJavaAPIListeners->push(newListener); - } - - return DRM_NO_ERROR; -} - -bool WVMDrmPlugin::SendEvent(WVDRMPluginAPI::EventType type, - WVDRMPluginAPI::EventDestination destination, - const std::string &msg) -{ - int code = -1; - bool result = false; - - switch(type) { - case WVDRMPluginAPI::EventType_AcquireDrmInfoFailed: - code = DrmInfoEvent::TYPE_ACQUIRE_DRM_INFO_FAILED; - break; - case WVDRMPluginAPI::EventType_ProcessDrmInfoFailed: - code = DrmInfoEvent::TYPE_PROCESS_DRM_INFO_FAILED; - break; - case WVDRMPluginAPI::EventType_RightsInstalled: - code = DrmInfoEvent::TYPE_RIGHTS_INSTALLED; - break; - case WVDRMPluginAPI::EventType_RightsRemoved: - code = DrmInfoEvent::TYPE_RIGHTS_REMOVED; - break; - case WVDRMPluginAPI::EventType_HeartbeatServer: - code = MessageType_HeartbeatServer; - break; - case WVDRMPluginAPI::EventType_HeartbeatPeriod: - code = MessageType_HeartbeatPeriod; - break; - case WVDRMPluginAPI::EventType_AssetId: - code = MessageType_AssetId; - break; - case WVDRMPluginAPI::EventType_DeviceId: - code = MessageType_DeviceId; - break; - case WVDRMPluginAPI::EventType_StreamId: - code = MessageType_StreamId; - break; - case WVDRMPluginAPI::EventType_UserData: - code = MessageType_UserData; - break; - default: - break; - } - - String8 message = String8(msg.c_str()); - - if (destination == WVDRMPluginAPI::EventDestination_JavaAPI) { - for (size_t i = 0; i < sJavaAPIListeners->size(); i++) { - DrmInfoEvent event((*sJavaAPIListeners)[i].GetUniqueId(), code, message); - //ALOGD("WVMDrmPlugin::SendEvent [Java]: uniqueId=%d type=%d, code=%d, msg=%s", - // (*sJavaAPIListeners)[i].GetUniqueId(), type, code, msg.c_str()); - (*sJavaAPIListeners)[i].GetListener()->onInfo(event); - } - result = true; - } else if (destination == WVDRMPluginAPI::EventDestination_MediaPlayer) { - for (size_t i = 0; i < sNativeListeners->size(); i++) { - DrmInfoEvent event((*sNativeListeners)[i].GetUniqueId(), code, message); - //ALOGD("WVMDrmPlugin::SendEvent [Native]: uniqueId=%d type=%d, code=%d, msg=%s", - // (*sNativeListeners)[i].GetUniqueId(), type, code, msg.c_str()); - (*sNativeListeners)[i].GetListener()->onInfo(event); - } - result = true; - } - - return result; -} - -/** - * Retrieves necessary information for registration, unregistration or rights - * acquisition information. - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] drmInfoRequest Request information to retrieve drmInfo - * @return DrmInfo - * instance as a result of processing given input - */ -DrmInfo* WVMDrmPlugin::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest) { - //ALOGD("WVMDrmPlugin::onAcquireDrmInfo : %d", uniqueId); - DrmInfo* drmInfo = NULL; - - std::string assetPath; - - if (NULL != drmInfoRequest) { - switch(drmInfoRequest->getInfoType()) { - case DrmInfoRequest::TYPE_RIGHTS_ACQUISITION_INFO: { - - assetPath = drmInfoRequest->get(String8("WVAssetURIKey")).string(); - - WVCredentials credentials; - - // creates a data store object per each portal - credentials.portal = drmInfoRequest->get(String8("WVPortalKey")).string(); - if ( (assetPath.size() == 0) || (credentials.portal.size() == 0) ) { - ALOGE("onAcquireDrmInfo: Empty asset path or portal string, must specify both"); - return NULL; - } - - // for local files, app may provide the FD of the open file. - int assetOpenFd = atol(drmInfoRequest->get(String8("FileDescriptorKey")).string()); - - std::string assetDbPath = drmInfoRequest->get(String8("WVAssetDBPathKey")).string(); - //ALOGV("onAcquireDrmInfo: portal=%s, dsPath=%s", credentials.portal.c_str(), assetDbPath.c_str()); - - credentials.drmServerURL = drmInfoRequest->get(String8("WVDRMServerKey")).string(); - credentials.userData = drmInfoRequest->get(String8("WVCAUserDataKey")).string(); - credentials.deviceID = drmInfoRequest->get(String8("WVDeviceIDKey")).string(); - credentials.streamID = drmInfoRequest->get(String8("WVStreamIDKey")).string(); - - string systemIdStr = drmInfoRequest->get(String8("WVSystemIDKey")).string(); - string assetIdStr = drmInfoRequest->get(String8("WVAssetIDKey")).string(); - string keyIdStr = drmInfoRequest->get(String8("WVKeyIDKey")).string(); - string licenseTypeStr = drmInfoRequest->get(String8("WVLicenseTypeKey")).string(); - - uint32_t systemId, assetId, keyId; - - if (!mDrmPluginImpl->AcquireDrmInfo(assetPath, assetOpenFd, credentials, assetDbPath, - systemIdStr, assetIdStr, keyIdStr, - &systemId, &assetId, &keyId)) - return NULL; - - - String8 dataString("dummy_acquistion_string"); - int length = dataString.length(); - char* data = NULL; - data = new char[length]; - memcpy(data, dataString.string(), length); - drmInfo = new DrmInfo(drmInfoRequest->getInfoType(), - DrmBuffer(data, length), drmInfoRequest->getMimeType()); - - // Sets additional drmInfo attributes - // Do not propagate FileDescriptorKey into the newDrmInfo object - drmInfo->put(String8("WVAssetURIKey"), String8(assetPath.c_str())); - drmInfo->put(String8("WVDRMServerKey"), String8(credentials.drmServerURL.c_str())); - drmInfo->put(String8("WVAssetDbPathKey"), String8(assetDbPath.c_str())); - drmInfo->put(String8("WVPortalKey"), String8(credentials.portal.c_str())); - drmInfo->put(String8("WVCAUserDataKey"), String8(credentials.userData.c_str())); - drmInfo->put(String8("WVDeviceIDKey"), String8(credentials.deviceID.c_str())); - drmInfo->put(String8("WVStreamIDKey"), String8(credentials.streamID.c_str())); - drmInfo->put(String8("WVLicenseTypeKey"), String8(licenseTypeStr.c_str())); - - char buffer[16]; - sprintf(buffer, "%lu", (unsigned long)systemId); - drmInfo->put(String8("WVSystemIDKey"), String8(buffer)); - sprintf(buffer, "%lu", (unsigned long)assetId); - drmInfo->put(String8("WVAssetIDKey"), String8(buffer)); - sprintf(buffer, "%lu", (unsigned long)keyId); - drmInfo->put(String8("WVKeyIDKey"), String8(buffer)); - break; - } - case DrmInfoRequest::TYPE_REGISTRATION_INFO: - case DrmInfoRequest::TYPE_UNREGISTRATION_INFO: { - - // creates a data store object per each portal - std::string assetDbPath = drmInfoRequest->get(String8("WVAssetDBPathKey")).string(); - std::string portal = drmInfoRequest->get(String8("WVPortalKey")).string(); - uint32_t drmInfoRequestStatus = 0; - - if (portal.size() == 0) { - ALOGE("onAcquireDrmInfo: Must specify portal string for registration operations"); - return NULL; - } - - if (drmInfoRequest->getInfoType()==DrmInfoRequest::TYPE_REGISTRATION_INFO) { - if (!mDrmPluginImpl->RegisterDrmInfo(portal, assetDbPath, &drmInfoRequestStatus)) { - ALOGE("onAcquireDrmInfo: RegisterDrmInfo failed"); - return NULL; - } - } else { - if (!mDrmPluginImpl->UnregisterDrmInfo(portal, assetDbPath)) { - ALOGE("onAcquireDrmInfo: UnregisterDrmInfo failed"); - return NULL; - } - } - - String8 dataString("dummy_acquistion_string"); - int length = dataString.length(); - char* data = NULL; - data = new char[length]; - memcpy(data, dataString.string(), length); - drmInfo = new DrmInfo(drmInfoRequest->getInfoType(), - DrmBuffer(data, length), drmInfoRequest->getMimeType()); - - if (drmInfoRequest->getInfoType()==DrmInfoRequest::TYPE_REGISTRATION_INFO) { - char buffer[16]; - sprintf(buffer, "%lu", (unsigned long)drmInfoRequestStatus); - drmInfo->put(String8("WVDrmInfoRequestStatusKey"), String8(buffer)); - - drmInfo->put(String8("WVDrmInfoRequestVersionKey"), - String8(mDrmPluginImpl->GetVersion().c_str())); - } - break; - } - case DrmInfoRequest::TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO: { - ALOGE("onAcquireDrmInfo: Unsupported DrmInfoRequest type %d", - drmInfoRequest->getInfoType()); - break; - } - default: { - ALOGE("onAcquireDrmInfo: Unknown info type %d", drmInfoRequest->getInfoType()); - break; - } - } - } - return drmInfo; -} - -/** - * Executes given drm information based on its type - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] drmInfo Information needs to be processed - * @return DrmInfoStatus - * instance as a result of processing given input - */ -DrmInfoStatus* WVMDrmPlugin::onProcessDrmInfo(int uniqueId, const DrmInfo* drmInfo) { - //ALOGD("WVMDrmPlugin::onProcessDrmInfo: %d", uniqueId); - - int status = DrmInfoStatus::STATUS_ERROR; - - if (NULL != drmInfo) { - if (drmInfo->getInfoType() == DrmInfoRequest::TYPE_RIGHTS_ACQUISITION_INFO) { - std::string assetPath = drmInfo->get(String8("WVAssetURIKey")).string(); - int playbackMode = atol(drmInfo->get(String8("WVLicenseTypeKey")).string()); - - if (mDrmPluginImpl->ProcessDrmInfo(assetPath, playbackMode)) - status = DrmInfoStatus::STATUS_OK; - } else if ((drmInfo->getInfoType() == DrmInfoRequest::TYPE_REGISTRATION_INFO) || - (drmInfo->getInfoType() == DrmInfoRequest::TYPE_UNREGISTRATION_INFO)) { - status = DrmInfoStatus::STATUS_OK; - } else { - ALOGE("onProcessDrmInfo : drmInfo type %d not supported", drmInfo->getInfoType()); - } - } else { - ALOGE("onProcessDrmInfo : drmInfo cannot be NULL"); - } - - String8 licenseString("dummy_license_string"); - const int bufferSize = licenseString.size(); - char* data = NULL; - data = new char[bufferSize]; - memcpy(data, licenseString.string(), bufferSize); - const DrmBuffer* buffer = new DrmBuffer(data, bufferSize); - DrmInfoStatus* drmInfoStatus = - new DrmInfoStatus(status, drmInfo->getInfoType(), buffer, drmInfo->getMimeType()); - - return drmInfoStatus; -} - -/** - * Get constraint information associated with input content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path of the protected content - * @param[in] action Actions defined such as, - * Action::DEFAULT, Action::PLAY, etc - * @return DrmConstraints - * key-value pairs of constraint are embedded in it - * @note - * In case of error, return NULL - */ -DrmConstraints* WVMDrmPlugin::onGetConstraints(int uniqueId, const String8* path, int action) -{ - //ALOGD("WVMDrmPlugin::onGetConstraints : %d", uniqueId); - - if ( (Action::DEFAULT != action) && (Action::PLAY != action) ) { - ALOGE("onGetConstraints : action %d not supported", action); - return NULL; - } - - uint32_t licenseDuration = 0; - uint32_t timeSincePlayback = 0; - uint32_t timeRemaining = 0; - std::string lastError; - bool allowOffline; - bool allowStreaming; - bool denyHD; - - std::string assetPath(path->string()); - bool isValid = mDrmPluginImpl->GetConstraints(assetPath, &timeSincePlayback, &timeRemaining, - &licenseDuration, lastError, allowOffline, - allowStreaming, denyHD); - - DrmConstraints* drmConstraints = new DrmConstraints(); - - String8 key = String8("WVLastErrorKey"); - drmConstraints->put(&key, lastError.c_str()); - - if (isValid) { - char charValue[16]; // max uint32 + terminating char - - memset(charValue, 0, 16); - sprintf(charValue, "%lu", (unsigned long)timeSincePlayback); - drmConstraints->put(&(DrmConstraints::LICENSE_START_TIME), charValue); - - memset(charValue, 0, 16); - sprintf(charValue, "%lu", (unsigned long)timeRemaining); - drmConstraints->put(&(DrmConstraints::LICENSE_EXPIRY_TIME), charValue); - - memset(charValue, 0, 16); - sprintf(charValue, "%lu", (unsigned long)licenseDuration); - drmConstraints->put(&(DrmConstraints::LICENSE_AVAILABLE_TIME), charValue); - - key = String8("WVLicenseTypeKey"); - sprintf(charValue, "%u", (allowStreaming ? 1 : 0) | (allowOffline ? 2 : 0)); - drmConstraints->put(&key, charValue); - - key = String8("WVLicensedResolutionKey"); - sprintf(charValue, "%u", (denyHD ? 1 : 2)); - drmConstraints->put(&key, charValue); - } - - return drmConstraints; -} - - -/** - * Returns the information about the Drm Engine capabilities which includes - * supported MimeTypes and file suffixes. - * - * @param[in] uniqueId Unique identifier for a session - * @return DrmSupportInfo - * instance which holds the capabilities of a plug-in - */ -DrmSupportInfo* WVMDrmPlugin::onGetSupportInfo(int uniqueId) { - //ALOGD("WVMDrmPlugin::onGetSupportInfo : %d", uniqueId); - DrmSupportInfo* drmSupportInfo = new DrmSupportInfo(); - // Add mimetype's - drmSupportInfo->addMimeType(String8("video/wvm")); - // Add File Suffixes - for (int i=0; sFileExtensions[i]; i++) { - drmSupportInfo->addFileSuffix(String8(sFileExtensions[i])); - } - // Add plug-in description - drmSupportInfo->setDescription(String8("Widevine DRM plug-in")); - return drmSupportInfo; -} - -/** - * Get meta data from protected content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path of the protected content - * - * @return DrmMetadata - * key-value pairs of meta data; NULL if failed - */ -DrmMetadata* WVMDrmPlugin::onGetMetadata(int uniqueId, const String8* path) { - //ALOGD("WVDrmPlugin::onGetMetadata returns NULL\n"); - return NULL; -} - -/** - * Save DRM rights to specified rights path - * and make association with content path - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] drmRights DrmRights to be saved - * @param[in] rightsPath File path where rights to be saved - * @param[in] contentPath File path where content was saved - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onSaveRights(int uniqueId, const DrmRights& drmRights, - const String8& rightsPath, const String8& contentPath) { - //ALOGD("WVMDrmPlugin::onSaveRights : %d", uniqueId); - return DRM_NO_ERROR; -} - -/** - * Get whether the given content can be handled by this plugin or not - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path the protected object - * @return bool - * Returns true if this plugin can handle , false in case of not able to handle - */ -bool WVMDrmPlugin::onCanHandle(int uniqueId, const String8& path) { - //ALOGD("WVMDrmPlugin::canHandle('%s') ", path.string()); - String8 extension = path.getPathExtension(); - extension.toLower(); - for (int i=0; sFileExtensions[i]; i++) { - if (String8(sFileExtensions[i]) == extension) { - return true; - } - } - return false; -} - -/** - * Retrieves the mime type embedded inside the original content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path of the protected content - * @return String8 - * Returns mime-type of the original content, such as "video/mpeg" - */ -String8 WVMDrmPlugin::onGetOriginalMimeType(int uniqueId, const String8& path, int fd) { - //ALOGD("WVMDrmPlugin::onGetOriginalMimeType() : %d", uniqueId); - return String8("video/wvm"); -} - -/** - * Retrieves the type of the protected object (content, rights, etc..) - * using specified path or mimetype. At least one parameter should be non null - * to retrieve DRM object type - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path of the content or null. - * @param[in] mimeType Mime type of the content or null. - * @return type of the DRM content, - * such as DrmObjectType::CONTENT, DrmObjectType::RIGHTS_OBJECT - */ -int WVMDrmPlugin::onGetDrmObjectType( - int uniqueId, const String8& path, const String8& mimeType) { - //ALOGD("WVMDrmPlugin::onGetDrmObjectType() : %d", uniqueId); - return DrmObjectType::UNKNOWN; -} - -/** - * Check whether the given content has valid rights or not - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path of the protected content - * @param[in] action Action to perform (Action::DEFAULT, Action::PLAY, etc) - * @return the status of the rights for the protected content, - * such as RightsStatus::RIGHTS_VALID, RightsStatus::RIGHTS_EXPIRED, etc. - */ -int WVMDrmPlugin::onCheckRightsStatus(int uniqueId, const String8& path, int action) { - //ALOGD("WVMDrmPlugin::onCheckRightsStatus() : %d", uniqueId); - - if ( (Action::DEFAULT != action) && (Action::PLAY != action) ) { - ALOGE("onCheckRightsStatus : action %d not supported", action); - return RightsStatus::RIGHTS_INVALID; - } - - std::string assetPath(path.string()); - int rightsStatus = mDrmPluginImpl->CheckRightsStatus(assetPath); - - switch(rightsStatus) { - case WVDRMPluginAPI::RIGHTS_INVALID: - return RightsStatus::RIGHTS_INVALID; - break; - case WVDRMPluginAPI::RIGHTS_EXPIRED: - return RightsStatus::RIGHTS_EXPIRED; - break; - case WVDRMPluginAPI::RIGHTS_VALID: - return RightsStatus::RIGHTS_VALID; - break; - case WVDRMPluginAPI::RIGHTS_NOT_ACQUIRED: - return RightsStatus::RIGHTS_NOT_ACQUIRED; - break; - } - return RightsStatus::RIGHTS_INVALID; -} - -/** - * Consumes the rights for a content. - * If the reserve parameter is true the rights is reserved until the same - * application calls this api again with the reserve parameter set to false. - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptHandle Handle for the decryption session - * @param[in] action Action to perform. (Action::DEFAULT, Action::PLAY, etc) - * @param[in] reserve True if the rights should be reserved. - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, - int action, bool reserve) { - //ALOGD("WVMDrmPlugin::onConsumeRights() : %d", uniqueId); - return DRM_NO_ERROR; -} - -/** - * Informs the DRM Engine about the playback actions performed on the DRM files. - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptHandle Handle for the decryption session - * @param[in] playbackStatus Playback action (Playback::START, Playback::STOP, Playback::PAUSE) - * @param[in] position Position in the file (in milliseconds) where the start occurs. - * Only valid together with Playback::START. - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onSetPlaybackStatus(int uniqueId, DecryptHandle* decryptHandle, - int playbackStatus, int64_t position) { - //ALOGD("WVMDrmPlugin::onSetPlaybackStatus"); - - int op; - - switch(playbackStatus) { - case Playback::START: - op = WVDRMPluginAPI::PLAYBACK_START; - break; - case Playback::STOP: - op = WVDRMPluginAPI::PLAYBACK_STOP; - break; - case Playback::PAUSE: - op = WVDRMPluginAPI::PLAYBACK_PAUSE; - break; - default: - op = WVDRMPluginAPI::PLAYBACK_INVALID; - break; - } - - if (mDrmPluginImpl->SetPlaybackStatus(op, position)) - return DRM_NO_ERROR; - - return DRM_ERROR_UNKNOWN; -} - -/** - * Validates whether an action on the DRM content is allowed or not. - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path of the protected content - * @param[in] action Action to validate (Action::PLAY, Action::TRANSFER, etc) - * @param[in] description Detailed description of the action - * @return true if the action is allowed. - */ -bool WVMDrmPlugin::onValidateAction(int uniqueId, const String8& path, - int action, const ActionDescription& description) { - //ALOGD("WVMDrmPlugin::onValidateAction() : %d", uniqueId); - return true; -} - -/** - * Removes the rights associated with the given protected content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] path Path of the protected content - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onRemoveRights(int uniqueId, const String8& path) { - //ALOGD("WVMDrmPlugin::onRemoveRights() : %d", uniqueId); - - std::string assetPath(path.string()); - if (mDrmPluginImpl->RemoveRights(assetPath)) - return DRM_NO_ERROR; - - return DRM_ERROR_UNKNOWN; -} - -/** - * Removes all the rights information of each plug-in associated with - * DRM framework. Will be used in master reset - * - * @param[in] uniqueId Unique identifier for a session - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onRemoveAllRights(int uniqueId) { - //ALOGD("WVMDrmPlugin::onRemoveAllRights() : %d", uniqueId); - - if (mDrmPluginImpl->RemoveAllRights()) - return DRM_NO_ERROR; - - return DRM_ERROR_UNKNOWN; -} - -/** - * Open the decrypt session to decrypt the given protected content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptHandle Handle for the current decryption session - * @param[in] fd File descriptor of the protected content to be decrypted - * @param[in] offset Start position of the content - * @param[in] length The length of the protected content - * @param[in] mime Mime type of the protected content. - * @return - * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success - */ -status_t WVMDrmPlugin::onOpenDecryptSession( - int uniqueId, DecryptHandle *decryptHandle, - int fd, off64_t offset, off64_t length, const char* mime) -{ - ALOGV("onOpenDecryptSession: id=%d,fd=%d", uniqueId, fd); - - if (!isSupportedMimeType(mime)) { - return DRM_ERROR_CANNOT_HANDLE; - } - - // For efficiency, we rely on the WVMExtractor's sniff result instead of - // setting mimeType and decryptApiType here for the DRMExtractor's sniff. - // WVMExtractor's sniff uses the cached data source for the sniff. - decryptHandle->decryptInfo = NULL; - decryptHandle->status = DRM_NO_ERROR; - - if (mDrmPluginImpl->OpenSession(NULL)) { - return DRM_NO_ERROR; - } - return DRM_ERROR_CANNOT_HANDLE; -} - -bool WVMDrmPlugin::isSupportedMimeType(const char* mime) { - ALOGV("isSupportedMimeType: mime = %s", mime? mime: "NULL"); - return strcasecmp("video/wvm", mime) == 0; -} -/** - * Open the decrypt session to decrypt the given protected content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptHandle Handle for the current decryption session - * @param[in] uri Path of the protected content to be decrypted - * @param[in] mime Mime type of the protected content - * @return - * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success - */ -status_t WVMDrmPlugin::onOpenDecryptSession( - int uniqueId, DecryptHandle* decryptHandle, - const char* uri, const char* mime) -{ - ALOGV("onOpenDecryptSession: id=%d,uri=%s",uniqueId,uri); - if (!isSupportedMimeType(mime)) { - return DRM_ERROR_CANNOT_HANDLE; - } - - // For efficiency, we rely on the WVMExtractor's sniff result instead of - // setting mimeType and decryptApiType here for the DRMExtractor's sniff. - // WVMExtractor's sniff uses the cached data source for the sniff. - status_t result = DRM_ERROR_CANNOT_HANDLE; - - if (!uri) - return result; - - decryptHandle->decryptInfo = NULL; - decryptHandle->status = DRM_NO_ERROR; - - if (mDrmPluginImpl->OpenSession(uri)) { - result = DRM_NO_ERROR; - } else { - //ALOGD("WVMDrmPlugin::onOpenDecryptSession(uri) - not Widevine media"); - } - - return result; -} - - -/** - * Close the decrypt session for the given handle - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptHandle Handle for the decryption session - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { - //ALOGD("WVMDrmPlugin::onCloseDecryptSession() : %d", uniqueId); - if (NULL != decryptHandle) { - if (NULL != decryptHandle->decryptInfo) { - delete decryptHandle->decryptInfo; decryptHandle->decryptInfo = NULL; - } - delete decryptHandle; decryptHandle = NULL; - } - mDrmPluginImpl->CloseSession(); - - return DRM_NO_ERROR; -} - -/** - * Initialize decryption for the given unit of the protected content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptId Handle for the decryption session - * @param[in] decryptUnitId ID Specifies decryption unit, such as track ID - * @param[in] headerInfo Information for initializing decryption of this decrypUnit - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, - int decryptUnitId, const DrmBuffer* headerInfo) { - //ALOGD("WVMDrmPlugin::onInitializeDecryptUnit(): %d", uniqueId); - if (!mDrmPluginImpl->Prepare(headerInfo->data, headerInfo->length)) - return DRM_ERROR_CANNOT_HANDLE; - - return DRM_NO_ERROR; -} - -/** - * Decrypt the protected content buffers for the given unit - * This method will be called any number of times, based on number of - * encrypted streams received from application. - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptId Handle for the decryption session - * @param[in] decryptUnitId ID Specifies decryption unit, such as track ID - * @param[in] encBuffer Encrypted data block - * @param[out] decBuffer Decrypted data block - * @param[in] IV Optional buffer - * @return status_t - * Returns the error code for this API - * DRM_NO_ERROR for success, and one of DRM_ERROR_UNKNOWN, DRM_ERROR_LICENSE_EXPIRED - * DRM_ERROR_SESSION_NOT_OPENED, DRM_ERROR_DECRYPT_UNIT_NOT_INITIALIZED, - * DRM_ERROR_DECRYPT for failure. - */ -status_t WVMDrmPlugin::onDecrypt(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, - const DrmBuffer* encBuffer, DrmBuffer** decBuffer, - DrmBuffer *ivBuffer) -{ - //ALOGD("WVMDrmPlugin::onDecrypt\n"); -#define AES_BLOCK_SIZE 16 - char iv[AES_BLOCK_SIZE]; - memcpy(iv, ivBuffer->data, sizeof(iv)); - - if (*decBuffer == NULL) - return DRM_ERROR_DECRYPT; - - int status; - status = mDrmPluginImpl->Operate(encBuffer->data, encBuffer->length, (*decBuffer)->data, (*decBuffer)->length, iv); - if (status != WVDRMPluginAPI::RIGHTS_VALID) { - (*decBuffer)->length = 0; - usleep(1000); // prevent spinning - if (status == WVDRMPluginAPI::RIGHTS_NOT_ACQUIRED) { - return DRM_ERROR_NO_LICENSE; - } else if (status == WVDRMPluginAPI::RIGHTS_EXPIRED) { - return DRM_ERROR_LICENSE_EXPIRED; - } else if (status == WVDRMPluginAPI::RIGHTS_INVALID) { - return DRM_ERROR_DECRYPT; - } - } - - return DRM_NO_ERROR; -} - -/** - * Finalize decryption for the given unit of the protected content - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] decryptHandle Handle for the decryption session - * @param[in] decryptUnitId ID Specifies decryption unit, such as track ID - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ -status_t WVMDrmPlugin::onFinalizeDecryptUnit( - int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) { - //ALOGD("WVMDrmPlugin::onFinalizeDecryptUnit() : %d", uniqueId); - return DRM_NO_ERROR; -} - -/** - * The following methods are not required for the Widevine DRM plugin - */ -ssize_t WVMDrmPlugin::onPread(int uniqueId, DecryptHandle* decryptHandle, - void* buffer, ssize_t numBytes, off64_t offset) { - return DRM_ERROR_UNKNOWN; -} - - -status_t WVMDrmPlugin::onOpenConvertSession(int uniqueId, int convertId) { - return DRM_ERROR_UNKNOWN; -} - -DrmConvertedStatus* WVMDrmPlugin::onConvertData( - int uniqueId, int convertId, const DrmBuffer* inputData) { - return NULL; -} - -DrmConvertedStatus* WVMDrmPlugin::onCloseConvertSession(int uniqueId, int convertId) { - return NULL; -} diff --git a/proprietary/drmwvmplugin/src/WVMLogging.cpp b/proprietary/drmwvmplugin/src/WVMLogging.cpp deleted file mode 100644 index 87cd4511..00000000 --- a/proprietary/drmwvmplugin/src/WVMLogging.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 Google, Inc. All Rights Reserved - */ - -#define LOG_TAG "WVMLogging" -#include -#include "WVMLogging.h" - -// Connect Widevine debug logging into Android logging - -void android_printbuf(const char *buf) -{ - ALOGD("%s", buf); -} diff --git a/proprietary/drmwvmplugin/test/Android.mk b/proprietary/drmwvmplugin/test/Android.mk deleted file mode 100644 index 99be706a..00000000 --- a/proprietary/drmwvmplugin/test/Android.mk +++ /dev/null @@ -1,32 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - TestPlugin.cpp \ - ../src/WVMLogging.cpp - -LOCAL_C_INCLUDES+= \ - vendor/widevine/proprietary/include \ - vendor/widevine/proprietary/drmwvmplugin/include \ - vendor/widevine/proprietary/streamcontrol/include \ - frameworks/av/drm/libdrmframework/include \ - frameworks/av/drm/libdrmframework/plugins/common/include - -LOCAL_C_INCLUDES_x86 += $(TOP)/system/core/include/arch/linux-x86 - -LOCAL_SHARED_LIBRARIES := \ - liblog \ - libutils \ - libz \ - libdl - -LOCAL_STATIC_LIBRARIES := \ - libdrmframeworkcommon - -LOCAL_MODULE:=test-wvdrmplugin - -LOCAL_MODULE_TAGS := tests - -LOCAL_MODULE_TARGET_ARCH := $(WIDEVINE_SUPPORTED_ARCH) - -include $(BUILD_EXECUTABLE) diff --git a/proprietary/drmwvmplugin/test/TestPlugin.cpp b/proprietary/drmwvmplugin/test/TestPlugin.cpp deleted file mode 100644 index af9ba0ee..00000000 --- a/proprietary/drmwvmplugin/test/TestPlugin.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (C) 2011 Google, Inc. All Rights Reserved - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include "WVMDrmPlugin.h" -#include "drm/DrmInfoRequest.h" -#include "drm/DrmInfoStatus.h" -#include "drm/DrmConstraints.h" -#include "drm/DrmInfo.h" - -using namespace android; -using namespace std; - -class WVMDrmPluginTest -{ -public: - WVMDrmPluginTest() {} - ~WVMDrmPluginTest() {} - - void TestAsset(IDrmEngine *plugin, String8 &url, bool useOpenFd = false); - - void TestRegister(IDrmEngine *plugin); - void TestAcquireRights(IDrmEngine *plugin, String8 &url, int playbackMode, - bool useOpenFd = false); - void TestCheckRightsNotAcquired(IDrmEngine *plugin, String8 &url); - void TestCheckValidRights(IDrmEngine *plugin, String8 &url); - void TestGetConstraints(IDrmEngine *plugin, String8 &url, int playbackMode); - void TestRemoveRights(IDrmEngine *plugin, String8 &url); - void TestRemoveAllRights(IDrmEngine *plugin); - - // Tests - void Run(); - -private: - static const int PlaybackMode_Default = 0; - static const int PlaybackMode_Streaming = 1; - static const int PlaybackMode_Offline = 2; - static const int PlaybackMode_Any = PlaybackMode_Streaming | PlaybackMode_Offline; -}; - -void WVMDrmPluginTest::Run() -{ - cout << "WVDrmPluginTest::Run" << endl; - const char *path = "/vendor/lib/drm/libdrmwvmplugin.so"; - void *handle = dlopen(path, RTLD_NOW); - if (handle == NULL) { - fprintf(stderr, "Can't open plugin: %s %s\n", path, dlerror()); - exit(-1); - } - - typedef IDrmEngine *(*create_t)(); - create_t creator = (create_t)dlsym(handle, "create"); - if (!creator) { - fprintf(stderr, "Can't find create method\n"); - exit(-1); - } - - typedef void (*destroy_t)(IDrmEngine *); - destroy_t destroyer = (destroy_t)dlsym(handle, "destroy"); - if (!destroyer) { - fprintf(stderr, "Can't find destroy method\n"); - exit(-1); - } - - // Basic test - see if we can instantiate the object and call a method - IDrmEngine *plugin = (*creator)(); - if (plugin->initialize(0) != DRM_NO_ERROR) { - fprintf(stderr, "onInitialize failed!\n"); - exit(-1); - } - - - String8 url; - - // Remote asset with widevine:// protocol - url = String8("widevine://commondatastorage.googleapis.com/wvmedia/bbb_base_480p_3br_tp.wvm"); - TestAsset(plugin, url); - - // Local asset using URL syntax - url = String8("file:///sdcard/Widevine/inception_base_360p_single.wvm"); - TestAsset(plugin, url); - - // Local asset using normal file path - url = String8("/sdcard/Widevine/inception_base_360p_single.wvm"); - TestAsset(plugin, url); - - // Local asset, but also supply open file descriptor - url = String8("/sdcard/Widevine/inception_base_360p_single.wvm"); - TestAsset(plugin, url, true); - - // Shut down and clean up - if (plugin->terminate(0) != DRM_NO_ERROR) { - fprintf(stderr, "onTerminate failed!\n"); - exit(-1); - } - destroyer(plugin); - dlclose(handle); - printf("Test successful!\n"); - exit(0); -} - -void WVMDrmPluginTest::TestRegister(IDrmEngine *plugin) -{ - cout << "WVDrmPluginTest::TestRegister" << endl; - - String8 mimeType("video/wvm"); - DrmInfoRequest registrationInfo(DrmInfoRequest::TYPE_REGISTRATION_INFO, mimeType); - registrationInfo.put(String8("WVPortalKey"), String8("OEM")); - - DrmInfo *info = plugin->acquireDrmInfo(0, ®istrationInfo); - if (info == NULL) { - fprintf(stderr, "acquireDrmInfo failed!\n"); - exit(-1); - } - delete info; -} - -void WVMDrmPluginTest::TestAcquireRights(IDrmEngine *plugin, String8 &url, - int playbackMode, bool useOpenFd) -{ - cout << "WVDrmPluginTest::TestAcquireRights url=" << url << " mode=" << - playbackMode << " useOpenFd=" << useOpenFd << endl; - - int openFd = -1; - - String8 mimeType("video/wvm"); - DrmInfoRequest rightsAcquisitionInfo(DrmInfoRequest::TYPE_RIGHTS_ACQUISITION_INFO, mimeType); - rightsAcquisitionInfo.put(String8("WVDRMServerKey"), String8( - "https://license.uat.widevine.com/getlicense/widevine")); - rightsAcquisitionInfo.put(String8("WVAssetURIKey"), url); - - if (useOpenFd) { - char openFdStr[16]; - openFd = open(url.string(), O_RDONLY); - if (openFd == -1) { - cout << "error opening " << url << ":" << endl; - fprintf(stderr, "Couldn't open local asset file\n"); - exit(-1); - } - sprintf(openFdStr, "%lu", (unsigned long)openFd); - rightsAcquisitionInfo.put(String8("FileDescriptorKey"), String8(openFdStr)); - } - - rightsAcquisitionInfo.put(String8("WVDeviceIDKey"), String8("device1234")); - rightsAcquisitionInfo.put(String8("WVPortalKey"), String8("OEM")); - if (playbackMode) { - char num[4]; - sprintf(num, "%d", playbackMode); - rightsAcquisitionInfo.put(String8("WVLicenseTypeKey"), String8(num)); - cout << "WVLicenseTypeKey = " << num << endl; - } - - DrmInfo *info = plugin->acquireDrmInfo(0, &rightsAcquisitionInfo); - if (info == NULL) { - fprintf(stderr, "acquireDrmInfo failed!\n"); - exit(-1); - } - - if (useOpenFd && (openFd != -1)) { - close(openFd); - } - - DrmInfoStatus *status = plugin->processDrmInfo(0, info); - if (status == NULL || status->statusCode != DrmInfoStatus::STATUS_OK) { - fprintf(stderr, "processDrmInfo failed!\n"); - exit(-1); - } - - delete status; - delete info; -} - -void WVMDrmPluginTest::TestCheckRightsNotAcquired(IDrmEngine *plugin, String8 &url) -{ - cout << "WVDrmPluginTest::TestCheckRightsNotAcquired url=" << url << endl; - - if (plugin->checkRightsStatus(0, url, Action::DEFAULT) != RightsStatus::RIGHTS_NOT_ACQUIRED) { - fprintf(stderr, "checkRightsNotAcquired default action failed!\n"); - exit(-1); - } - - if (plugin->checkRightsStatus(0, url, Action::PLAY) != RightsStatus::RIGHTS_NOT_ACQUIRED) { - fprintf(stderr, "checkRightsNotAcquired failed!\n"); - exit(-1); - } -} - -void WVMDrmPluginTest::TestCheckValidRights(IDrmEngine *plugin, String8 &url) -{ - cout << "WVDrmPluginTest::TestCheckValidRights url=" << url << endl; - - if (plugin->checkRightsStatus(0, url, Action::DEFAULT) != RightsStatus::RIGHTS_VALID) { - fprintf(stderr, "checkValidRights default action failed!\n"); - exit(-1); - } - - if (plugin->checkRightsStatus(0, url, Action::PLAY) != RightsStatus::RIGHTS_VALID) { - fprintf(stderr, "checkValidRights play action failed!\n"); - exit(-1); - } -} - -void WVMDrmPluginTest::TestGetConstraints(IDrmEngine *plugin, String8 &url, int playbackMode) -{ - cout << "WVDrmPluginTest::TestGetConstraints url=" << url << endl; - - DrmConstraints *constraints; - constraints = plugin->getConstraints(0, &url, Action::PLAY); - if (constraints == NULL) { - fprintf(stderr, "getConstraints returned NULL constraints!\n"); - exit(-1); - } - - if (constraints->getCount() != 6) { - fprintf(stderr, "getConstraints returned unexpected count: %d!\n", constraints->getCount()); - exit(-1); - } - - if (constraints->get(DrmConstraints::LICENSE_START_TIME) == "") { - fprintf(stderr, "getConstraints missing start time!\n"); - exit(-1); - } - - if (constraints->get(DrmConstraints::LICENSE_AVAILABLE_TIME) == "") { - fprintf(stderr, "getConstraints missing available time!\n"); - exit(-1); - } - - if (constraints->get(DrmConstraints::LICENSE_EXPIRY_TIME) == "") { - fprintf(stderr, "getConstraints missing expiry time!\n"); - exit(-1); - } - - if (constraints->get(String8("WVLicenseTypeKey")) == "") { - fprintf(stderr, "getConstraints missing license type key!\n"); - exit(-1); - } - - if (constraints->get(String8("WVLicensedResolutionKey")) == "") { - fprintf(stderr, "getConstraints missing resolution key!\n"); - exit(-1); - } - - if (constraints->get(String8("WVLastErrorKey")) == "") { - fprintf(stderr, "getConstraints missing last error key!\n"); - exit(-1); - } - - String8 licenseTypeStr = constraints->get(String8("WVLicenseTypeKey")); - int licenseType = atol(licenseTypeStr.string()); - if (licenseType != playbackMode) { - fprintf(stderr, "license type mismatch, expected %d, found %d\n", playbackMode, licenseType); - exit(-1); - } - - delete constraints; -} - -void WVMDrmPluginTest::TestRemoveRights(IDrmEngine *plugin, String8 &url) -{ - cout << "WVDrmPluginTest::TestRemoveRights url=" << url << endl; - - status_t status = plugin->removeRights(0, url); - if (status != DRM_NO_ERROR) { - fprintf(stderr, "removeRights returned error: %d!\n", (int)status); - exit(-1); - } -} - -void WVMDrmPluginTest::TestRemoveAllRights(IDrmEngine *plugin) -{ - cout << "WVDrmPluginTest::TestRemoveAllRights" << endl; - - status_t status = plugin->removeAllRights(0); - if (status != DRM_NO_ERROR) { - fprintf(stderr, "removeAllRights returned error: %d!\n", (int)status); - exit(-1); - } -} - -void WVMDrmPluginTest::TestAsset(IDrmEngine *plugin, String8 &url, - bool useOpenFd) -{ - cout << "WVDrmPluginTest::TestAsset url=" << url << - " useOpenFd=" << useOpenFd << endl; - - TestRegister(plugin); - TestRemoveAllRights(plugin); - TestCheckRightsNotAcquired(plugin, url); - - TestAcquireRights(plugin, url, PlaybackMode_Default, useOpenFd); - TestCheckValidRights(plugin, url); - TestGetConstraints(plugin, url, PlaybackMode_Any); - TestRemoveRights(plugin, url); - TestCheckRightsNotAcquired(plugin, url); - - TestAcquireRights(plugin, url, PlaybackMode_Offline, useOpenFd); - TestCheckValidRights(plugin, url); - TestGetConstraints(plugin, url, PlaybackMode_Offline); - TestRemoveRights(plugin, url); - TestCheckRightsNotAcquired(plugin, url); - - TestAcquireRights(plugin, url, PlaybackMode_Streaming, useOpenFd); - TestCheckValidRights(plugin, url); - TestGetConstraints(plugin, url, PlaybackMode_Streaming); - TestRemoveRights(plugin, url); - TestCheckRightsNotAcquired(plugin, url); - - TestAcquireRights(plugin, url, PlaybackMode_Any, useOpenFd); - TestCheckValidRights(plugin, url); - TestGetConstraints(plugin, url, PlaybackMode_Any); - TestRemoveRights(plugin, url); - TestCheckRightsNotAcquired(plugin, url); -} - -int main(int argc, char **argv) -{ - // turn off some noisy printing in WVStreamControl - setenv("WV_SILENT", "true", 1); - - WVMDrmPluginTest test; - test.Run(); -} diff --git a/proprietary/drmwvmplugin/test/kill.sh b/proprietary/drmwvmplugin/test/kill.sh deleted file mode 100755 index acc7151c..00000000 --- a/proprietary/drmwvmplugin/test/kill.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -PID=`adb shell ps | grep test-wvdrmplugin | awk '{print $2}'` -adb shell kill -9 $PID diff --git a/proprietary/samplePlayer/Android.mk b/proprietary/samplePlayer/Android.mk deleted file mode 100644 index e41a5259..00000000 --- a/proprietary/samplePlayer/Android.mk +++ /dev/null @@ -1,35 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_DEX_PREOPT := false - -LOCAL_PACKAGE_NAME := WidevineSamplePlayer - -LOCAL_JAVA_LIBRARIES := \ - org.apache.http.legacy \ - -LOCAL_STATIC_JAVA_LIBRARIES := \ - android-support-v4 \ - android-support-v7-appcompat \ - android-support-design - -LOCAL_RESOURCE_DIR := \ - $(addprefix $(LOCAL_PATH)/, res) \ - frameworks/support/design/res \ - frameworks/support/v7/appcompat/res \ - -LOCAL_AAPT_FLAGS := \ - --auto-add-overlay \ - --extra-packages android.support.design \ - --extra-packages android.support.v7.appcompat \ - -LOCAL_SDK_VERSION := current - -include $(BUILD_PACKAGE) - -# Use the following include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/proprietary/samplePlayer/AndroidManifest.xml b/proprietary/samplePlayer/AndroidManifest.xml deleted file mode 100644 index c516a70e..00000000 --- a/proprietary/samplePlayer/AndroidManifest.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/proprietary/samplePlayer/default.properties b/proprietary/samplePlayer/default.properties deleted file mode 100644 index 8d2c89a7..00000000 --- a/proprietary/samplePlayer/default.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Project target. -target=android-IceCreamSandwich diff --git a/proprietary/samplePlayer/readme b/proprietary/samplePlayer/readme deleted file mode 100644 index 56ab07c0..00000000 --- a/proprietary/samplePlayer/readme +++ /dev/null @@ -1,45 +0,0 @@ -README: WidevineSamplePlayer.apk - -[Install application:] - -Attach a device -In a terminal window: -change directory to vendor/widevine/proprietary/samplePlayer -type the following commands: -mm -adb root -adb remount -adb sync -adb reboot - -demo is installed to out/target/product/stingray/system/app/WidevineSamplePlayer.apk - - -[Download content for offline testing:] - -View http://storage.googleapis.com/wvmedia/html/oem.html source for asset names. - -For example: - -curl -sL "http://seawwws001.cdn.shibboleth.tv/videos/content/starz_demo_ffmpeg_hc_single_720p.wvm" -O -adb shell mkdir -p /sdcard/Widevine -adb push starz_demo_ffmpeg_hc_single_720p.wvm /sdcard/Widevine/ - - -[Running the application:] - -On your device, open WidevineDemo. -The Streaming tab should be highlighted, with content available in 480p and 720p encodings. -Select an asset to play. -You should see a player page. To successfully play back content: --Select Acquire Rights --Select Play (or click the player window to start playback) - -Selecting Show Rights will provide the license time left for playback in the log screen next to the player. -Selecting Remove Rights will stop further attempts to play back from succeeding for more than 10 seconds. You will need to then select Acquire Rights to allow playback again. - -Stop video, and go back one screen to the video list. -Select the Downloads tab. -You should see the video we pushed to the device (starz_demo_ffmpeg_hc_single_720p.wvm). -Behavior on this page should be the same as for the Streaming page, with the exception that once you Acquire Rights, you should be able to continue playback of the Downloaded asset offline as long as the rights are valid. You can check the status of your rights with the Show Rights button. - diff --git a/proprietary/samplePlayer/res/drawable-hdpi/background3.png b/proprietary/samplePlayer/res/drawable-hdpi/background3.png deleted file mode 100644 index e2d9b1a2..00000000 Binary files a/proprietary/samplePlayer/res/drawable-hdpi/background3.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-hdpi/download_clip.jpg b/proprietary/samplePlayer/res/drawable-hdpi/download_clip.jpg deleted file mode 100644 index a9dc42cf..00000000 Binary files a/proprietary/samplePlayer/res/drawable-hdpi/download_clip.jpg and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-hdpi/empty.png b/proprietary/samplePlayer/res/drawable-hdpi/empty.png deleted file mode 100644 index 5acef52c..00000000 Binary files a/proprietary/samplePlayer/res/drawable-hdpi/empty.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-hdpi/icon.png b/proprietary/samplePlayer/res/drawable-hdpi/icon.png deleted file mode 100644 index 8074c4c5..00000000 Binary files a/proprietary/samplePlayer/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-hdpi/play_shield.png b/proprietary/samplePlayer/res/drawable-hdpi/play_shield.png deleted file mode 100644 index 32b9ea7b..00000000 Binary files a/proprietary/samplePlayer/res/drawable-hdpi/play_shield.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-hdpi/selection_circle.png b/proprietary/samplePlayer/res/drawable-hdpi/selection_circle.png deleted file mode 100644 index 2d045ff4..00000000 Binary files a/proprietary/samplePlayer/res/drawable-hdpi/selection_circle.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-hdpi/streaming_clip.png b/proprietary/samplePlayer/res/drawable-hdpi/streaming_clip.png deleted file mode 100644 index d8d95c86..00000000 Binary files a/proprietary/samplePlayer/res/drawable-hdpi/streaming_clip.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-ldpi/background3.png b/proprietary/samplePlayer/res/drawable-ldpi/background3.png deleted file mode 100644 index e2d9b1a2..00000000 Binary files a/proprietary/samplePlayer/res/drawable-ldpi/background3.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-ldpi/download_clip.jpg b/proprietary/samplePlayer/res/drawable-ldpi/download_clip.jpg deleted file mode 100644 index a9dc42cf..00000000 Binary files a/proprietary/samplePlayer/res/drawable-ldpi/download_clip.jpg and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-ldpi/empty.png b/proprietary/samplePlayer/res/drawable-ldpi/empty.png deleted file mode 100644 index 5acef52c..00000000 Binary files a/proprietary/samplePlayer/res/drawable-ldpi/empty.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-ldpi/icon.png b/proprietary/samplePlayer/res/drawable-ldpi/icon.png deleted file mode 100644 index 1095584e..00000000 Binary files a/proprietary/samplePlayer/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-ldpi/play_shield.png b/proprietary/samplePlayer/res/drawable-ldpi/play_shield.png deleted file mode 100644 index 32b9ea7b..00000000 Binary files a/proprietary/samplePlayer/res/drawable-ldpi/play_shield.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-ldpi/selection_circle.png b/proprietary/samplePlayer/res/drawable-ldpi/selection_circle.png deleted file mode 100644 index 2d045ff4..00000000 Binary files a/proprietary/samplePlayer/res/drawable-ldpi/selection_circle.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-ldpi/streaming_clip.png b/proprietary/samplePlayer/res/drawable-ldpi/streaming_clip.png deleted file mode 100644 index d8d95c86..00000000 Binary files a/proprietary/samplePlayer/res/drawable-ldpi/streaming_clip.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-mdpi/background3.png b/proprietary/samplePlayer/res/drawable-mdpi/background3.png deleted file mode 100644 index e2d9b1a2..00000000 Binary files a/proprietary/samplePlayer/res/drawable-mdpi/background3.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-mdpi/download_clip.jpg b/proprietary/samplePlayer/res/drawable-mdpi/download_clip.jpg deleted file mode 100644 index a9dc42cf..00000000 Binary files a/proprietary/samplePlayer/res/drawable-mdpi/download_clip.jpg and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-mdpi/empty.png b/proprietary/samplePlayer/res/drawable-mdpi/empty.png deleted file mode 100644 index 5acef52c..00000000 Binary files a/proprietary/samplePlayer/res/drawable-mdpi/empty.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-mdpi/icon.png b/proprietary/samplePlayer/res/drawable-mdpi/icon.png deleted file mode 100644 index a07c69fa..00000000 Binary files a/proprietary/samplePlayer/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-mdpi/play_shield.png b/proprietary/samplePlayer/res/drawable-mdpi/play_shield.png deleted file mode 100644 index 32b9ea7b..00000000 Binary files a/proprietary/samplePlayer/res/drawable-mdpi/play_shield.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-mdpi/selection_circle.png b/proprietary/samplePlayer/res/drawable-mdpi/selection_circle.png deleted file mode 100644 index 2d045ff4..00000000 Binary files a/proprietary/samplePlayer/res/drawable-mdpi/selection_circle.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/drawable-mdpi/streaming_clip.png b/proprietary/samplePlayer/res/drawable-mdpi/streaming_clip.png deleted file mode 100644 index d8d95c86..00000000 Binary files a/proprietary/samplePlayer/res/drawable-mdpi/streaming_clip.png and /dev/null differ diff --git a/proprietary/samplePlayer/res/layout/empty.xml b/proprietary/samplePlayer/res/layout/empty.xml deleted file mode 100644 index 11d2e4c1..00000000 --- a/proprietary/samplePlayer/res/layout/empty.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/proprietary/samplePlayer/res/layout/main.xml b/proprietary/samplePlayer/res/layout/main.xml deleted file mode 100644 index 5ce0f1b9..00000000 --- a/proprietary/samplePlayer/res/layout/main.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/proprietary/samplePlayer/res/layout/notprovisioned.xml b/proprietary/samplePlayer/res/layout/notprovisioned.xml deleted file mode 100644 index 5d12d452..00000000 --- a/proprietary/samplePlayer/res/layout/notprovisioned.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/proprietary/samplePlayer/res/layout/settings.xml b/proprietary/samplePlayer/res/layout/settings.xml deleted file mode 100644 index 1e9f460d..00000000 --- a/proprietary/samplePlayer/res/layout/settings.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -