private int getCacheKey(InputDevice device, GVRControllerType controllerType) {
        if (controllerType != GVRControllerType.UNKNOWN &&
            controllerType != GVRControllerType.EXTERNAL) {
            // Sometimes a device shows up using two device ids
            // here we try to show both devices as one using the
            // product and vendor id

            int key = device.getVendorId();
            key = 31 * key + device.getProductId();
            key = 31 * key + controllerType.hashCode();

            return key;
        }
        return -1; // invalid key
    }
private int getCacheKey ( InputDevice device , GVRControllerType controllerType ) { if ( controllerType != GVRControllerType . UNKNOWN && controllerType != GVRControllerType . EXTERNAL ) { int key = device . getVendorId ( ) ; key = 31 * key + device . getProductId ( ) ; key = 31 * key + controllerType . hashCode ( ) ; return key ; } return - 1 ; }
Return the key if there is one else return -1