- removed help function
authortobiasKaminsky <tobias@kaminsky.me>
Sun, 21 Sep 2014 17:29:33 +0000 (19:29 +0200)
committertobiasKaminsky <tobias@kaminsky.me>
Sun, 21 Sep 2014 17:29:33 +0000 (19:29 +0200)
src/com/owncloud/android/ui/adapter/FileListListAdapter.java

index afda0f0..fbec5d1 100644 (file)
@@ -222,15 +222,15 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                         Log_OC.d("Thumbnail", "URI: " + uri);\r
                         GetMethod get = new GetMethod(uri);\r
                         status = client.executeMethod(get);\r
-                        if(isSuccess(status)) {\r
+                        if(status == HttpStatus.SC_OK) {\r
                             byte[] bytes = get.getResponseBody();\r
                             Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\r
-                          thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);\r
-                            \r
+                            thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);\r
+\r
                             // Add thumbnail to cache\r
-                          if (thumbnail != null){\r
-                              addBitmapToCache(imageKey, thumbnail);\r
-                          }\r
+                            if (thumbnail != null){\r
+                                addBitmapToCache(imageKey, thumbnail);\r
+                            }\r
                         }\r
                     } catch(Exception e){\r
                       e.printStackTrace();\r
@@ -239,12 +239,7 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
             }\r
             return thumbnail;\r
         }\r
-            \r
-            private boolean isSuccess(int status) {\r
-                return (status == HttpStatus.SC_OK);\r
-            }\r
-\r
-        \r
+                    \r
         protected void onPostExecute(Bitmap bitmap){\r
             if (isCancelled()) {\r
                 bitmap = null;\r