Fixed some Sonar warnings
This commit is contained in:
parent
50d7d1b7b3
commit
c69bcaafbb
|
@ -2,6 +2,7 @@ package org.schabi.newpipe.settings
|
|||
|
||||
import android.content.SharedPreferences
|
||||
import android.util.Log
|
||||
import org.schabi.newpipe.MainActivity.DEBUG
|
||||
import org.schabi.newpipe.streams.io.SharpOutputStream
|
||||
import org.schabi.newpipe.streams.io.StoredFileHelper
|
||||
import org.schabi.newpipe.util.ZipHelper
|
||||
|
@ -32,7 +33,9 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
|
|||
output.flush()
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
Log.e(TAG, "Unable to exportDatabase", e)
|
||||
if (DEBUG) {
|
||||
Log.e(TAG, "Unable to exportDatabase", e)
|
||||
}
|
||||
}
|
||||
|
||||
ZipHelper.addFileToZip(outZip, fileLocator.settings.path, "newpipe.settings")
|
||||
|
@ -105,9 +108,13 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
|
|||
preferenceEditor.commit()
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
Log.e(TAG, "Unable to loadSharedPreferences", e)
|
||||
if (DEBUG) {
|
||||
Log.e(TAG, "Unable to loadSharedPreferences", e)
|
||||
}
|
||||
} catch (e: ClassNotFoundException) {
|
||||
Log.e(TAG, "Unable to loadSharedPreferences", e)
|
||||
if (DEBUG) {
|
||||
Log.e(TAG, "Unable to loadSharedPreferences", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Context
|
|||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import androidx.annotation.NonNull
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.END
|
||||
import androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.PARENT_ID
|
||||
|
@ -127,7 +126,6 @@ class PlayerFastSeekOverlay(context: Context, attrs: AttributeSet?) :
|
|||
/**
|
||||
* Determines if the playback should forward/rewind or do nothing.
|
||||
*/
|
||||
@NonNull
|
||||
fun getFastSeekDirection(portion: DisplayPortion): FastSeekDirection
|
||||
fun seek(forward: Boolean)
|
||||
|
||||
|
|
Loading…
Reference in New Issue