Files
frameworks_base/tools/validatekeymaps/Android.bp
Siarhei Vishniakou df6630ae1f Require CONFIG_HID_PLAYSTATION for DualSense key layout
Some olders kernels don't yet support HID_PLAYSTATION. While they are
working on supporting this driver, provide this temporary solution.

Before this patch, if the key layout is loaded, but there is no
HID_PLAYSTATION, then the mappings on the device will be incorrect.

With this patch, this key layout will not be loaded unless there is a
CONFIG_HID_PLAYSTATION enabled on the device.

Instead, when the main layout cannot be loaded, we make another attempt
to load a fallback layout. This way, the mappings on DualSense can be
correct even if the HID_PLAYSTATION module is not loaded.

In this CL, the fallback layout was tested using controllerTester.

Bug: 228005926
Test: tested mappings with a DualSense controller on a device that does
not have CONFIG_HID_PLAYSTATION

Change-Id: I7e46ae1943cd2c63b8c0b03fdf5d71adeea89f6f
2022-06-03 14:12:29 -07:00

54 lines
1.1 KiB
Plaintext

//
// Copyright 2010 The Android Open Source Project
//
// Keymap validation tool.
//
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
cc_binary_host {
name: "validatekeymaps",
srcs: ["Main.cpp"],
cflags: [
"-Wall",
"-Werror",
"-Wextra",
],
static_libs: [
"libbase",
"libinput",
"libutils",
"libcutils",
"liblog",
"libui-types",
],
shared_libs: [
"libvintf",
],
target: {
host_linux: {
static_libs: [
// libbinder is only available for linux
"libbinder",
],
},
},
// This tool is prebuilt if we're doing an app-only build.
product_variables: {
unbundled_build: {
enabled: false,
},
},
}