From 3aa223360ab44afecb165799f48e816c21cd35dd Mon Sep 17 00:00:00 2001 From: "iwg..ic" Date: Tue, 11 Sep 2012 00:52:49 +0000 Subject: [PATCH] Add check for no Vibration Service on Device git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9714 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../android/com/jme3/input/android/AndroidSensorJoyInput.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/android/com/jme3/input/android/AndroidSensorJoyInput.java b/engine/src/android/com/jme3/input/android/AndroidSensorJoyInput.java index b279894a0..b4f6c0bc3 100644 --- a/engine/src/android/com/jme3/input/android/AndroidSensorJoyInput.java +++ b/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(); }