mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 16:40:32 +00:00
Annotate methode parameters as NonNull
This commit is contained in:
parent
05eb0d0fbe
commit
004907d306
@ -193,7 +193,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exportDatabase(final File folder) {
|
private void exportDatabase(@NonNull final File folder) {
|
||||||
try {
|
try {
|
||||||
final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US);
|
final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US);
|
||||||
final String path = folder.getAbsolutePath() + "/NewPipeData-"
|
final String path = folder.getAbsolutePath() + "/NewPipeData-"
|
||||||
@ -214,7 +214,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void importDatabase(final File file) {
|
private void importDatabase(@NonNull final File file) {
|
||||||
final String filePath = file.getAbsolutePath();
|
final String filePath = file.getAbsolutePath();
|
||||||
|
|
||||||
// check if file is supported
|
// check if file is supported
|
||||||
@ -263,7 +263,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||||||
*
|
*
|
||||||
* @param file The file of the created backup
|
* @param file The file of the created backup
|
||||||
*/
|
*/
|
||||||
private void finishImport(final File file) {
|
private void finishImport(@NonNull final File file) {
|
||||||
if (file.getParentFile() != null) {
|
if (file.getParentFile() != null) {
|
||||||
//immediately because app is about to exit
|
//immediately because app is about to exit
|
||||||
setImportExportDataPath(file.getParentFile(), true);
|
setImportExportDataPath(file.getParentFile(), true);
|
||||||
@ -274,7 +274,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("ApplySharedPref")
|
@SuppressLint("ApplySharedPref")
|
||||||
private void setImportExportDataPath(final File file, final boolean immediately) {
|
private void setImportExportDataPath(@NonNull final File file, final boolean immediately) {
|
||||||
final String directoryPath;
|
final String directoryPath;
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
directoryPath = file.getAbsolutePath();
|
directoryPath = file.getAbsolutePath();
|
||||||
|
Loading…
Reference in New Issue
Block a user