[Android] Code cleaning
Geoffrey Métais
git at videolan.org
Wed Sep 6 18:40:33 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Sep 6 18:36:22 2017 +0200| [3bfb731d7412b02fbde0062f537bdd8c862e20e8] | committer: Geoffrey Métais
Code cleaning
> https://code.videolan.org/videolan/vlc-android/commit/3bfb731d7412b02fbde0062f537bdd8c862e20e8
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index be22ec0b5..25d3853d0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -669,7 +669,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mOverlayButtons.setLayoutParams(layoutParams);
}
-
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
protected void onStart() {
super.onStart();
@@ -3477,16 +3477,17 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
}
private BroadcastReceiver mBtReceiver = AndroidUtil.isICSOrLater ? new BroadcastReceiver() {
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public void onReceive(Context context, Intent intent) {
switch (intent.getAction()) {
case BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED:
case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED:
- long savedDelay = mSettings.getLong(KEY_BLUETOOTH_DELAY, 0l);
+ long savedDelay = mSettings.getLong(KEY_BLUETOOTH_DELAY, 0L);
long currentDelay = mService.getAudioDelay();
- if (savedDelay != 0l) {
+ if (savedDelay != 0L) {
boolean connected = intent.getIntExtra(BluetoothA2dp.EXTRA_STATE, -1) == BluetoothA2dp.STATE_CONNECTED;
- if (connected && currentDelay == 0l)
+ if (connected && currentDelay == 0L)
toggleBtDelay(true);
else if (!connected && savedDelay == currentDelay)
toggleBtDelay(false);
@@ -3496,7 +3497,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
} : null;
private void toggleBtDelay(boolean connected) {
- mService.setAudioDelay(connected ? mSettings.getLong(KEY_BLUETOOTH_DELAY, 0) : 0l);
+ mService.setAudioDelay(connected ? mSettings.getLong(KEY_BLUETOOTH_DELAY, 0) : 0L);
}
private OnClickListener mBtSaveListener = new OnClickListener() {
More information about the Android
mailing list