Commit 371dcf3e authored by Alexandre Perraud's avatar Alexandre Perraud Committed by Jean-Baptiste Kempf

VideoPlayerActivity : replace tab by space

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3ef336c2
......@@ -703,35 +703,35 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
@TargetApi(12) //only active for Android 3.1+
public boolean dispatchGenericMotionEvent(MotionEvent event){
InputDevice mInputDevice = event.getDevice();
float x = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_X);
float y = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_Y);
float z = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_Z);
float rz = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_RZ);
if (System.currentTimeMillis() - mLastMove > JOYSTICK_INPUT_DELAY){
if (Math.abs(x) > 0.3){
seek(x > 0.0f ? 10000 : -10000);
mLastMove = System.currentTimeMillis();
} else if (Math.abs(y) > 0.3){
if (mIsFirstBrightnessGesture)
initBrightnessTouch();
changeBrightness(-y/10f);
mLastMove = System.currentTimeMillis();
} else if (Math.abs(rz) > 0.3){
mVol = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
int delta = -(int) ((rz / 7) * mAudioMax);
int vol = (int) Math.min(Math.max(mVol + delta, 0), mAudioMax);
setAudioVolume(vol);
mLastMove = System.currentTimeMillis();
}
}
return true;
InputDevice mInputDevice = event.getDevice();
float x = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_X);
float y = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_Y);
float z = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_Z);
float rz = AndroidDevices.getCenteredAxis(event, mInputDevice,
MotionEvent.AXIS_RZ);
if (System.currentTimeMillis() - mLastMove > JOYSTICK_INPUT_DELAY){
if (Math.abs(x) > 0.3){
seek(x > 0.0f ? 10000 : -10000);
mLastMove = System.currentTimeMillis();
} else if (Math.abs(y) > 0.3){
if (mIsFirstBrightnessGesture)
initBrightnessTouch();
changeBrightness(-y/10f);
mLastMove = System.currentTimeMillis();
} else if (Math.abs(rz) > 0.3){
mVol = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
int delta = -(int) ((rz / 7) * mAudioMax);
int vol = (int) Math.min(Math.max(mVol + delta, 0), mAudioMax);
setAudioVolume(vol);
mLastMove = System.currentTimeMillis();
}
}
return true;
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment