Commit 9f2dad0c authored by Max Lv's avatar Max Lv

update the full database

parent 38189467
......@@ -39,7 +39,11 @@
package com.github.shadowsocks
import android.app.backup.{SharedPreferencesBackupHelper, BackupAgentHelper}
import android.app.backup.{FileBackupHelper, SharedPreferencesBackupHelper, BackupAgentHelper}
import android.content.Context
case class DbBackupHelper(context: Context, dbName: String)
extends FileBackupHelper(context, context.getDatabasePath(dbName).getAbsolutePath)
class ShadowsocksBackupAgent extends BackupAgentHelper {
......@@ -51,8 +55,11 @@ class ShadowsocksBackupAgent extends BackupAgentHelper {
// identify the SharedPreferencesBackupHelper's data.
val MY_PREFS_BACKUP_KEY = "com.github.shadowsocks"
val DATABASE = "com.github.shadowsocks.database.profile"
override def onCreate() {
val helper = new SharedPreferencesBackupHelper(this, PREFS_DISPLAY)
addHelper(MY_PREFS_BACKUP_KEY, helper)
addHelper(DATABASE, new DbBackupHelper(this, "profile.db"))
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment