@@ -2,6 +2,7 @@ package org.schabi.newpipe.settings
22
33import android.content.SharedPreferences
44import android.util.Log
5+ import org.schabi.newpipe.MainActivity.DEBUG
56import org.schabi.newpipe.streams.io.SharpOutputStream
67import org.schabi.newpipe.streams.io.StoredFileHelper
78import org.schabi.newpipe.util.ZipHelper
@@ -32,7 +33,9 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
3233 output.flush()
3334 }
3435 } catch (e: IOException ) {
35- Log .e(TAG , " Unable to exportDatabase" , e)
36+ if (DEBUG ) {
37+ Log .e(TAG , " Unable to exportDatabase" , e)
38+ }
3639 }
3740
3841 ZipHelper .addFileToZip(outZip, fileLocator.settings.path, " newpipe.settings" )
@@ -105,9 +108,13 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
105108 preferenceEditor.commit()
106109 }
107110 } catch (e: IOException ) {
108- Log .e(TAG , " Unable to loadSharedPreferences" , e)
111+ if (DEBUG ) {
112+ Log .e(TAG , " Unable to loadSharedPreferences" , e)
113+ }
109114 } catch (e: ClassNotFoundException ) {
110- Log .e(TAG , " Unable to loadSharedPreferences" , e)
115+ if (DEBUG ) {
116+ Log .e(TAG , " Unable to loadSharedPreferences" , e)
117+ }
111118 }
112119 }
113120}
0 commit comments