Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/122548

Change subject: [Gingerbread] Workaround for SaneAsyncTask: no executeOnExecutor
......................................................................

[Gingerbread] Workaround for SaneAsyncTask: no executeOnExecutor

This may not properly parallelize things.

Change-Id: I42231c7152b97a7676b7192e3c1b0ac8433b99d4
---
M wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/48/122548/1

diff --git 
a/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java 
b/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
index 18f62e7..21c039d 100644
--- a/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java
@@ -73,7 +73,12 @@
      * Start performing the task on the executor specified.
      */
     public void execute() {
-        underlyingTask.executeOnExecutor(executor);
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+            underlyingTask.executeOnExecutor(executor);
+        } else {
+            // May or may not actually parallelize as expected
+            underlyingTask.execute();
+        }
     }
 
     /**

-- 
To view, visit https://gerrit.wikimedia.org/r/122548
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42231c7152b97a7676b7192e3c1b0ac8433b99d4
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER <br...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to