Vibration makes accelerometer give wrong values
<p>I have simple app that reads acceleremoter values (for x,y and z axis). But for certain value i vibrate my phone programatically. So whenever vibration occurs accelerometer value flickers highly up and down in range. I want to avoid this. Please give me idea how to prevent accelerometer giving varying result when in vibration mode.</p>

<pre><code>public void onSensorChanged(SensorEvent event) {

if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER)
return;          
         switch (mDisplay.getRotation()) {
                case Surface.ROTATION_0:
                    x = event.values[0];
                    y = event.values[1];
                    break;
                case Surface.ROTATION_90:
                    x = -event.values[1];
                    y = event.values[0];
                    Log.i("ROT: ", "90");
                    break;
                case Surface.ROTATION_180:
                    x = -event.values[0];
                    y = -event.values[1];
                    break;
                case Surface.ROTATION_270:
                    x = event.values[1];
                    y = -event.values[0];
                    break;
            }
}
</code></pre>

<p>Thanks.</p>
