mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Re-enable multitasking in onResume Java callback so that onResume JS handlers are called - it was being re-enabled too soon.
This commit is contained in:
parent
26adfb6346
commit
ab8950a5af
@ -621,7 +621,13 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
// If app doesn't want to run in background
|
// If app doesn't want to run in background
|
||||||
if (!this.keepRunning) {
|
if (!this.keepRunning || this.activityResultKeepRunning) {
|
||||||
|
|
||||||
|
// Restore multitasking state
|
||||||
|
if (this.activityResultKeepRunning) {
|
||||||
|
this.keepRunning = this.activityResultKeepRunning;
|
||||||
|
this.activityResultKeepRunning = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Forward to plugins
|
// Forward to plugins
|
||||||
this.pluginManager.onResume();
|
this.pluginManager.onResume();
|
||||||
@ -1089,9 +1095,6 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
Plugin callback = this.activityResultCallback;
|
Plugin callback = this.activityResultCallback;
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.onActivityResult(requestCode, resultCode, intent);
|
callback.onActivityResult(requestCode, resultCode, intent);
|
||||||
|
|
||||||
// Restore multitasking state
|
|
||||||
this.keepRunning = this.activityResultKeepRunning;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user