diff options
| author | Scott Kennedy <skennedy@google.com> | 2013-07-31 22:31:42 -0700 |
|---|---|---|
| committer | Scott Kennedy <skennedy@google.com> | 2013-07-31 22:40:08 -0700 |
| commit | 60a9b7ecfb731f91e6c69f5f6059769dc66e75db (patch) | |
| tree | 1450629a2ab04921a51295c3e3f389b4b85f3ded /src | |
| parent | c543c4f04d35560c4479da0a9ecc146c09358e24 (diff) | |
| download | android_packages_apps_Email-60a9b7ecfb731f91e6c69f5f6059769dc66e75db.tar.gz android_packages_apps_Email-60a9b7ecfb731f91e6c69f5f6059769dc66e75db.tar.bz2 android_packages_apps_Email-60a9b7ecfb731f91e6c69f5f6059769dc66e75db.zip | |
Refactor PreferenceMigrator
Do the same thing as with LogTag, so that we don't have the same
class name in the same package name in three projects.
This makes IDE builds much easier.
Change-Id: I6c9235ab231e1c04ba87c5da627094c7258a5edf
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/email/EmailApplication.java | 11 | ||||
| -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 |
