Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34322935 authored by Colin Cross's avatar Colin Cross Committed by Android (Google) Code Review
Browse files

Merge changes I90852003,Icfc13bb5,I28e07b23

* changes:
  Convert libmediametrics to Android.bp
  Convert libmediadrm to Android.bp
  Fix warnings hidden by -isystem
parents 4b22cbfe ed56be2e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ ndk_headers {

subdirs = [
    "camera",
    "drm/*",
    "media/*",
    "radio",
    "soundtrigger",
+52 −0
Original line number Diff line number Diff line
//
// libmediadrm
//

cc_library_shared {
    name: "libmediadrm",

    aidl: {
        local_include_dirs: ["aidl"],
        export_aidl_headers: true,
    },

    srcs: [
        "aidl/android/media/ICas.aidl",
        "aidl/android/media/ICasListener.aidl",
        "aidl/android/media/IDescrambler.aidl",
        "aidl/android/media/IMediaCasService.aidl",

        "CasImpl.cpp",
        "DescramblerImpl.cpp",
        "DrmPluginPath.cpp",
        "DrmSessionManager.cpp",
        "ICrypto.cpp",
        "IDrm.cpp",
        "IDrmClient.cpp",
        "IMediaDrmService.cpp",
        "MediaCasDefs.cpp",
        "SharedLibrary.cpp",
        "DrmHal.cpp",
        "CryptoHal.cpp",
    ],

    shared_libs: [
        "libbinder",
        "libcutils",
        "libdl",
        "liblog",
        "libmediautils",
        "libstagefright_foundation",
        "libutils",
        "android.hidl.base@1.0",
        "android.hardware.drm@1.0",
        "libhidlbase",
        "libhidlmemory",
        "libhidltransport",
    ],

    cflags: [
        "-Werror",
        "-Wall",
    ],
}

drm/libmediadrm/Android.mk

deleted100644 → 0
+0 −52
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

#
# libmediadrm
#

include $(CLEAR_VARS)

LOCAL_AIDL_INCLUDES := \
    frameworks/av/drm/libmediadrm/aidl

LOCAL_SRC_FILES := \
    aidl/android/media/ICas.aidl \
    aidl/android/media/ICasListener.aidl \
    aidl/android/media/IDescrambler.aidl \
    aidl/android/media/IMediaCasService.aidl \

LOCAL_SRC_FILES += \
    CasImpl.cpp \
    DescramblerImpl.cpp \
    DrmPluginPath.cpp \
    DrmSessionManager.cpp \
    ICrypto.cpp \
    IDrm.cpp \
    IDrmClient.cpp \
    IMediaDrmService.cpp \
    MediaCasDefs.cpp \
    SharedLibrary.cpp \
    DrmHal.cpp \
    CryptoHal.cpp

LOCAL_SHARED_LIBRARIES := \
    libbinder \
    libcutils \
    libdl \
    liblog \
    libmediautils \
    libstagefright_foundation \
    libutils \
    android.hidl.base@1.0 \
    android.hardware.drm@1.0 \
    libhidlbase \
    libhidlmemory \
    libhidltransport

LOCAL_CFLAGS += -Werror -Wno-error=deprecated-declarations -Wall

LOCAL_MODULE:= libmediadrm

include $(BUILD_SHARED_LIBRARY)

include $(call all-makefiles-under,$(LOCAL_PATH))
+16 −1
Original line number Diff line number Diff line
@@ -203,7 +203,8 @@ inline void TypeConverter<Traits>::maskToString(uint32_t mask, std::string &str,
    if (mask != 0) {
        bool first_flag = true;
        for (size_t i = 0; mTable[i].literal; i++) {
            if (mTable[i].value != 0 && (mask & mTable[i].value) == mTable[i].value) {
            uint32_t value = static_cast<uint32_t>(mTable[i].value);
            if (mTable[i].value != 0 && ((mask & value) == value)) {
                if (!first_flag) str += del;
                first_flag = false;
                str += mTable[i].literal;
@@ -228,6 +229,20 @@ typedef TypeConverter<AudioModeTraits> AudioModeConverter;
typedef TypeConverter<UsageTraits> UsageTypeConverter;
typedef TypeConverter<SourceTraits> SourceTypeConverter;

template<> const OutputDeviceConverter::Table OutputDeviceConverter::mTable[];
template<> const InputDeviceConverter::Table InputDeviceConverter::mTable[];
template<> const OutputFlagConverter::Table OutputFlagConverter::mTable[];
template<> const InputFlagConverter::Table InputFlagConverter::mTable[];
template<> const FormatConverter::Table FormatConverter::mTable[];
template<> const OutputChannelConverter::Table OutputChannelConverter::mTable[];
template<> const InputChannelConverter::Table InputChannelConverter::mTable[];
template<> const ChannelIndexConverter::Table ChannelIndexConverter::mTable[];
template<> const GainModeConverter::Table GainModeConverter::mTable[];
template<> const StreamTypeConverter::Table StreamTypeConverter::mTable[];
template<> const AudioModeConverter::Table AudioModeConverter::mTable[];
template<> const UsageTypeConverter::Table UsageTypeConverter::mTable[];
template<> const SourceTypeConverter::Table SourceTypeConverter::mTable[];

bool deviceFromString(const std::string& literalDevice, audio_devices_t& device);

bool deviceToString(audio_devices_t device, std::string& literalDevice);
+36 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "libmediametrics",

    srcs: [
        "IMediaAnalyticsService.cpp",
        "MediaAnalyticsItem.cpp",
    ],

    shared_libs: [
        "liblog",
        "libcutils",
        "libutils",
        "libbinder",
        "libstagefright_foundation",
        "libbase",
    ],

    export_include_dirs: ["include"],

    cflags: [
        "-Werror",
        "-Wno-error=deprecated-declarations",
        "-Wall",
    ],

    sanitize: {
        misc_undefined: [
            "unsigned-integer-overflow",
            "signed-integer-overflow",
        ],
        cfi: true,
        diag: {
            cfi: true,
        },
    },
}
Loading