From dc83c4735ade2caf9b51eab3c7a1844581d0383a Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 23 Jul 2013 22:26:53 -0700 Subject: Fix for SettingsBackup --- .../dsub/activity/SettingsActivity.java | 3 +++ .../daneren2005/dsub/util/SettingsBackupAgent | 29 -------------------- .../daneren2005/dsub/util/SettingsBackupAgent.java | 31 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 29 deletions(-) delete mode 100644 subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent create mode 100644 subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent.java (limited to 'subsonic-android') diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SettingsActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SettingsActivity.java index 9d0aa1ba..fc56281e 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SettingsActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SettingsActivity.java @@ -18,6 +18,7 @@ */ package github.daneren2005.dsub.activity; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; @@ -45,6 +46,8 @@ import github.daneren2005.dsub.util.FileUtil; import github.daneren2005.dsub.util.Util; import java.io.File; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; import java.net.URL; import java.util.LinkedHashMap; import java.util.Map; diff --git a/subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent b/subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent deleted file mode 100644 index 3a99437c..00000000 --- a/subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent +++ /dev/null @@ -1,29 +0,0 @@ -/* - This file is part of Subsonic. - - Subsonic is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Subsonic is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Subsonic. If not, see . - - Copyright 2009 (C) Sindre Mehus -*/ - -import android.app.backup.BackupAgentHelper; -import android.app.backup.SharedPreferencesBackupHelper; -import github.daneren2005.dsub.util.Constants; - -public class SettingsBackupAgent extends BackupAgentHelper { - void onCreate() { - SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, Constants.PREFERENCES_FILE_NAME); - addHelper("mypreferences", helper); - } - } diff --git a/subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent.java b/subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent.java new file mode 100644 index 00000000..7eb6d137 --- /dev/null +++ b/subsonic-android/src/github/daneren2005/dsub/util/SettingsBackupAgent.java @@ -0,0 +1,31 @@ +/* + This file is part of Subsonic. + + Subsonic is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Subsonic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Subsonic. If not, see . + + Copyright 2009 (C) Sindre Mehus +*/ +package github.daneren2005.dsub.util; + +import android.app.backup.BackupAgentHelper; +import android.app.backup.SharedPreferencesBackupHelper; +import github.daneren2005.dsub.util.Constants; + +public class SettingsBackupAgent extends BackupAgentHelper { + public void onCreate() { + super.onCreate(); + SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, Constants.PREFERENCES_FILE_NAME); + addHelper("mypreferences", helper); + } + } -- cgit v1.2.3