Skip to content

Commit 1e076ea

Browse files
committed
Wrap debug log in if(DEBUG)
1 parent 4863084 commit 1e076ea

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.schabi.newpipe.player.helper;
22

3+
import static org.schabi.newpipe.MainActivity.DEBUG;
4+
35
import android.content.Context;
46
import android.util.Log;
57

@@ -199,7 +201,9 @@ private static YoutubeHttpDataSource.Factory getYoutubeHttpDataSourceFactory(
199201
private static void instantiateCacheIfNeeded(final Context context) {
200202
if (cache == null) {
201203
final File cacheDir = new File(context.getExternalCacheDir(), CACHE_FOLDER_NAME);
202-
Log.d(TAG, "instantiateCacheIfNeeded: cacheDir = " + cacheDir.getAbsolutePath());
204+
if (DEBUG) {
205+
Log.d(TAG, "instantiateCacheIfNeeded: cacheDir = " + cacheDir.getAbsolutePath());
206+
}
203207
if (!cacheDir.exists() && !cacheDir.mkdir()) {
204208
Log.w(TAG, "instantiateCacheIfNeeded: could not create cache dir");
205209
}

0 commit comments

Comments
 (0)