docs: private GVRCursorController addDevice(int deviceId) {
          InputDevice device = inputManager.getInputDevice(deviceId);
          GVRControllerType controllerType = getGVRInputDeviceType(device);
  
          if (mEnabledControllerTypes == null)
          {
              return null;
          }
          if (controllerType == GVRControllerType.GAZE && !mEnabledControllerTypes.contains(GVRControllerType.GAZE))
          {
              return null;
          }
  
          int key;
          if (controllerType == GVRControllerType.GAZE) {
              // create the controller if there isn't one. 
              if (gazeCursorController == null) {
                  gazeCursorController = new GVRGazeCursorController(context, GVRControllerType.GAZE,
                          GVRDeviceConstants.OCULUS_GEARVR_DEVICE_NAME,
                          GVRDeviceConstants.OCULUS_GEARVR_TOUCHPAD_VENDOR_ID,
                          GVRDeviceConstants.OCULUS_GEARVR_TOUCHPAD_PRODUCT_ID);
              }
              // use the cached gaze key
              key = GAZE_CACHED_KEY;
          } else {
              key = getCacheKey(device, controllerType);
          }
  
          if (key != -1)
          {
              GVRCursorController controller = cache.get(key);
              if (controller == null)
              {
                  if ((mEnabledControllerTypes == null) || !mEnabledControllerTypes.contains(controllerType))
                  {
                      return null;
                  }
                  if (controllerType == GVRControllerType.MOUSE)
                  {
                      controller = mouseDeviceManager.getCursorController(context, device.getName(), device.getVendorId(), device.getProductId());
                  }
                  else if (controllerType == GVRControllerType.GAMEPAD)
                  {
                      controller = gamepadDeviceManager.getCursorController(context, device.getName(), device.getVendorId(), device.getProductId());
                  }
                  else if (controllerType == GVRControllerType.GAZE)
                  {
                      controller = gazeCursorController;
                  }
                  cache.put(key, controller);
                  controllerIds.put(device.getId(), controller);
                  return controller;
              }
              else
              {
                  controllerIds.put(device.getId(), controller);
              }
          }
          return null;
      }