Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7947

pauseTimers() called too aggressively on Android

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • cordova-android
    • None

    Description

      ML discussion: http://markmail.org/thread/dhs7lnnrhq6z24vb

      Couple of issues:
      1. pauseTimers(), although an instance method, actually applies to all webviews
      2. pauseTimers() is always being called during startActivityForResult(), even though there's no reason to do this.

      Proposed changes:

      • Pause timers during a startActivityForResult only when KeepRunning preference is false (this should happen anyways, since the activity's onPause is fired in this case)
      • 4.0.x branch: Create a setGloballyPauseTimers(boolean) on CordovaWebview interface in 4.0.x that is documented to have the same semantics as WebView.pause/resume timers.
      • 4.0.x branch: Move the pausing & resuming into CordovaActivity, rather than passing it as a boolean to the onPause() function

      Attachments

        Issue Links

          Activity

            People

              agrieve Andrew Grieve
              agrieve Andrew Grieve
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: