Package org.robolectric.shadows
Class ShadowInputManager
java.lang.Object
org.robolectric.shadows.ShadowInputManager
@Implements(android.hardware.input.InputManager.class)
public class ShadowInputManager
extends Object
Shadow for
InputManager-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInputDevice(InputDevice inputDevice) voidaddInputDeviceKeys(int deviceId, int[] keyCodes) protected boolean[]deviceHasKeys(int id, int[] keyCodes) On U and above, this method delegates toInputManagerGlobal.protected static boolean[]deviceHasKeysImpl(int deviceId, int[] keyCodes) protected booleaninjectInputEvent(InputEvent event, int mode) On U and above, this method delegates toInputManagerGlobal.protected voidstatic voidreset()protected ObjectverifyInputEvent(InputEvent inputEvent) Provides a local java implementation, since the real implementation is in system server + native code.
-
Constructor Details
-
ShadowInputManager
public ShadowInputManager()
-
-
Method Details
-
deviceHasKeysImpl
protected static boolean[] deviceHasKeysImpl(int deviceId, int[] keyCodes) -
injectInputEvent
On U and above, this method delegates toInputManagerGlobal. -
deviceHasKeys
On U and above, this method delegates toInputManagerGlobal. -
populateInputDevicesLocked
@Implementation(maxSdk=33) protected void populateInputDevicesLocked() throws ClassNotFoundException- Throws:
ClassNotFoundException
-
addInputDevice
-
addInputDeviceKeys
public void addInputDeviceKeys(int deviceId, int[] keyCodes) -
verifyInputEvent
Provides a local java implementation, since the real implementation is in system server + native code. -
reset
-