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
This commit is contained in:
parent
c543c4f04d
commit
60a9b7ecfb
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user