am 639c2f80
: am 276f275c
: am 3c38f6ac
: am ef0dc0ac
: am 809313bd
: Merge "Add ability to clear migration state to debug screen" into ub-gmail-ur14-dev
* commit '639c2f80b8a91f0b027f5310cb97fb5f08496405': Add ability to clear migration state to debug screen
This commit is contained in:
commit
205845e61d
@ -42,7 +42,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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
|
||||
android:id="@+id/debug_force_one_minute_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -75,6 +75,8 @@
|
||||
<!-- Do Not Translate. Button label, shown only on debug screen -->
|
||||
<string name="debug_clear_webview_cache" translatable="false">
|
||||
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. -->
|
||||
<string name="debug_force_one_minute_refresh_label" translatable="false">
|
||||
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.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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user