diff --git a/res/layout/debug.xml b/res/layout/debug.xml
index 0a45f724c..58db7c952 100644
--- a/res/layout/debug.xml
+++ b/res/layout/debug.xml
@@ -42,7 +42,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/debug_clear_webview_cache"
- />
+ />
+
Clear WebView cache
+
+ Clear migration state
Force 1-minute refresh for POP/IMAP
diff --git a/src/com/android/email/activity/setup/DebugFragment.java b/src/com/android/email/activity/setup/DebugFragment.java
index d5302c7e1..4264d7f43 100644
--- a/src/com/android/email/activity/setup/DebugFragment.java
+++ b/src/com/android/email/activity/setup/DebugFragment.java
@@ -33,6 +33,7 @@ import com.android.email.R;
import com.android.email.activity.UiUtilities;
import com.android.email.service.EmailServiceUtils;
import com.android.emailcommon.Logging;
+import com.android.mail.preferences.MailPrefs;
import com.android.mail.utils.LogUtils;
public class DebugFragment extends Fragment implements OnCheckedChangeListener,
@@ -73,6 +74,7 @@ public class DebugFragment extends Fragment implements OnCheckedChangeListener,
}
UiUtilities.getView(view, R.id.clear_webview_cache).setOnClickListener(this);
+ UiUtilities.getView(view, R.id.clear_migration_state).setOnClickListener(this);
final CheckBox enableStrictModeView =
UiUtilities.getView(view, R.id.debug_enable_strict_mode);
@@ -112,6 +114,9 @@ public class DebugFragment extends Fragment implements OnCheckedChangeListener,
case R.id.clear_webview_cache:
clearWebViewCache();
break;
+ case R.id.clear_migration_state:
+ clearMigrationState();
+ break;
}
}
@@ -124,4 +129,9 @@ public class DebugFragment extends Fragment implements OnCheckedChangeListener,
webview.destroy();
}
}
+
+ private void clearMigrationState() {
+ MailPrefs prefs = MailPrefs.get(getActivity());
+ prefs.setMigrationState(MailPrefs.PreferenceKeys.MIGRATION_STATE_NONE);
+ }
}