Move things in InputWindowInfo to enum classes

Also introduce a new Flag class to make it possible to deal with flags
while treating the individual flags as part of an enum class in a type
safe manner.

Bug: 160010896
Test: atest inputflinger_tests, atest libinput_tests
Change-Id: I915a1c1e3b31f1c0fd99b83ba5fad7e537cd6f84
diff --git a/services/inputflinger/tests/InputFlingerService_test.cpp b/services/inputflinger/tests/InputFlingerService_test.cpp
index 6d50519..193fe77 100644
--- a/services/inputflinger/tests/InputFlingerService_test.cpp
+++ b/services/inputflinger/tests/InputFlingerService_test.cpp
@@ -57,8 +57,8 @@
 static const sp<IBinder> TestInfoToken = new BBinder();
 static constexpr int32_t TestInfoId = 1;
 static const std::string TestInfoName = "InputFlingerServiceTestInputWindowInfo";
-static constexpr int32_t TestInfoLayoutParamsFlags = 0xABCD;
-static constexpr int32_t TestInfoLayoutParamsType = 39;
+static constexpr Flags<InputWindowInfo::Flag> TestInfoFlags = InputWindowInfo::Flag::NOT_FOCUSABLE;
+static constexpr InputWindowInfo::Type TestInfoType = InputWindowInfo::Type::INPUT_METHOD;
 static constexpr std::chrono::duration TestInfoDispatchingTimeout = 2532ms;
 static constexpr int32_t TestInfoFrameLeft = 93;
 static constexpr int32_t TestInfoFrameTop = 34;
@@ -79,7 +79,8 @@
 static constexpr bool TestInfoPaused = false;
 static constexpr int32_t TestInfoOwnerPid = 19;
 static constexpr int32_t TestInfoOwnerUid = 24;
-static constexpr int32_t TestInfoInputFeatures = 29;
+static constexpr InputWindowInfo::Feature TestInfoInputFeatures =
+        InputWindowInfo::Feature::NO_INPUT_CHANNEL;
 static constexpr int32_t TestInfoDisplayId = 34;
 static constexpr int32_t TestInfoPortalToDisplayId = 2;
 static constexpr bool TestInfoReplaceTouchableRegionWithCrop = true;
@@ -265,8 +266,8 @@
     mInfo.token = TestInfoToken;
     mInfo.id = TestInfoId;
     mInfo.name = TestInfoName;
-    mInfo.layoutParamsFlags = TestInfoLayoutParamsFlags;
-    mInfo.layoutParamsType = TestInfoLayoutParamsType;
+    mInfo.flags = TestInfoFlags;
+    mInfo.type = TestInfoType;
     mInfo.dispatchingTimeout = TestInfoDispatchingTimeout;
     mInfo.frameLeft = TestInfoFrameLeft;
     mInfo.frameTop = TestInfoFrameTop;