• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20soong_config_module_type {
21    name: "haptics_feature_cc_defaults",
22    module_type: "cc_defaults",
23    config_namespace: "haptics",
24    variables: [
25        "actuator_model",
26        "adaptive_haptics_feature",
27    ],
28    properties: ["cflags"],
29}
30
31soong_config_string_variable {
32    name: "actuator_model",
33    values: [
34        "luxshare_ict_081545",
35        "luxshare_ict_lt_xlra1906d",
36    ],
37}
38
39soong_config_string_variable {
40    name: "adaptive_haptics_feature",
41    values: [
42        "adaptive_haptics_v1",
43    ],
44}
45
46haptics_feature_cc_defaults {
47    name: "haptics_feature_defaults",
48    soong_config_variables: {
49        actuator_model: {
50            luxshare_ict_081545: {
51                cflags: [
52                    "-DLUXSHARE_ICT_081545",
53                ],
54            },
55            luxshare_ict_lt_xlra1906d: {
56                cflags: [
57                    "-DLUXSHARE_ICT_LT_XLRA1906D",
58                ],
59            },
60        },
61        adaptive_haptics_feature: {
62            adaptive_haptics_v1: {
63                cflags: [
64                    "-DADAPTIVE_HAPTICS_V1",
65                ],
66            },
67            conditions_default: {
68                cflags: [
69                    "-DDISABLE_ADAPTIVE_HAPTICS_FEATURE",
70                ],
71            },
72        }
73    },
74}
75
76cc_library {
77    name: "libvibecapo_proto",
78    vendor_available: true,
79    owner: "google",
80    defaults: [
81        "VibratorHalCs40l26BinaryDefaults",
82    ],
83    srcs: [
84        "proto/capo.proto",
85    ],
86    export_include_dirs: [
87        "proto",
88    ],
89    proto: {
90        type: "lite",
91        export_proto_headers: true,
92    },
93}
94
95cc_library {
96    name: "VibratorCapo",
97    defaults: [
98        "PixelVibratorBinaryDefaults",
99        "haptics_feature_defaults",
100    ],
101    srcs: [
102        "CapoDetector.cpp",
103    ],
104    shared_libs: [
105        "libcutils",
106        "libprotobuf-cpp-lite",
107    ],
108    static_libs: [
109        "chre_client",
110        "libvibecapo_proto",
111    ],
112    export_include_dirs: [
113        "proto",
114        ".",
115    ],
116    export_static_lib_headers: [
117        "libvibecapo_proto",
118    ],
119    vendor_available: true,
120}
121
122cc_defaults {
123    name: "VibratorCapoDefaults",
124    static_libs: [
125        "chre_client",
126        "libvibecapo_proto",
127        "VibratorCapo",
128    ],
129    shared_libs: [
130        "libprotobuf-cpp-lite",
131    ],
132}
133
134cc_library {
135    name: "PixelVibratorCommon",
136    srcs: [
137        "HardwareBase.cpp",
138    ],
139    shared_libs: [
140        "libbase",
141        "libcutils",
142        "liblog",
143        "libutils",
144    ],
145    cflags: [
146        "-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)",
147        "-DLOG_TAG=\"VibratorCommon\"",
148    ],
149    export_include_dirs: ["."],
150    vendor_available: true,
151}
152
153cc_library {
154    name: "PixelVibratorStats",
155    vendor: true,
156    srcs: ["StatsBase.cpp"],
157    cflags: [
158        "-Werror",
159        "-Wall",
160        "-Wextra",
161        "-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)",
162        "-DLOG_TAG=\"VibratorStats\"",
163    ],
164    shared_libs: [
165        "android.frameworks.stats-V2-ndk",
166        "libbase",
167        "libcutils",
168        "libbinder_ndk",
169        "liblog",
170        "libprotobuf-cpp-lite",
171        "libutils",
172        "pixelatoms-cpp",
173    ],
174}
175