]> git.ipfire.org Git - people/ms/strongswan.git/commit
android: Avoid IllegalStateException when importing certificates
authorTobias Brunner <tobias@strongswan.org>
Fri, 6 May 2016 10:41:33 +0000 (12:41 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 6 May 2016 10:51:49 +0000 (12:51 +0200)
commit1130dbc408da340dc90ba0dcb72bf0821167ba09
tree94099366bc49b12b70685f7f866347dda2f9517a
parentb9522f9d64371c9b620f398852e4ade857105974
android: Avoid IllegalStateException when importing certificates

When certificates are imported via Storage Access Framework we did handle
the selection directly in onActivityResult().  However, at that point the
activity might apparently not yet be resumed.  So committing
FragmentTransactions could result in IllegalStateExceptions due to the
potential state loss.  To avoid that we cache the returned URI and wait
until onPostResume() to make sure the activity's state is fully restored
before showing the confirmation dialog.
src/frontends/android/app/src/main/java/org/strongswan/android/ui/TrustedCertificateImportActivity.java