* resume credential storage settings in onResume() in case if a new activity changes the settings and switches back. * reset mRetry in case the dialog is retried and canceled. * update preferences in onDismiss handler in case the dialog is canceled and need to revert the checkbox.