Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 922cb58b authored by Selim Gurun's avatar Selim Gurun
Browse files

Update onPause documentation

onPause() method documentation wrongly claims it stops JS. This could
have been true for very early implementations of Webview which does
not use V8 (pre-honeycomb) however it is not the case anymore
since V8 does not provide a way to stop JS safely for a particular Webview.

Change-Id: I6363dc2ef47c463da6baa417832da750225f5cf2
parent 3358d91d
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1470,11 +1470,12 @@ public class WebView extends AbsoluteLayout
    }

    /**
     * Pauses any extra processing associated with this WebView and its
     * associated DOM, plugins, JavaScript etc. For example, if this WebView is
     * taken offscreen, this could be called to reduce unnecessary CPU or
     * network traffic. When this WebView is again "active", call onResume().
     * Note that this differs from pauseTimers(), which affects all WebViews.
     * Does a best-effort attempt to pause any processing that can be paused
     * safely, such as animations and geolocation. Note that this call
     * does not pause JavaScript. To pause JavaScript globally, use
     * {@link #pauseTimers}.
     *
     * To resume WebView, call {@link #onResume}.
     */
    public void onPause() {
        checkThread();
@@ -1482,7 +1483,7 @@ public class WebView extends AbsoluteLayout
    }

    /**
     * Resumes a WebView after a previous call to onPause().
     * Resumes a WebView after a previous call to {@link #onPause}.
     */
    public void onResume() {
        checkThread();