am ef0dc0ac
: am 809313bd
: Merge "Add ability to clear migration state to debug screen" into ub-gmail-ur14-dev
* commit 'ef0dc0ac016776c704ccd5ea9805b610664bc46f': Add ability to clear migration state to debug screen
This commit is contained in:
commit
3c38f6ac95
@ -42,7 +42,13 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/debug_clear_webview_cache"
|
android:text="@string/debug_clear_webview_cache"
|
||||||
/>
|
/>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/clear_migration_state"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/debug_clear_migration_state"
|
||||||
|
/>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/debug_force_one_minute_refresh"
|
android:id="@+id/debug_force_one_minute_refresh"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -75,6 +75,8 @@
|
|||||||
<!-- Do Not Translate. Button label, shown only on debug screen -->
|
<!-- Do Not Translate. Button label, shown only on debug screen -->
|
||||||
<string name="debug_clear_webview_cache" translatable="false">
|
<string name="debug_clear_webview_cache" translatable="false">
|
||||||
Clear WebView cache</string>
|
Clear WebView cache</string>
|
||||||
|
<!-- Do Not Translate. Button label. Shown only on debug screen -->
|
||||||
|
<string name="debug_clear_migration_state" translatable="false">Clear migration state</string>
|
||||||
<!-- Do Not Translate. Checkbox label, shown on debug screen. -->
|
<!-- Do Not Translate. Checkbox label, shown on debug screen. -->
|
||||||
<string name="debug_force_one_minute_refresh_label" translatable="false">
|
<string name="debug_force_one_minute_refresh_label" translatable="false">
|
||||||
Force 1-minute refresh for POP/IMAP</string>
|
Force 1-minute refresh for POP/IMAP</string>
|
||||||
|
@ -33,6 +33,7 @@ import com.android.email.R;
|
|||||||
import com.android.email.activity.UiUtilities;
|
import com.android.email.activity.UiUtilities;
|
||||||
import com.android.email.service.EmailServiceUtils;
|
import com.android.email.service.EmailServiceUtils;
|
||||||
import com.android.emailcommon.Logging;
|
import com.android.emailcommon.Logging;
|
||||||
|
import com.android.mail.preferences.MailPrefs;
|
||||||
import com.android.mail.utils.LogUtils;
|
import com.android.mail.utils.LogUtils;
|
||||||
|
|
||||||
public class DebugFragment extends Fragment implements OnCheckedChangeListener,
|
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_webview_cache).setOnClickListener(this);
|
||||||
|
UiUtilities.getView(view, R.id.clear_migration_state).setOnClickListener(this);
|
||||||
|
|
||||||
final CheckBox enableStrictModeView =
|
final CheckBox enableStrictModeView =
|
||||||
UiUtilities.getView(view, R.id.debug_enable_strict_mode);
|
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:
|
case R.id.clear_webview_cache:
|
||||||
clearWebViewCache();
|
clearWebViewCache();
|
||||||
break;
|
break;
|
||||||
|
case R.id.clear_migration_state:
|
||||||
|
clearMigrationState();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,4 +129,9 @@ public class DebugFragment extends Fragment implements OnCheckedChangeListener,
|
|||||||
webview.destroy();
|
webview.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void clearMigrationState() {
|
||||||
|
MailPrefs prefs = MailPrefs.get(getActivity());
|
||||||
|
prefs.setMigrationState(MailPrefs.PreferenceKeys.MIGRATION_STATE_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user