summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorScott Kennedy <skennedy@google.com>2013-08-01 17:03:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-01 17:03:46 +0000
commit41d5342d986b12c9590548814382bed2ccab6253 (patch)
tree7e8fa389fb61d30b869a7ce8cda89878f63ece56 /src
parent063fb171f5356dcd742453bdc3522171a7dc5d2b (diff)
parent60a9b7ecfb731f91e6c69f5f6059769dc66e75db (diff)
downloadandroid_packages_apps_Email-41d5342d986b12c9590548814382bed2ccab6253.tar.gz
android_packages_apps_Email-41d5342d986b12c9590548814382bed2ccab6253.tar.bz2
android_packages_apps_Email-41d5342d986b12c9590548814382bed2ccab6253.zip
Merge "Refactor PreferenceMigrator" into jb-ub-mail-ur10
Diffstat (limited to 'src')
-rw-r--r--src/com/android/email/EmailApplication.java11
-rw-r--r--src/com/android/email/preferences/EmailPreferenceMigrator.java (renamed from src/com/android/mail/preferences/PreferenceMigrator.java)7
2 files changed, 16 insertions, 2 deletions
diff --git a/src/com/android/email/EmailApplication.java b/src/com/android/email/EmailApplication.java
index 3af203df6..6b168c2d0 100644
--- a/src/com/android/email/EmailApplication.java
+++ b/src/com/android/email/EmailApplication.java
@@ -18,6 +18,10 @@ package com.android.email;
import android.app.Application;
+import com.android.email.preferences.EmailPreferenceMigrator;
+import com.android.mail.preferences.BasePreferenceMigrator;
+import com.android.mail.preferences.PreferenceMigratorHolder;
+import com.android.mail.preferences.PreferenceMigratorHolder.PreferenceMigratorCreator;
import com.android.mail.utils.LogTag;
public class EmailApplication extends Application {
@@ -25,5 +29,12 @@ public class EmailApplication extends Application {
static {
LogTag.setLogTag(LOG_TAG);
+
+ PreferenceMigratorHolder.setPreferenceMigratorCreator(new PreferenceMigratorCreator() {
+ @Override
+ public BasePreferenceMigrator createPreferenceMigrator() {
+ return new EmailPreferenceMigrator();
+ }
+ });
}
}
diff --git a/src/com/android/mail/preferences/PreferenceMigrator.java b/src/com/android/email/preferences/EmailPreferenceMigrator.java
index 38d3837a2..5f63f81ab 100644
--- a/src/com/android/mail/preferences/PreferenceMigrator.java
+++ b/src/com/android/email/preferences/EmailPreferenceMigrator.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.mail.preferences;
+package com.android.email.preferences;
import android.content.Context;
import android.content.SharedPreferences;
@@ -24,6 +24,9 @@ import android.text.TextUtils;
import com.android.email.Preferences;
import com.android.emailcommon.provider.EmailContent;
+import com.android.mail.preferences.BasePreferenceMigrator;
+import com.android.mail.preferences.FolderPreferences;
+import com.android.mail.preferences.MailPrefs;
import com.android.mail.providers.Account;
import com.android.mail.providers.Folder;
import com.android.mail.providers.UIProvider;
@@ -37,7 +40,7 @@ import java.util.Set;
/**
* Migrates Email settings to UnifiedEmail
*/
-public class PreferenceMigrator extends BasePreferenceMigrator {
+public class EmailPreferenceMigrator extends BasePreferenceMigrator {
private static final String LOG_TAG = LogTag.getLogTag();
@Override