Add feature flag to change the CDM version to 18.0.2
[ Merge of http://go/wvgerrit/191139 ] Adding an initial flag that include identifiable differences when the feature is enabled or disabled. This is the same commit as ag/25837302. It was reverted due to memory size issues. A follow on CL will address that issue to ease review. Bug: 311951236 Test: WVTS tests Change-Id: I995fb8f4158b3529c2d19a2ee5fd8beec0019f7c
This commit is contained in:
@@ -39,6 +39,7 @@ cc_defaults {
|
|||||||
"liblog",
|
"liblog",
|
||||||
"libbase",
|
"libbase",
|
||||||
"libutils",
|
"libutils",
|
||||||
|
"wv_media_drm_flags_c_lib",
|
||||||
],
|
],
|
||||||
include_dirs: [
|
include_dirs: [
|
||||||
"vendor/widevine/libwvdrmengine/cdm/core/include",
|
"vendor/widevine/libwvdrmengine/cdm/core/include",
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ cc_binary {
|
|||||||
|
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"libbinder_ndk",
|
"libbinder_ndk",
|
||||||
|
"wv_media_drm_flags_c_lib",
|
||||||
],
|
],
|
||||||
|
|
||||||
init_rc: ["src/android.hardware.drm-service.widevine.rc"],
|
init_rc: ["src/android.hardware.drm-service.widevine.rc"],
|
||||||
@@ -178,7 +179,10 @@ cc_binary {
|
|||||||
"frameworks/native/libs/binder/include",
|
"frameworks/native/libs/binder/include",
|
||||||
],
|
],
|
||||||
|
|
||||||
shared_libs: ["libbinder_ndk"],
|
shared_libs: [
|
||||||
|
"libbinder_ndk",
|
||||||
|
"wv_media_drm_flags_c_lib",
|
||||||
|
],
|
||||||
|
|
||||||
init_rc: ["src/android.hardware.drm-service-lazy.widevine.rc"],
|
init_rc: ["src/android.hardware.drm-service-lazy.widevine.rc"],
|
||||||
vintf_fragments: ["manifest_android.hardware.drm-service-lazy.widevine.xml"],
|
vintf_fragments: ["manifest_android.hardware.drm-service-lazy.widevine.xml"],
|
||||||
@@ -224,6 +228,7 @@ cc_library_static {
|
|||||||
"libbinder_ndk",
|
"libbinder_ndk",
|
||||||
"libcrypto",
|
"libcrypto",
|
||||||
"liblog",
|
"liblog",
|
||||||
|
"wv_media_drm_flags_c_lib",
|
||||||
],
|
],
|
||||||
|
|
||||||
static_libs: [
|
static_libs: [
|
||||||
@@ -297,6 +302,7 @@ cc_library {
|
|||||||
"libcrypto",
|
"libcrypto",
|
||||||
"libdl",
|
"libdl",
|
||||||
"liblog",
|
"liblog",
|
||||||
|
"wv_media_drm_flags_c_lib",
|
||||||
],
|
],
|
||||||
|
|
||||||
header_libs: ["libstagefright_foundation_headers"],
|
header_libs: ["libstagefright_foundation_headers"],
|
||||||
@@ -329,6 +335,9 @@ cc_fuzz {
|
|||||||
"service_fuzzer_defaults",
|
"service_fuzzer_defaults",
|
||||||
"fuzzer_disable_leaks",
|
"fuzzer_disable_leaks",
|
||||||
],
|
],
|
||||||
|
shared_libs: [
|
||||||
|
"wv_media_drm_flags_c_lib",
|
||||||
|
],
|
||||||
static_libs: [
|
static_libs: [
|
||||||
"libbase",
|
"libbase",
|
||||||
"libbinder_random_parcel",
|
"libbinder_random_parcel",
|
||||||
|
|||||||
28
libwvdrmengine/aconfig/Android.bp
Normal file
28
libwvdrmengine/aconfig/Android.bp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (C) 2023 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.
|
||||||
|
|
||||||
|
aconfig_declarations {
|
||||||
|
name: "wv_media_drm_flags",
|
||||||
|
package: "com.android.mediadrm.widevine.flags",
|
||||||
|
srcs: [
|
||||||
|
"wv_media_drm_flags.aconfig",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
cc_aconfig_library {
|
||||||
|
name: "wv_media_drm_flags_c_lib",
|
||||||
|
aconfig_declarations: "wv_media_drm_flags",
|
||||||
|
vendor_available: true,
|
||||||
|
min_sdk_version: "34",
|
||||||
|
}
|
||||||
8
libwvdrmengine/aconfig/wv_media_drm_flags.aconfig
Normal file
8
libwvdrmengine/aconfig/wv_media_drm_flags.aconfig
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package: "com.android.mediadrm.widevine.flags"
|
||||||
|
|
||||||
|
flag {
|
||||||
|
name: "update_cdm_version_to_18_0_2"
|
||||||
|
namespace: "media_drm"
|
||||||
|
description: "Update CDM version to 18.0.2"
|
||||||
|
bug: "311951236"
|
||||||
|
}
|
||||||
@@ -11,7 +11,8 @@ namespace wvcdm {
|
|||||||
|
|
||||||
// Note: If you change this, make sure you also change
|
// Note: If you change this, make sure you also change
|
||||||
// https://developers.google.com/widevine/drm/client/oemcrypto/compatibility
|
// https://developers.google.com/widevine/drm/client/oemcrypto/compatibility
|
||||||
static const std::string kWVAndroidCdmVersion = "18.0.0";
|
static const std::string kWVAndroidCdmVersion_18_0_1 = "18.0.1";
|
||||||
|
static const std::string kWVAndroidCdmVersion_18_0_2 = "18.0.2";
|
||||||
|
|
||||||
} // namespace wvcdm
|
} // namespace wvcdm
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,15 @@
|
|||||||
#include <android-base/properties.h>
|
#include <android-base/properties.h>
|
||||||
#include <android/sysprop/WidevineProperties.sysprop.h>
|
#include <android/sysprop/WidevineProperties.sysprop.h>
|
||||||
|
|
||||||
|
#include <com_android_mediadrm_widevine_flags.h>
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "wv_android_constants.h"
|
#include "wv_android_constants.h"
|
||||||
#include "widevine_apex_info.h"
|
#include "widevine_apex_info.h"
|
||||||
|
|
||||||
using namespace android::sysprop;
|
using namespace android::sysprop;
|
||||||
|
|
||||||
|
namespace mediadrm_flags = com::android::mediadrm::widevine::flags;
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const char kBasePathPrefix[] = "/data/vendor/mediadrm/IDM";
|
const char kBasePathPrefix[] = "/data/vendor/mediadrm/IDM";
|
||||||
@@ -146,7 +150,11 @@ bool Properties::GetWVCdmVersion(std::string* version) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
*version = kWVAndroidCdmVersion + apex_version;
|
if (mediadrm_flags::update_cdm_version_to_18_0_2()) {
|
||||||
|
*version = kWVAndroidCdmVersion_18_0_2 + apex_version;
|
||||||
|
} else {
|
||||||
|
*version = kWVAndroidCdmVersion_18_0_1 + apex_version;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
libssl \
|
libssl \
|
||||||
libstagefright_foundation \
|
libstagefright_foundation \
|
||||||
libutils \
|
libutils \
|
||||||
|
wv_media_drm_flags_c_lib \
|
||||||
|
|
||||||
LOCAL_CFLAGS += -DUNIT_TEST
|
LOCAL_CFLAGS += -DUNIT_TEST
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
libprotobuf-cpp-lite \
|
libprotobuf-cpp-lite \
|
||||||
libutils \
|
libutils \
|
||||||
libwvaidl \
|
libwvaidl \
|
||||||
|
wv_media_drm_flags_c_lib \
|
||||||
|
|
||||||
LOCAL_HEADER_LIBRARIES := \
|
LOCAL_HEADER_LIBRARIES := \
|
||||||
libstagefright_headers \
|
libstagefright_headers \
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
libprotobuf-cpp-lite \
|
libprotobuf-cpp-lite \
|
||||||
libutils \
|
libutils \
|
||||||
libwvaidl \
|
libwvaidl \
|
||||||
|
wv_media_drm_flags_c_lib \
|
||||||
|
|
||||||
LOCAL_HEADER_LIBRARIES := \
|
LOCAL_HEADER_LIBRARIES := \
|
||||||
libstagefright_headers \
|
libstagefright_headers \
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ cc_test {
|
|||||||
"libdl",
|
"libdl",
|
||||||
"liblog",
|
"liblog",
|
||||||
"libssl",
|
"libssl",
|
||||||
|
"wv_media_drm_flags_c_lib",
|
||||||
],
|
],
|
||||||
cflags: [
|
cflags: [
|
||||||
"-Wall",
|
"-Wall",
|
||||||
|
|||||||
Reference in New Issue
Block a user