Add createAxis to reduce the size of a function

While refactoring input code to enable -Wshadow, I encountered the block
of code inside JoystickInputMapper that is used to create an Axis
object. This creation can be moved to a separate function for
simplicity.

Bug: 142017994
Test: atest inputflinger_tests
Change-Id: I76088ab054dcf24585837016fb57d6f2500ca5e3
diff --git a/services/inputflinger/reader/mapper/JoystickInputMapper.h b/services/inputflinger/reader/mapper/JoystickInputMapper.h
index 823a096..29d5652 100644
--- a/services/inputflinger/reader/mapper/JoystickInputMapper.h
+++ b/services/inputflinger/reader/mapper/JoystickInputMapper.h
@@ -86,6 +86,9 @@
         }
     };
 
+    static Axis createAxis(const AxisInfo& AxisInfo, const RawAbsoluteAxisInfo& rawAxisInfo,
+                           bool explicitlyMapped);
+
     // Axes indexed by raw ABS_* axis index.
     KeyedVector<int32_t, Axis> mAxes;