Add check for no Vibration Service on Device
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9714 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
07a6ca931f
commit
3aa223360a
@ -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…
x
Reference in New Issue
Block a user