Fix native input dispatch in the emulator.

Set a default orientation of ROTATION_0.
Added some more careful checks based on whether we have valid
absolute axis information from the driver.
Reset key repeating during configuration changes since the keyboard
device may have been removed.

Change-Id: I685960828acffcb17595fc5683309e8064a76714
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h
index 2093560..8f6777d 100644
--- a/include/ui/InputReader.h
+++ b/include/ui/InputReader.h
@@ -53,6 +53,8 @@
  */
 struct InputDevice {
     struct AbsoluteAxisInfo {
+        bool valid;        // set to true if axis parameters are known, false otherwise
+
         int32_t minValue;  // minimum value
         int32_t maxValue;  // maximum value
         int32_t range;     // range of values, equal to maxValue - minValue
@@ -272,9 +274,16 @@
         } jumpyTouchFilter;
 
         struct Precalculated {
+            int32_t xOrigin;
             float xScale;
+
+            int32_t yOrigin;
             float yScale;
+
+            int32_t pressureOrigin;
             float pressureScale;
+
+            int32_t sizeOrigin;
             float sizeScale;
         } precalculated;