Add INVALID_INPUT_DEVICE_ID to IInputConstants
The ID is used to reference invalid input devices before they are
initialized. For consistency the INVALID_INPUT_DEVICE_ID is also added
to the ReservcedInputDeviceId enum.
Test: Tested as part of ag/20002215
Bug: 244516415
Change-Id: I2055e8668780ecbcfdc201422fc1fd5ab3549ab6
diff --git a/include/input/InputDevice.h b/include/input/InputDevice.h
index f4a1523..ac9c5a5 100644
--- a/include/input/InputDevice.h
+++ b/include/input/InputDevice.h
@@ -23,6 +23,7 @@
#include <unordered_map>
#include <vector>
+#include <android/os/IInputConstants.h>
#include "android/hardware/input/InputDeviceCountryCode.h"
namespace android {
@@ -346,6 +347,8 @@
const std::string& name, InputDeviceConfigurationFileType type);
enum ReservedInputDeviceId : int32_t {
+ // Device id representing an invalid device
+ INVALID_INPUT_DEVICE_ID = android::os::IInputConstants::INVALID_INPUT_DEVICE_ID,
// Device id of a special "virtual" keyboard that is always present.
VIRTUAL_KEYBOARD_ID = -1,
// Device id of the "built-in" keyboard if there is one.