Add check for no Vibration Service on Device

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9714 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
iwg..ic 12 years ago
parent 07a6ca931f
commit 3aa223360a
  1. 3
      engine/src/android/com/jme3/input/android/AndroidSensorJoyInput.java

@ -130,6 +130,9 @@ public class AndroidSensorJoyInput implements JoyInput, SensorEventListener {
sensorManager = (SensorManager) JmeAndroidSystem.getActivity().getSystemService(Context.SENSOR_SERVICE);
// Get instance of Vibrator from current Context
vibrator = (Vibrator) JmeAndroidSystem.getActivity().getSystemService(Context.VIBRATOR_SERVICE);
if (vibrator == null) {
logger.log(Level.INFO, "Vibrator Service not found.");
}
initSensors();
}

Loading…
Cancel
Save