Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android GH-470 InAppBrowser: java.lang.IllegalArgumentException #616

Merged
merged 1 commit into from
Mar 20, 2020

Conversation

Slayterik
Copy link
Contributor

Fix interacting with views when Activity destroyed
Bug description https://stackoverflow.com/questions/22924825/view-not-attached-to-window-manager-crash

Platforms affected

Android

Motivation and Context

Closes #470

Description

Fix check is activity not destroyed before interacting with it

Testing

As described in https://github.com/apache/cordova-plugin-inappbrowser/blob/master/CONTRIBUTING.md

Checklist

  • [ V] I've run the tests to see all new and existing tests pass
  • [ X] I added automated test coverage as appropriate for this change
    I can`t reproduce the problem. But this commit stop error messages in Firebase Crashlitics
  • [V ] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [V ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [V ] I've updated the documentation if necessary
    (not necessary)

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
LGTM. I'd like to get a second review though.

@timbru31 timbru31 requested review from breautek and removed request for janpio March 17, 2020 11:26
@timbru31
Copy link
Member

Merging now. Since this has no real repro, we should monitor if we still receive IllegalArgumentExceptions. In this case, we can further guard the dismiss check with isShowing() and/or context instanceof Activity.

This also closes CB-12754.

@timbru31 timbru31 merged commit e658c8c into apache:master Mar 20, 2020
expertanswerz pushed a commit to expertanswerz/cordova-plugin-inappbrowser that referenced this pull request Apr 9, 2020
* master:
  docs: replaces outdated transition and presentation style links (apache#662)
  chore: remove deprecated orientation methods (apache#666)
  Fix incorrect TypeScript typings (apache#515)
  [apacheGH-652] add check for openInSystem postNotification (apache#654)
  ci: updates Node.js versions (apache#659)
  chore(npm): improve ignore list (apache#658)
  fix(android): Reset lefttoright if not set (apache#442)
  [android] Correcting the documentation regarding lefttoright opt… (apache#648)
  (android) Added option to turn on/off fullscreen mode in Android (apache#634)
  Android apacheGH-470 InAppBrowser: java.lang.IllegalArgumentException (apache#616)
  breaking(ios): remove UIWebView (apache#635)
  chore(release): 3.2.1-dev
rufiange pushed a commit to jalios/cordova-plugin-inappbrowser that referenced this pull request Apr 15, 2020
…apache#616)

Fix interacting with views when Activity destroyed
Bug description https://stackoverflow.com/questions/22924825/view-not-attached-to-window-manager-crash

Co-authored-by: Sarafanov Valeriy <sarafanov_v@firma-gamma.ru>
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.

InAppBrowser: java.lang.IllegalArgumentException
2 participants