BearND has uploaded a new change for review.

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

Change subject: Updated SquareUp libraries
......................................................................

Updated SquareUp libraries

- Added missing credit for Picasso
- client.setCache does not throw IOException anymore

Highlights from https://github.com/square/picasso/blob/master/CHANGELOG.md:
* Memory and Network policy API controls reading and storing bitmaps in memory 
and/or disk cache.

TODO:
We may not need to use the OkUrlFactory shim in OkHttpConnectionFactory 
anymore, or even the whole class.
Updating acra would require code changes.

Change-Id: I44fd062e2d7c74c5b538146fa5a2fe637d2e9342
---
A wikipedia/assets/licenses/Picasso
M wikipedia/build.gradle
M wikipedia/res/values/credits.xml
M wikipedia/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
4 files changed, 22 insertions(+), 11 deletions(-)


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

diff --git a/wikipedia/assets/licenses/Picasso 
b/wikipedia/assets/licenses/Picasso
new file mode 100644
index 0000000..25fdd59
--- /dev/null
+++ b/wikipedia/assets/licenses/Picasso
@@ -0,0 +1,13 @@
+Copyright 2013 Square, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
diff --git a/wikipedia/build.gradle b/wikipedia/build.gradle
index 858599c..6002aaf 100644
--- a/wikipedia/build.gradle
+++ b/wikipedia/build.gradle
@@ -98,10 +98,10 @@
     compile('org.mediawiki.api:json:1.3.0') {
         exclude group: 'org.json', module: 'json'
     }
-    compile 'com.squareup.okhttp:okhttp-urlconnection:2.1.0'
-    compile 'com.squareup.okhttp:okhttp:2.1.0'
-    compile 'com.squareup:otto:1.3.5'
-    compile 'com.squareup.picasso:picasso:2.4.0'
+    compile 'com.squareup.okhttp:okhttp-urlconnection:2.3.0'
+    compile 'com.squareup.okhttp:okhttp:2.3.0'
+    compile 'com.squareup:otto:1.3.6'
+    compile 'com.squareup.picasso:picasso:2.5.0'
     compile 'com.mobsandgeeks:android-saripaar:1.0.3'
     compile 'com.nineoldandroids:library:2.4.0'
     compile('ch.acra:acra:4.5.0') {
diff --git a/wikipedia/res/values/credits.xml b/wikipedia/res/values/credits.xml
index 15b75a5..bc747cd 100644
--- a/wikipedia/res/values/credits.xml
+++ b/wikipedia/res/values/credits.xml
@@ -29,6 +29,10 @@
         <!-- end of https://github.com/chrisbanes/PhotoView -->
         (<a href="file:///android_asset/licenses/PhotoView">license</a>),
 
+        <a href="https://square.github.io/picasso/";>Picasso</a>
+        <!-- end of http://square.github.io/picasso -->
+        (<a href="file:///android_asset/licenses/Picasso">license</a>),
+
         <a 
href="https://github.com/ragunathjawahar/android-saripaar";>Saripaar</a>
         <!-- end of 
https://github.com/ragunathjawahar/android-saripaar/blob/master/README.md -->
         (<a href="file:///android_asset/licenses/Saripaar">license</a>)
diff --git a/wikipedia/src/main/java/org/wikipedia/OkHttpConnectionFactory.java 
b/wikipedia/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
index 245062d..6f432f7 100644
--- a/wikipedia/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
+++ b/wikipedia/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
@@ -19,13 +19,7 @@
     public OkHttpConnectionFactory(Context context) {
         client = new OkHttpClient();
         
client.setCookieHandler(((WikipediaApp)context.getApplicationContext()).getCookieManager());
-
-        try {
-            client.setCache(new Cache(context.getCacheDir(), HTTP_CACHE_SIZE));
-        } catch (IOException e) {
-            // Shouldn't happen...
-            throw new RuntimeException(e);
-        }
+        client.setCache(new Cache(context.getCacheDir(), HTTP_CACHE_SIZE));
     }
 
     public HttpURLConnection create(URL url) throws IOException {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44fd062e2d7c74c5b538146fa5a2fe637d2e9342
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND <bsitzm...@wikimedia.org>

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

Reply via email to