[Cast,Android] Subscribe to onCancel and onDismiss correctly
Subclass DialogFragment classes to get notified about the dialog being cancelled and dismissed. Don't call dismiss() from the onDismiss() handler. BaseMediaRouteDialogManager: - expose mDialogFragment to avoid calling closeDialog() from onDismiss() - add SystemVisibilitySaver to handle the dialogs showing when in FS mode (before was handled by ChromeMediaRouteDialogFactory). MediaRouteChooserDialogManager: - use subclassed MediaRouteChooserDialogFragment - use SystemVisibilitySaver and handle onCancel() and onDismiss() MediaRouteControllerDialogManager: - use subclassed MediaRouteControllerDialogFragment - use SystemVisibilitySaver and handle onDismiss() as onCancel() isn't called. ChromeMediaRouteDialogController: - exit onDialogCancelled() early if onRouteClosed() was called before (see the comment). BUG=551184 Review URL: https://codereview.chromium.org/1463693002 Cr-Commit-Position: refs/heads/master@{#361406}
Showing
Please register or sign in to comment