Fix debug backup/restore methods

This commit is contained in:
Dominik Schürmann
2014-08-04 11:19:46 +02:00
parent a8b8ed6f14
commit b42afcd32c
4 changed files with 25 additions and 31 deletions

View File

@@ -94,22 +94,22 @@ public class KeyListActivity extends DrawerActivity {
case R.id.menu_key_list_debug_read:
try {
KeychainDatabase.debugRead(this);
Notify.showNotify(this, "Restored Notify.Style backup", Notify.Style.INFO);
KeychainDatabase.debugBackup(this, true);
Notify.showNotify(this, "Restored debug_backup.db", Notify.Style.INFO);
getContentResolver().notifyChange(KeychainContract.KeyRings.CONTENT_URI, null);
} catch (IOException e) {
Log.e(Constants.TAG, "IO Error", e);
Notify.showNotify(this, "IO Notify.Style: " + e.getMessage(), Notify.Style.ERROR);
Notify.showNotify(this, "IO Error " + e.getMessage(), Notify.Style.ERROR);
}
return true;
case R.id.menu_key_list_debug_write:
try {
KeychainDatabase.debugWrite(this);
Notify.showNotify(this, "Backup Notify.Style", Notify.Style.INFO);
KeychainDatabase.debugBackup(this, false);
Notify.showNotify(this, "Backup to debug_backup.db completed", Notify.Style.INFO);
} catch(IOException e) {
Log.e(Constants.TAG, "IO Error", e);
Notify.showNotify(this, "IO Notify.Style: " + e.getMessage(), Notify.Style.ERROR);
Notify.showNotify(this, "IO Error: " + e.getMessage(), Notify.Style.ERROR);
}
return true;