Skip to content

Commit

Permalink
Attempt to fix intermittent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ReallySmallSoftware committed Mar 10, 2018
1 parent d18babf commit 4676bfc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
3 changes: 3 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ AndroidManifest.xml is automatically updated to use the new MainActivity.
Based on cordova-android-fragments (https://github.com/rajivnarayana/CordovaFragments)

# History
## 0.0.5
- Attempt to avoid crash only seen on Galaxy J1 Ace (5.1.1)

## 0.0.4
- Experimental support for cordova-android 7
- Increased dependency versions
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-android-fragmentactivity",
"version": "0.0.4",
"version": "0.0.5",
"description": "An android plugin that provides a replacement activity to the default activity to start a cordova application with MainActivity as a Fragment Activity. Useful when you want to add native views on top of cordova webview.",
"cordova": {
"id": "cordova-plugin-android-fragmentactivity",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-android-fragmentactivity" version="0.0.4">
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-android-fragmentactivity" version="0.0.5">

<name>Cordova Android FragmentActivity Plugin</name>
<description>An android plugin that provides a replacement activity to the default activity to start a cordova application with MainActivity as a Fragment Activity. Useful when you want to add native views on top of cordova webview.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,17 @@ public void onStart() {
/**
* The final call you receive before your activity is destroyed.
*/
@Override
public void onDestroy() {
LOG.d(TAG, "CordovaActivity.onDestroy()");
super.onDestroy();

if (this.appView != null) {
appView.handleDestroy();
}
}
@Override
public void onDestroy() {
LOG.d(TAG, "CordovaActivity.onDestroy()");
if (getActivity() != null) {
super.onDestroy();
}

if (this.appView != null) {
appView.handleDestroy();
}
}

@Override
public void startActivityForResult(Intent intent, int requestCode) {
Expand Down

0 comments on commit 4676bfc

Please sign in to comment.