GitHub user martincgg opened a pull request:
https://github.com/apache/cordova-android/pull/117
[CB-6837][Android] Fix: leaked window when hitting back button while alert
being rendered
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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/martincgg/cordova-android CB-6837
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-android/pull/117.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #117
----
commit 1dcadbcbb28053b5f9ec81feb2d40660d2978974
Author: Martin Gonzalez <[email protected]>
Date: 2014-08-22T22:43:04Z
[CB-6837 - Android] Fix leaked window when hitting back button while alert
being rendered
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---