lin
2025-08-20 171e08343a9b6df6c31197f5b4800e8004800f5b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
cc_library_headers {
    name: "libaudioclient_headers",
    vendor_available: true,
    export_include_dirs: ["include"],
}
 
cc_library_shared {
    name: "libaudiopolicy",
    srcs: [
        "AudioAttributes.cpp",
        "AudioPolicy.cpp",
        "AudioProductStrategy.cpp",
        "AudioVolumeGroup.cpp",
    ],
    shared_libs: [
        "libaudioutils",
        "libbinder",
        "libcutils",
        "liblog",
        "libutils",
    ],
    cflags: [
        "-Werror",
        "-Wall",
    ],
    include_dirs: ["system/media/audio_utils/include"],
    export_include_dirs: ["include"],
}
 
cc_library_shared {
    name: "libaudioclient",
 
    aidl: {
        export_aidl_headers: true,
        local_include_dirs: ["aidl"],
        include_dirs: [
            "frameworks/av/media/libaudioclient/aidl",
        ],
    },
 
    srcs: [
        // AIDL files for audioclient interfaces
        // The headers for these interfaces will be available to any modules that
        // include libaudioclient, at the path "aidl/package/path/BnFoo.h"
        "aidl/android/media/IAudioRecord.aidl",
        ":libaudioclient_aidl",
 
        "AudioEffect.cpp",
        "AudioRecord.cpp",
        "AudioSystem.cpp",
        "AudioTrack.cpp",
        "AudioTrackShared.cpp",
        "IAudioFlinger.cpp",
        "IAudioFlingerClient.cpp",
        "IAudioPolicyService.cpp",
        "IAudioPolicyServiceClient.cpp",
        "IAudioTrack.cpp",
        "IEffect.cpp",
        "IEffectClient.cpp",
        "ToneGenerator.cpp",
        "PlayerBase.cpp",
        "RecordingActivityTracker.cpp",
        "TrackPlayerBase.cpp",
    ],
    shared_libs: [
        "libaudioutils",
        "libaudiopolicy",
        "libaudiomanager",
        "libbinder",
        "libcutils",
        "libdl",
        "liblog",
        "libmedia_helper",
        "libmediametrics",
        "libmediautils",
        "libnblog",
        "libprocessgroup",
        "libutils",
        "libvibrator",
    ],
    export_shared_lib_headers: ["libbinder"],
 
    local_include_dirs: ["include/media", "aidl"],
    header_libs: [
        "libaudioclient_headers",
        "libbase_headers",
    ],
    export_header_lib_headers: ["libaudioclient_headers"],
 
    // for memory heap analysis
    static_libs: [
        "libc_malloc_debug_backtrace",
    ],
    cflags: [
        "-Wall",
        "-Werror",
        "-Wno-error=deprecated-declarations",
    ],
    sanitize: {
        misc_undefined : [
            "unsigned-integer-overflow",
            "signed-integer-overflow",
        ],
    },
}
 
// AIDL interface between libaudioclient and framework.jar
filegroup {
    name: "libaudioclient_aidl",
    srcs: [
        "aidl/android/media/IPlayer.aidl",
    ],
}