Commit b74887c6 authored by Geoffrey Métais's avatar Geoffrey Métais

Video player: Hide debug logs from release

parent c32f99fa
...@@ -684,7 +684,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C ...@@ -684,7 +684,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
String subtitleList_serialized = null; String subtitleList_serialized = null;
synchronized (mSubtitleSelectedFiles) { synchronized (mSubtitleSelectedFiles) {
if(mSubtitleSelectedFiles.size() > 0) { if(mSubtitleSelectedFiles.size() > 0) {
Log.d(TAG, "Saving selected subtitle files"); if (BuildConfig.DEBUG) Log.d(TAG, "Saving selected subtitle files");
ByteArrayOutputStream bos = new ByteArrayOutputStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream();
try { try {
ObjectOutputStream oos = new ObjectOutputStream(bos); ObjectOutputStream oos = new ObjectOutputStream(bos);
...@@ -874,7 +874,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C ...@@ -874,7 +874,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
vlcVout.removeCallback(this); vlcVout.removeCallback(this);
vlcVout.detachViews(); vlcVout.detachViews();
if (mService.hasMedia() && mSwitchingView) { if (mService.hasMedia() && mSwitchingView) {
Log.d(TAG, "mLocation = \"" + mUri + "\""); if (BuildConfig.DEBUG) Log.d(TAG, "mLocation = \"" + mUri + "\"");
if (mSwitchToPopup) if (mSwitchToPopup)
mService.switchToPopup(mService.getCurrentMediaPosition()); mService.switchToPopup(mService.getCurrentMediaPosition());
else { else {
...@@ -931,8 +931,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C ...@@ -931,8 +931,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
MediaDatabase.getInstance().saveSlave(mService.getCurrentMediaLocation(), Media.Slave.Type.Subtitle, 2, data.getStringExtra(FilePickerFragment.EXTRA_MRL)); MediaDatabase.getInstance().saveSlave(mService.getCurrentMediaLocation(), Media.Slave.Type.Subtitle, 2, data.getStringExtra(FilePickerFragment.EXTRA_MRL));
} }
}); });
} else } else if (BuildConfig.DEBUG) Log.d(TAG, "Subtitle selection dialog was cancelled");
Log.d(TAG, "Subtitle selection dialog was cancelled");
} }
public static void start(Context context, Uri uri) { public static void start(Context context, Uri uri) {
...@@ -3077,7 +3076,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C ...@@ -3077,7 +3076,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
final KeyguardManager km = (KeyguardManager) getApplicationContext().getSystemService(KEYGUARD_SERVICE); final KeyguardManager km = (KeyguardManager) getApplicationContext().getSystemService(KEYGUARD_SERVICE);
if (km != null && km.inKeyguardRestrictedInputMode()) if (km != null && km.inKeyguardRestrictedInputMode())
mWasPaused = true; mWasPaused = true;
if (mWasPaused) if (mWasPaused && BuildConfig.DEBUG)
Log.d(TAG, "Video was previously paused, resuming in paused mode"); Log.d(TAG, "Video was previously paused, resuming in paused mode");
if (intent.getData() != null) mUri = intent.getData(); if (intent.getData() != null) mUri = intent.getData();
...@@ -3108,7 +3107,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C ...@@ -3108,7 +3107,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
final boolean continueplayback = isPlaying && (restorePlayback || positionInPlaylist == mService.getCurrentMediaPosition()); final boolean continueplayback = isPlaying && (restorePlayback || positionInPlaylist == mService.getCurrentMediaPosition());
if (resumePlaylist) { if (resumePlaylist) {
// Provided externally from AudioService // Provided externally from AudioService
Log.d(TAG, "Continuing playback from PlaybackService at index " + positionInPlaylist); if (BuildConfig.DEBUG) Log.d(TAG, "Continuing playback from PlaybackService at index " + positionInPlaylist);
openedMedia = mService.getMedias().get(positionInPlaylist); openedMedia = mService.getMedias().get(positionInPlaylist);
if (openedMedia == null) { if (openedMedia == null) {
encounteredError(); encounteredError();
......
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