Loading core/java/android/view/InputDevice.java +2 −23 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ public final class InputDevice implements Parcelable { private final String mKeyboardLayoutType; private final boolean mHasVibrator; private final boolean mHasMicrophone; private final boolean mHasButtonUnderPad; private final boolean mHasSensor; private final boolean mHasBattery; private final HostUsiVersion mHostUsiVersion; Loading Loading @@ -502,8 +501,8 @@ public final class InputDevice implements Parcelable { int productId, int deviceBus, String descriptor, boolean isExternal, int sources, int keyboardType, KeyCharacterMap keyCharacterMap, @Nullable String keyboardLanguageTag, @Nullable String keyboardLayoutType, boolean hasVibrator, boolean hasMicrophone, boolean hasButtonUnderPad, boolean hasSensor, boolean hasBattery, int usiVersionMajor, int usiVersionMinor, int associatedDisplayId, boolean enabled) { boolean hasSensor, boolean hasBattery, int usiVersionMajor, int usiVersionMinor, int associatedDisplayId, boolean enabled) { mId = id; mGeneration = generation; mControllerNumber = controllerNumber; Loading @@ -528,7 +527,6 @@ public final class InputDevice implements Parcelable { mKeyboardLayoutType = keyboardLayoutType; mHasVibrator = hasVibrator; mHasMicrophone = hasMicrophone; mHasButtonUnderPad = hasButtonUnderPad; mHasSensor = hasSensor; mHasBattery = hasBattery; mIdentifier = new InputDeviceIdentifier(descriptor, vendorId, productId); Loading @@ -554,7 +552,6 @@ public final class InputDevice implements Parcelable { mKeyboardLayoutType = in.readString8(); mHasVibrator = in.readInt() != 0; mHasMicrophone = in.readInt() != 0; mHasButtonUnderPad = in.readInt() != 0; mHasSensor = in.readInt() != 0; mHasBattery = in.readInt() != 0; mHostUsiVersion = HostUsiVersion.CREATOR.createFromParcel(in); Loading Loading @@ -596,7 +593,6 @@ public final class InputDevice implements Parcelable { private KeyCharacterMap mKeyCharacterMap = null; private boolean mHasVibrator = false; private boolean mHasMicrophone = false; private boolean mHasButtonUnderPad = false; private boolean mHasSensor = false; private boolean mHasBattery = false; private String mKeyboardLanguageTag = null; Loading Loading @@ -693,12 +689,6 @@ public final class InputDevice implements Parcelable { return this; } /** @see InputDevice#hasButtonUnderPad() */ public Builder setHasButtonUnderPad(boolean hasButtonUnderPad) { mHasButtonUnderPad = hasButtonUnderPad; return this; } /** @see InputDevice#hasSensor() */ public Builder setHasSensor(boolean hasSensor) { mHasSensor = hasSensor; Loading Loading @@ -778,7 +768,6 @@ public final class InputDevice implements Parcelable { mKeyboardLayoutType, mHasVibrator, mHasMicrophone, mHasButtonUnderPad, mHasSensor, mHasBattery, mUsiVersionMajor, Loading Loading @@ -1366,15 +1355,6 @@ public final class InputDevice implements Parcelable { return mHasMicrophone; } /** * Reports whether the device has a button under its touchpad * @return Whether the device has a button under its touchpad * @hide */ public boolean hasButtonUnderPad() { return mHasButtonUnderPad; } /** * Reports whether the device has a sensor. * @return Whether the device has a sensor. Loading Loading @@ -1618,7 +1598,6 @@ public final class InputDevice implements Parcelable { out.writeString8(mKeyboardLayoutType); out.writeInt(mHasVibrator ? 1 : 0); out.writeInt(mHasMicrophone ? 1 : 0); out.writeInt(mHasButtonUnderPad ? 1 : 0); out.writeInt(mHasSensor ? 1 : 0); out.writeInt(mHasBattery ? 1 : 0); mHostUsiVersion.writeToParcel(out, flags); Loading core/jni/android_view_InputDevice.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -87,9 +87,8 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi deviceInfo.getKeyboardType(), kcmObj.get(), keyboardLanguageTagObj.get(), keyboardLayoutTypeObj.get(), deviceInfo.hasVibrator(), deviceInfo.hasMic(), deviceInfo.hasButtonUnderPad(), deviceInfo.hasSensor(), deviceInfo.hasBattery(), usiVersion.majorVersion, usiVersion.minorVersion, deviceInfo.hasSensor(), deviceInfo.hasBattery(), usiVersion.majorVersion, usiVersion.minorVersion, deviceInfo.getAssociatedDisplayId(), deviceInfo.isEnabled())); // Note: We do not populate the Bluetooth address into the InputDevice object to avoid leaking Loading Loading @@ -127,7 +126,7 @@ int register_android_view_InputDevice(JNIEnv* env) gInputDeviceClassInfo.ctor = GetMethodIDOrDie(env, gInputDeviceClassInfo.clazz, "<init>", "(IIILjava/lang/String;IIILjava/lang/" "String;ZIILandroid/view/KeyCharacterMap;Ljava/" "lang/String;Ljava/lang/String;ZZZZZIIIZ)V"); "lang/String;Ljava/lang/String;ZZZZIIIZ)V"); gInputDeviceClassInfo.addMotionRange = GetMethodIDOrDie(env, gInputDeviceClassInfo.clazz, "addMotionRange", "(IIFFFFF)V"); Loading tests/Input/src/com/android/test/input/InputDeviceTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,6 @@ public class InputDeviceTest { .setKeyCharacterMap(keyCharacterMap) .setHasVibrator(true) .setHasMicrophone(true) .setHasButtonUnderPad(true) .setHasSensor(true) .setHasBattery(true) .setKeyboardLanguageTag("en-US") Loading Loading
core/java/android/view/InputDevice.java +2 −23 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ public final class InputDevice implements Parcelable { private final String mKeyboardLayoutType; private final boolean mHasVibrator; private final boolean mHasMicrophone; private final boolean mHasButtonUnderPad; private final boolean mHasSensor; private final boolean mHasBattery; private final HostUsiVersion mHostUsiVersion; Loading Loading @@ -502,8 +501,8 @@ public final class InputDevice implements Parcelable { int productId, int deviceBus, String descriptor, boolean isExternal, int sources, int keyboardType, KeyCharacterMap keyCharacterMap, @Nullable String keyboardLanguageTag, @Nullable String keyboardLayoutType, boolean hasVibrator, boolean hasMicrophone, boolean hasButtonUnderPad, boolean hasSensor, boolean hasBattery, int usiVersionMajor, int usiVersionMinor, int associatedDisplayId, boolean enabled) { boolean hasSensor, boolean hasBattery, int usiVersionMajor, int usiVersionMinor, int associatedDisplayId, boolean enabled) { mId = id; mGeneration = generation; mControllerNumber = controllerNumber; Loading @@ -528,7 +527,6 @@ public final class InputDevice implements Parcelable { mKeyboardLayoutType = keyboardLayoutType; mHasVibrator = hasVibrator; mHasMicrophone = hasMicrophone; mHasButtonUnderPad = hasButtonUnderPad; mHasSensor = hasSensor; mHasBattery = hasBattery; mIdentifier = new InputDeviceIdentifier(descriptor, vendorId, productId); Loading @@ -554,7 +552,6 @@ public final class InputDevice implements Parcelable { mKeyboardLayoutType = in.readString8(); mHasVibrator = in.readInt() != 0; mHasMicrophone = in.readInt() != 0; mHasButtonUnderPad = in.readInt() != 0; mHasSensor = in.readInt() != 0; mHasBattery = in.readInt() != 0; mHostUsiVersion = HostUsiVersion.CREATOR.createFromParcel(in); Loading Loading @@ -596,7 +593,6 @@ public final class InputDevice implements Parcelable { private KeyCharacterMap mKeyCharacterMap = null; private boolean mHasVibrator = false; private boolean mHasMicrophone = false; private boolean mHasButtonUnderPad = false; private boolean mHasSensor = false; private boolean mHasBattery = false; private String mKeyboardLanguageTag = null; Loading Loading @@ -693,12 +689,6 @@ public final class InputDevice implements Parcelable { return this; } /** @see InputDevice#hasButtonUnderPad() */ public Builder setHasButtonUnderPad(boolean hasButtonUnderPad) { mHasButtonUnderPad = hasButtonUnderPad; return this; } /** @see InputDevice#hasSensor() */ public Builder setHasSensor(boolean hasSensor) { mHasSensor = hasSensor; Loading Loading @@ -778,7 +768,6 @@ public final class InputDevice implements Parcelable { mKeyboardLayoutType, mHasVibrator, mHasMicrophone, mHasButtonUnderPad, mHasSensor, mHasBattery, mUsiVersionMajor, Loading Loading @@ -1366,15 +1355,6 @@ public final class InputDevice implements Parcelable { return mHasMicrophone; } /** * Reports whether the device has a button under its touchpad * @return Whether the device has a button under its touchpad * @hide */ public boolean hasButtonUnderPad() { return mHasButtonUnderPad; } /** * Reports whether the device has a sensor. * @return Whether the device has a sensor. Loading Loading @@ -1618,7 +1598,6 @@ public final class InputDevice implements Parcelable { out.writeString8(mKeyboardLayoutType); out.writeInt(mHasVibrator ? 1 : 0); out.writeInt(mHasMicrophone ? 1 : 0); out.writeInt(mHasButtonUnderPad ? 1 : 0); out.writeInt(mHasSensor ? 1 : 0); out.writeInt(mHasBattery ? 1 : 0); mHostUsiVersion.writeToParcel(out, flags); Loading
core/jni/android_view_InputDevice.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -87,9 +87,8 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi deviceInfo.getKeyboardType(), kcmObj.get(), keyboardLanguageTagObj.get(), keyboardLayoutTypeObj.get(), deviceInfo.hasVibrator(), deviceInfo.hasMic(), deviceInfo.hasButtonUnderPad(), deviceInfo.hasSensor(), deviceInfo.hasBattery(), usiVersion.majorVersion, usiVersion.minorVersion, deviceInfo.hasSensor(), deviceInfo.hasBattery(), usiVersion.majorVersion, usiVersion.minorVersion, deviceInfo.getAssociatedDisplayId(), deviceInfo.isEnabled())); // Note: We do not populate the Bluetooth address into the InputDevice object to avoid leaking Loading Loading @@ -127,7 +126,7 @@ int register_android_view_InputDevice(JNIEnv* env) gInputDeviceClassInfo.ctor = GetMethodIDOrDie(env, gInputDeviceClassInfo.clazz, "<init>", "(IIILjava/lang/String;IIILjava/lang/" "String;ZIILandroid/view/KeyCharacterMap;Ljava/" "lang/String;Ljava/lang/String;ZZZZZIIIZ)V"); "lang/String;Ljava/lang/String;ZZZZIIIZ)V"); gInputDeviceClassInfo.addMotionRange = GetMethodIDOrDie(env, gInputDeviceClassInfo.clazz, "addMotionRange", "(IIFFFFF)V"); Loading
tests/Input/src/com/android/test/input/InputDeviceTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,6 @@ public class InputDeviceTest { .setKeyCharacterMap(keyCharacterMap) .setHasVibrator(true) .setHasMicrophone(true) .setHasButtonUnderPad(true) .setHasSensor(true) .setHasBattery(true) .setKeyboardLanguageTag("en-US") Loading