Skip to content

Conversation

@martincgg
Copy link
Contributor

Created arrayList on ChromeClient that it will register all showed AlertDialog, using CordovaChromeClient class, this applies to AlertDialogs object, included messages, prompts and confirm AlertDialog objects.

When onDestroy() method is called on the CordovaActivity, it will perform a call to ChromeClient class to destroy all AlerDialogs objects registered on the arrayList.
This would perform a cleanup before the CordovaActivity is destroyed.

dlg.show() returns an AlertDialog object, to be added to the arrayList.
It can be:
dialogsManager.add(dlg.show());

But I think it looks cleaner as is already.

Tested on 4.2.2 & 4.4.2.

Use CordovaWebView.handleDestroy() to destroy all dialogs, and remove
any involvement of CordovaActivity.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dlg.show(); can be added complete to the next line, avoiding variable creation.

@martincgg martincgg closed this Sep 22, 2014
@martincgg martincgg deleted the CB-6837 branch September 22, 2014 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant