Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -24528,6 +24528,7 @@ package android.view { method public float getMax(); method public float getMin(); method public float getRange(); method public float getResolution(); method public int getSource(); method public boolean isFromSource(int); } core/java/android/view/InputDevice.java +18 −5 Original line number Diff line number Diff line Loading @@ -371,8 +371,8 @@ public final class InputDevice implements Parcelable { if (axis < 0) { break; } addMotionRange(axis, in.readInt(), in.readFloat(), in.readFloat(), in.readFloat(), in.readFloat()); addMotionRange(axis, in.readInt(), in.readFloat(), in.readFloat(), in.readFloat(), in.readFloat(), in.readFloat()); } } Loading Loading @@ -584,8 +584,8 @@ public final class InputDevice implements Parcelable { // Called from native code. private void addMotionRange(int axis, int source, float min, float max, float flat, float fuzz) { mMotionRanges.add(new MotionRange(axis, source, min, max, flat, fuzz)); float min, float max, float flat, float fuzz, float resolution) { mMotionRanges.add(new MotionRange(axis, source, min, max, flat, fuzz, resolution)); } /** Loading Loading @@ -625,14 +625,17 @@ public final class InputDevice implements Parcelable { private float mMax; private float mFlat; private float mFuzz; private float mResolution; private MotionRange(int axis, int source, float min, float max, float flat, float fuzz) { private MotionRange(int axis, int source, float min, float max, float flat, float fuzz, float resolution) { mAxis = axis; mSource = source; mMin = min; mMax = max; mFlat = flat; mFuzz = fuzz; mResolution = resolution; } /** Loading Loading @@ -711,6 +714,14 @@ public final class InputDevice implements Parcelable { public float getFuzz() { return mFuzz; } /** * Gets the resolution for input device measurements with respect to this axis. * @return The resolution in units per millimeter, or units per radian for rotational axes. */ public float getResolution() { return mResolution; } } @Override Loading @@ -734,6 +745,7 @@ public final class InputDevice implements Parcelable { out.writeFloat(range.mMax); out.writeFloat(range.mFlat); out.writeFloat(range.mFuzz); out.writeFloat(range.mResolution); } out.writeInt(-1); } Loading Loading @@ -788,6 +800,7 @@ public final class InputDevice implements Parcelable { description.append(" max=").append(range.mMax); description.append(" flat=").append(range.mFlat); description.append(" fuzz=").append(range.mFuzz); description.append(" resolution=").append(range.mResolution); description.append("\n"); } return description.toString(); Loading core/jni/android_view_InputDevice.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -62,8 +62,8 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi const Vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges(); for (size_t i = 0; i < ranges.size(); i++) { const InputDeviceInfo::MotionRange& range = ranges.itemAt(i); env->CallVoidMethod(inputDeviceObj.get(), gInputDeviceClassInfo.addMotionRange, range.axis, range.source, range.min, range.max, range.flat, range.fuzz); env->CallVoidMethod(inputDeviceObj.get(), gInputDeviceClassInfo.addMotionRange, range.axis, range.source, range.min, range.max, range.flat, range.fuzz, range.resolution); if (env->ExceptionCheck()) { return NULL; } Loading @@ -90,7 +90,7 @@ int register_android_view_InputDevice(JNIEnv* env) "<init>", "(IILjava/lang/String;Ljava/lang/String;ZIILandroid/view/KeyCharacterMap;Z)V"); GET_METHOD_ID(gInputDeviceClassInfo.addMotionRange, gInputDeviceClassInfo.clazz, "addMotionRange", "(IIFFFF)V"); "addMotionRange", "(IIFFFFF)V"); return 0; } Loading include/androidfw/InputDevice.h +2 −1 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public: float max; float flat; float fuzz; float resolution; }; void initialize(int32_t id, int32_t generation, const InputDeviceIdentifier& identifier, Loading @@ -83,7 +84,7 @@ public: void addSource(uint32_t source); void addMotionRange(int32_t axis, uint32_t source, float min, float max, float flat, float fuzz); float min, float max, float flat, float fuzz, float resolution); void addMotionRange(const MotionRange& range); inline void setKeyboardType(int32_t keyboardType) { mKeyboardType = keyboardType; } Loading libs/androidfw/InputDevice.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -172,8 +172,8 @@ void InputDeviceInfo::addSource(uint32_t source) { } void InputDeviceInfo::addMotionRange(int32_t axis, uint32_t source, float min, float max, float flat, float fuzz) { MotionRange range = { axis, source, min, max, flat, fuzz }; float flat, float fuzz, float resolution) { MotionRange range = { axis, source, min, max, flat, fuzz, resolution }; mMotionRanges.add(range); } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -24528,6 +24528,7 @@ package android.view { method public float getMax(); method public float getMin(); method public float getRange(); method public float getResolution(); method public int getSource(); method public boolean isFromSource(int); }
core/java/android/view/InputDevice.java +18 −5 Original line number Diff line number Diff line Loading @@ -371,8 +371,8 @@ public final class InputDevice implements Parcelable { if (axis < 0) { break; } addMotionRange(axis, in.readInt(), in.readFloat(), in.readFloat(), in.readFloat(), in.readFloat()); addMotionRange(axis, in.readInt(), in.readFloat(), in.readFloat(), in.readFloat(), in.readFloat(), in.readFloat()); } } Loading Loading @@ -584,8 +584,8 @@ public final class InputDevice implements Parcelable { // Called from native code. private void addMotionRange(int axis, int source, float min, float max, float flat, float fuzz) { mMotionRanges.add(new MotionRange(axis, source, min, max, flat, fuzz)); float min, float max, float flat, float fuzz, float resolution) { mMotionRanges.add(new MotionRange(axis, source, min, max, flat, fuzz, resolution)); } /** Loading Loading @@ -625,14 +625,17 @@ public final class InputDevice implements Parcelable { private float mMax; private float mFlat; private float mFuzz; private float mResolution; private MotionRange(int axis, int source, float min, float max, float flat, float fuzz) { private MotionRange(int axis, int source, float min, float max, float flat, float fuzz, float resolution) { mAxis = axis; mSource = source; mMin = min; mMax = max; mFlat = flat; mFuzz = fuzz; mResolution = resolution; } /** Loading Loading @@ -711,6 +714,14 @@ public final class InputDevice implements Parcelable { public float getFuzz() { return mFuzz; } /** * Gets the resolution for input device measurements with respect to this axis. * @return The resolution in units per millimeter, or units per radian for rotational axes. */ public float getResolution() { return mResolution; } } @Override Loading @@ -734,6 +745,7 @@ public final class InputDevice implements Parcelable { out.writeFloat(range.mMax); out.writeFloat(range.mFlat); out.writeFloat(range.mFuzz); out.writeFloat(range.mResolution); } out.writeInt(-1); } Loading Loading @@ -788,6 +800,7 @@ public final class InputDevice implements Parcelable { description.append(" max=").append(range.mMax); description.append(" flat=").append(range.mFlat); description.append(" fuzz=").append(range.mFuzz); description.append(" resolution=").append(range.mResolution); description.append("\n"); } return description.toString(); Loading
core/jni/android_view_InputDevice.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -62,8 +62,8 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi const Vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges(); for (size_t i = 0; i < ranges.size(); i++) { const InputDeviceInfo::MotionRange& range = ranges.itemAt(i); env->CallVoidMethod(inputDeviceObj.get(), gInputDeviceClassInfo.addMotionRange, range.axis, range.source, range.min, range.max, range.flat, range.fuzz); env->CallVoidMethod(inputDeviceObj.get(), gInputDeviceClassInfo.addMotionRange, range.axis, range.source, range.min, range.max, range.flat, range.fuzz, range.resolution); if (env->ExceptionCheck()) { return NULL; } Loading @@ -90,7 +90,7 @@ int register_android_view_InputDevice(JNIEnv* env) "<init>", "(IILjava/lang/String;Ljava/lang/String;ZIILandroid/view/KeyCharacterMap;Z)V"); GET_METHOD_ID(gInputDeviceClassInfo.addMotionRange, gInputDeviceClassInfo.clazz, "addMotionRange", "(IIFFFF)V"); "addMotionRange", "(IIFFFFF)V"); return 0; } Loading
include/androidfw/InputDevice.h +2 −1 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public: float max; float flat; float fuzz; float resolution; }; void initialize(int32_t id, int32_t generation, const InputDeviceIdentifier& identifier, Loading @@ -83,7 +84,7 @@ public: void addSource(uint32_t source); void addMotionRange(int32_t axis, uint32_t source, float min, float max, float flat, float fuzz); float min, float max, float flat, float fuzz, float resolution); void addMotionRange(const MotionRange& range); inline void setKeyboardType(int32_t keyboardType) { mKeyboardType = keyboardType; } Loading
libs/androidfw/InputDevice.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -172,8 +172,8 @@ void InputDeviceInfo::addSource(uint32_t source) { } void InputDeviceInfo::addMotionRange(int32_t axis, uint32_t source, float min, float max, float flat, float fuzz) { MotionRange range = { axis, source, min, max, flat, fuzz }; float flat, float fuzz, float resolution) { MotionRange range = { axis, source, min, max, flat, fuzz, resolution }; mMotionRanges.add(range); } Loading