Skip to content

Commit 0e2df84

Browse files
committed
input: run bpfmt -w -s on all Android.bp files
The bpfmt presubmit lint check has been reporting formatting issues on some recent CLs, so just make all the suggested formatting fixes in one CL to get them out of the way. This CL was made by running the following command: $ prebuilts/build-tools/linux-x86/bin/bpfmt -w -s \ frameworks/native/libs/input/**Android.bp frameworks/native/services/inputflinger/**Android.bp The only manual change was in services/inputflinger/Android.bp, where I removed the comments from the checkinput target's required list, since they don't make sense if it's just going to be alphabetically sorted. Bug: 245989146 Change-Id: Ie1d38c8ac1cab1c2011176f8d566cc922305d0b5 Test: Treehugger Flag: EXEMPT refactor
1 parent 3c090f8 commit 0e2df84

7 files changed

Lines changed: 101 additions & 110 deletions

File tree

libs/input/Android.bp

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ filegroup {
2727
name: "inputconstants_aidl",
2828
srcs: [
2929
"android/os/IInputConstants.aidl",
30+
"android/os/InputConfig.aidl",
3031
"android/os/InputEventInjectionResult.aidl",
3132
"android/os/InputEventInjectionSync.aidl",
32-
"android/os/InputConfig.aidl",
3333
"android/os/MotionEventFlag.aidl",
3434
"android/os/PointerIconType.aidl",
3535
],
@@ -85,56 +85,56 @@ rust_bindgen {
8585
source_stem: "bindings",
8686

8787
bindgen_flags: [
88-
"--verbose",
89-
"--allowlist-var=AMOTION_EVENT_ACTION_CANCEL",
90-
"--allowlist-var=AMOTION_EVENT_ACTION_UP",
91-
"--allowlist-var=AMOTION_EVENT_ACTION_POINTER_DOWN",
92-
"--allowlist-var=AMOTION_EVENT_ACTION_DOWN",
93-
"--allowlist-var=AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT",
94-
"--allowlist-var=MAX_POINTER_ID",
95-
"--allowlist-var=AINPUT_SOURCE_CLASS_NONE",
88+
"--allowlist-var=AINPUT_KEYBOARD_TYPE_ALPHABETIC",
89+
"--allowlist-var=AINPUT_KEYBOARD_TYPE_NONE",
90+
"--allowlist-var=AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC",
91+
"--allowlist-var=AINPUT_SOURCE_BLUETOOTH_STYLUS",
9692
"--allowlist-var=AINPUT_SOURCE_CLASS_BUTTON",
97-
"--allowlist-var=AINPUT_SOURCE_CLASS_POINTER",
93+
"--allowlist-var=AINPUT_SOURCE_CLASS_JOYSTICK",
9894
"--allowlist-var=AINPUT_SOURCE_CLASS_NAVIGATION",
95+
"--allowlist-var=AINPUT_SOURCE_CLASS_NONE",
96+
"--allowlist-var=AINPUT_SOURCE_CLASS_POINTER",
9997
"--allowlist-var=AINPUT_SOURCE_CLASS_POSITION",
100-
"--allowlist-var=AINPUT_SOURCE_CLASS_JOYSTICK",
101-
"--allowlist-var=AINPUT_SOURCE_UNKNOWN",
102-
"--allowlist-var=AINPUT_SOURCE_KEYBOARD",
10398
"--allowlist-var=AINPUT_SOURCE_DPAD",
10499
"--allowlist-var=AINPUT_SOURCE_GAMEPAD",
105-
"--allowlist-var=AINPUT_SOURCE_TOUCHSCREEN",
100+
"--allowlist-var=AINPUT_SOURCE_HDMI",
101+
"--allowlist-var=AINPUT_SOURCE_JOYSTICK",
102+
"--allowlist-var=AINPUT_SOURCE_KEYBOARD",
106103
"--allowlist-var=AINPUT_SOURCE_MOUSE",
107-
"--allowlist-var=AINPUT_SOURCE_STYLUS",
108-
"--allowlist-var=AINPUT_SOURCE_BLUETOOTH_STYLUS",
109-
"--allowlist-var=AINPUT_SOURCE_TRACKBALL",
110104
"--allowlist-var=AINPUT_SOURCE_MOUSE_RELATIVE",
105+
"--allowlist-var=AINPUT_SOURCE_ROTARY_ENCODER",
106+
"--allowlist-var=AINPUT_SOURCE_SENSOR",
107+
"--allowlist-var=AINPUT_SOURCE_STYLUS",
111108
"--allowlist-var=AINPUT_SOURCE_TOUCHPAD",
109+
"--allowlist-var=AINPUT_SOURCE_TOUCHSCREEN",
112110
"--allowlist-var=AINPUT_SOURCE_TOUCH_NAVIGATION",
113-
"--allowlist-var=AINPUT_SOURCE_JOYSTICK",
114-
"--allowlist-var=AINPUT_SOURCE_HDMI",
115-
"--allowlist-var=AINPUT_SOURCE_SENSOR",
116-
"--allowlist-var=AINPUT_SOURCE_ROTARY_ENCODER",
117-
"--allowlist-var=AINPUT_KEYBOARD_TYPE_NONE",
118-
"--allowlist-var=AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC",
119-
"--allowlist-var=AINPUT_KEYBOARD_TYPE_ALPHABETIC",
120-
"--allowlist-var=AMETA_NONE",
121-
"--allowlist-var=AMETA_ALT_ON",
111+
"--allowlist-var=AINPUT_SOURCE_TRACKBALL",
112+
"--allowlist-var=AINPUT_SOURCE_UNKNOWN",
122113
"--allowlist-var=AMETA_ALT_LEFT_ON",
114+
"--allowlist-var=AMETA_ALT_ON",
123115
"--allowlist-var=AMETA_ALT_RIGHT_ON",
124-
"--allowlist-var=AMETA_SHIFT_ON",
125-
"--allowlist-var=AMETA_SHIFT_LEFT_ON",
126-
"--allowlist-var=AMETA_SHIFT_RIGHT_ON",
127-
"--allowlist-var=AMETA_SYM_ON",
128-
"--allowlist-var=AMETA_FUNCTION_ON",
129-
"--allowlist-var=AMETA_CTRL_ON",
116+
"--allowlist-var=AMETA_CAPS_LOCK_ON",
130117
"--allowlist-var=AMETA_CTRL_LEFT_ON",
118+
"--allowlist-var=AMETA_CTRL_ON",
131119
"--allowlist-var=AMETA_CTRL_RIGHT_ON",
132-
"--allowlist-var=AMETA_META_ON",
120+
"--allowlist-var=AMETA_FUNCTION_ON",
133121
"--allowlist-var=AMETA_META_LEFT_ON",
122+
"--allowlist-var=AMETA_META_ON",
134123
"--allowlist-var=AMETA_META_RIGHT_ON",
135-
"--allowlist-var=AMETA_CAPS_LOCK_ON",
124+
"--allowlist-var=AMETA_NONE",
136125
"--allowlist-var=AMETA_NUM_LOCK_ON",
137126
"--allowlist-var=AMETA_SCROLL_LOCK_ON",
127+
"--allowlist-var=AMETA_SHIFT_LEFT_ON",
128+
"--allowlist-var=AMETA_SHIFT_ON",
129+
"--allowlist-var=AMETA_SHIFT_RIGHT_ON",
130+
"--allowlist-var=AMETA_SYM_ON",
131+
"--allowlist-var=AMOTION_EVENT_ACTION_CANCEL",
132+
"--allowlist-var=AMOTION_EVENT_ACTION_DOWN",
133+
"--allowlist-var=AMOTION_EVENT_ACTION_POINTER_DOWN",
134+
"--allowlist-var=AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT",
135+
"--allowlist-var=AMOTION_EVENT_ACTION_UP",
136+
"--allowlist-var=MAX_POINTER_ID",
137+
"--verbose",
138138
],
139139

140140
static_libs: [
@@ -143,9 +143,9 @@ rust_bindgen {
143143
],
144144
shared_libs: ["libc++"],
145145
header_libs: [
146-
"native_headers",
147-
"jni_headers",
148146
"flatbuffer_headers",
147+
"jni_headers",
148+
"native_headers",
149149
],
150150
}
151151

@@ -179,8 +179,8 @@ cc_library_static {
179179
host_supported: true,
180180
cflags: [
181181
"-Wall",
182-
"-Wextra",
183182
"-Werror",
183+
"-Wextra",
184184
],
185185
srcs: [
186186
"FromRustToCpp.cpp",
@@ -205,15 +205,15 @@ cc_library {
205205
cpp_std: "c++20",
206206
host_supported: true,
207207
cflags: [
208+
"-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
208209
"-Wall",
209-
"-Wextra",
210210
"-Werror",
211+
"-Wextra",
211212
"-Wno-unused-parameter",
212-
"-Wthread-safety",
213213
"-Wshadow",
214214
"-Wshadow-field-in-constructor-modified",
215215
"-Wshadow-uncaptured-local",
216-
"-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
216+
"-Wthread-safety",
217217
],
218218
srcs: [
219219
"AccelerationCurve.cpp",
@@ -225,10 +225,10 @@ cc_library {
225225
"InputEventLabels.cpp",
226226
"InputTransport.cpp",
227227
"InputVerifier.cpp",
228-
"Keyboard.cpp",
229228
"KeyCharacterMap.cpp",
230-
"KeyboardClassifier.cpp",
231229
"KeyLayoutMap.cpp",
230+
"Keyboard.cpp",
231+
"KeyboardClassifier.cpp",
232232
"MotionPredictor.cpp",
233233
"MotionPredictorMetricsManager.cpp",
234234
"OneEuroFilter.cpp",
@@ -262,13 +262,13 @@ cc_library {
262262

263263
shared_libs: [
264264
"android.companion.virtualdevice.flags-aconfig-cc",
265+
"libPlatformProperties",
265266
"libaconfig_storage_read_api_cc",
266267
"libbase",
267268
"libbinder",
268269
"libbinder_ndk",
269270
"libcutils",
270271
"liblog",
271-
"libPlatformProperties",
272272
"libtinyxml2",
273273
"libutils",
274274
"libz", // needed by libkernelconfigs
@@ -287,15 +287,15 @@ cc_library {
287287

288288
static_libs: [
289289
"inputconstants-cpp",
290-
"libui-types",
291-
"libtflite_static",
292290
"libkernelconfigs",
291+
"libtflite_static",
292+
"libui-types",
293293
],
294294

295295
whole_static_libs: [
296296
"com.android.input.flags-aconfig-cc",
297-
"libinput_rust_ffi",
298297
"iinputflinger_aidl_lib_static",
298+
"libinput_rust_ffi",
299299
],
300300

301301
export_static_lib_headers: [
@@ -310,8 +310,8 @@ cc_library {
310310
target: {
311311
android: {
312312
required: [
313-
"motion_predictor_model_prebuilt",
314313
"motion_predictor_model_config",
314+
"motion_predictor_model_prebuilt",
315315
],
316316
static_libs: [
317317
"libstatslog_libinput",
@@ -372,9 +372,9 @@ cc_defaults {
372372
cpp_std: "c++20",
373373
host_supported: true,
374374
shared_libs: [
375-
"libutils",
376375
"libbase",
377376
"liblog",
377+
"libutils",
378378
],
379379
}
380380

libs/input/rust/Android.bp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ rust_defaults {
1818
srcs: ["lib.rs"],
1919
host_supported: true,
2020
rustlibs: [
21+
"inputconstants-rust",
2122
"libbitflags",
2223
"libcxx",
2324
"libinput_bindgen",
24-
"liblogger",
2525
"liblog_rust",
26-
"inputconstants-rust",
26+
"liblogger",
2727
"libserde",
2828
"libserde_json",
2929
],

libs/input/tests/Android.bp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ cc_test {
1616
"BlockingQueue_test.cpp",
1717
"IdGenerator_test.cpp",
1818
"InputChannel_test.cpp",
19-
"InputConsumer_test.cpp",
2019
"InputConsumerFilteredResampling_test.cpp",
2120
"InputConsumerResampling_test.cpp",
21+
"InputConsumer_test.cpp",
2222
"InputDevice_test.cpp",
2323
"InputEvent_test.cpp",
24-
"InputPublisherAndConsumer_test.cpp",
2524
"InputPublisherAndConsumerNoResampling_test.cpp",
25+
"InputPublisherAndConsumer_test.cpp",
2626
"InputVerifier_test.cpp",
27-
"MotionPredictor_test.cpp",
2827
"MotionPredictorMetricsManager_test.cpp",
28+
"MotionPredictor_test.cpp",
2929
"OneEuroFilter_test.cpp",
3030
"Resampler_test.cpp",
3131
"RingBuffer_test.cpp",
@@ -53,8 +53,8 @@ cc_test {
5353
],
5454
cflags: [
5555
"-Wall",
56-
"-Wextra",
5756
"-Werror",
57+
"-Wextra",
5858
"-Wno-unused-parameter",
5959
],
6060
sanitize: {
@@ -68,26 +68,26 @@ cc_test {
6868
memtag_heap: true,
6969
undefined: true,
7070
misc_undefined: [
71-
"bounds",
7271
"all",
72+
"bounds",
7373
],
7474
},
7575
},
7676
shared_libs: [
77+
"libPlatformProperties",
7778
"libaconfig_storage_read_api_cc",
7879
"libbase",
7980
"libbinder",
8081
"libcutils",
8182
"liblog",
82-
"libPlatformProperties",
8383
"libstatslog",
8484
"libtinyxml2",
8585
"libutils",
8686
"server_configurable_flags",
8787
],
8888
data: [
89-
"data/*",
9089
":motion_predictor_model",
90+
"data/*",
9191
],
9292
test_options: {
9393
unit_test: true,
@@ -117,10 +117,10 @@ cc_library_static {
117117
"-Wextra",
118118
],
119119
shared_libs: [
120-
"libinput",
120+
"libbase",
121+
"libbinder",
121122
"libcutils",
123+
"libinput",
122124
"libutils",
123-
"libbinder",
124-
"libbase",
125125
],
126126
}

0 commit comments

Comments
 (0)