diff options
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/view/InputDevice.java | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt index 7f526bb268af..e9a7a608d8d5 100644 --- a/api/current.txt +++ b/api/current.txt @@ -49008,6 +49008,7 @@ package android.view { method public boolean[] hasKeys(int...); method public boolean hasMicrophone(); method public boolean isEnabled(); + method public boolean isExternal(); method public boolean isVirtual(); method public boolean supportsSource(int); method public void writeToParcel(android.os.Parcel, int); diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java index 7295259a0f89..868a9de93972 100644 --- a/core/java/android/view/InputDevice.java +++ b/core/java/android/view/InputDevice.java @@ -22,6 +22,7 @@ import android.annotation.UnsupportedAppUsage; import android.content.Context; import android.hardware.input.InputDeviceIdentifier; import android.hardware.input.InputManager; +import android.os.Build; import android.os.NullVibrator; import android.os.Parcel; import android.os.Parcelable; @@ -54,7 +55,7 @@ public final class InputDevice implements Parcelable { private final int mProductId; private final String mDescriptor; private final InputDeviceIdentifier mIdentifier; - @UnsupportedAppUsage + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private final boolean mIsExternal; private final int mSources; private final int mKeyboardType; @@ -608,10 +609,7 @@ public final class InputDevice implements Parcelable { * peripheral bus), otherwise it is built-in. * * @return True if the device is external. - * - * @hide */ - @UnsupportedAppUsage public boolean isExternal() { return mIsExternal; } |