Code example for SparseArray

Methods: getremove

0
    } 
 
    // Implementation of InputManager.InputDeviceListener.onInputDeviceRemoved() 
    @Override 
    public void onInputDeviceRemoved(int deviceId) {
        InputDeviceState state = mInputDeviceStates.get(deviceId);
        if (state != null) {
            Log.i(TAG, "Device removed: " + state.mDevice);
            mInputDeviceStates.remove(deviceId);
        } 
    } 
 
    private static boolean isJoystick(int source) {
        return (source & InputDevice.SOURCE_CLASS_JOYSTICK) != 0;
    } 
 
    /** 
     * Tracks the state of joystick axes and game controller buttons for a particular 
     * input device for diagnostic purposes. 
     */ 
Contextual code suggestions in your IDE  Get Codota for Java