mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-03 14:00:32 +00:00
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.content.SharedPreferences
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import org.schabi.newpipe.MainActivity.DEBUG
|
||||||
import org.schabi.newpipe.streams.io.SharpOutputStream
|
import org.schabi.newpipe.streams.io.SharpOutputStream
|
||||||
import org.schabi.newpipe.streams.io.StoredFileHelper
|
import org.schabi.newpipe.streams.io.StoredFileHelper
|
||||||
import org.schabi.newpipe.util.ZipHelper
|
import org.schabi.newpipe.util.ZipHelper
|
||||||
@ -32,7 +33,9 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
|
|||||||
output.flush()
|
output.flush()
|
||||||
}
|
}
|
||||||
} catch (e: IOException) {
|
} 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")
|
ZipHelper.addFileToZip(outZip, fileLocator.settings.path, "newpipe.settings")
|
||||||
@ -105,9 +108,13 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
|
|||||||
preferenceEditor.commit()
|
preferenceEditor.commit()
|
||||||
}
|
}
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
Log.e(TAG, "Unable to loadSharedPreferences", e)
|
if (DEBUG) {
|
||||||
|
Log.e(TAG, "Unable to loadSharedPreferences", e)
|
||||||
|
}
|
||||||
} catch (e: ClassNotFoundException) {
|
} 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.AttributeSet
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import androidx.annotation.NonNull
|
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.END
|
import androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.END
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.PARENT_ID
|
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.
|
* Determines if the playback should forward/rewind or do nothing.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
|
||||||
fun getFastSeekDirection(portion: DisplayPortion): FastSeekDirection
|
fun getFastSeekDirection(portion: DisplayPortion): FastSeekDirection
|
||||||
fun seek(forward: Boolean)
|
fun seek(forward: Boolean)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user