-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
665 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 0 additions & 120 deletions
120
app/src/main/java/org/schabi/newpipe/settings/ContentSettingsManager.kt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
app/src/main/java/org/schabi/newpipe/settings/NewPipeFileLocator.kt
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
app/src/main/java/org/schabi/newpipe/settings/export/BackupFileLocator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.schabi.newpipe.settings.export | ||
|
||
import java.io.File | ||
|
||
/** | ||
* Locates specific files of NewPipe based on the home directory of the app. | ||
*/ | ||
class BackupFileLocator(private val homeDir: File) { | ||
companion object { | ||
const val FILE_NAME_DB = "newpipe.db" | ||
@Deprecated( | ||
"Serializing preferences with Java's ObjectOutputStream is vulnerable to injections", | ||
replaceWith = ReplaceWith("FILE_NAME_JSON_PREFS") | ||
) | ||
const val FILE_NAME_SERIALIZED_PREFS = "newpipe.settings" | ||
const val FILE_NAME_JSON_PREFS = "preferences.json" | ||
} | ||
|
||
val dbDir by lazy { File(homeDir, "/databases") } | ||
|
||
val db by lazy { File(dbDir, FILE_NAME_DB) } | ||
|
||
val dbJournal by lazy { File(dbDir, "$FILE_NAME_DB-journal") } | ||
|
||
val dbShm by lazy { File(dbDir, "$FILE_NAME_DB-shm") } | ||
|
||
val dbWal by lazy { File(dbDir, "$FILE_NAME_DB-wal") } | ||
} |
Oops, something went wrong.