Description[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
Committed: https://crrev.com/68cf0b8360a8ea1dbcd5efb524e7831e1c22bd66
Cr-Commit-Position: refs/heads/master@{#361406}
Patch Set 1 #
Total comments: 10
Patch Set 2 : Addressed the comments. #
Messages
Total messages: 13 (5 generated)
|