cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [04/18] android commit: CB-6315: Wrapping this so it runs on the UI thread
Date Mon, 09 Jun 2014 02:55:03 GMT
CB-6315: Wrapping this so it runs on the UI thread


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/629e05b7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/629e05b7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/629e05b7

Branch: refs/heads/4.0.x
Commit: 629e05b7b1c93108bcdb992f9e7f22656b43cff9
Parents: e98f6ae
Author: Joe Bowser <bowserj@apache.org>
Authored: Thu May 22 12:00:11 2014 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu May 22 12:00:42 2014 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/App.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/629e05b7/framework/src/org/apache/cordova/App.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java
index ead99bc..4b15906 100755
--- a/framework/src/org/apache/cordova/App.java
+++ b/framework/src/org/apache/cordova/App.java
@@ -190,7 +190,11 @@ public class App extends CordovaPlugin {
      * Clear page history for the app.
      */
     public void clearHistory() {
-        this.webView.clearHistory();
+        cordova.getActivity().runOnUiThread(new Runnable() {
+            public void run() {
+                webView.clearHistory();
+            }
+        });
     }
 
     /**


Mime
View raw message