Merge remote-tracking branch 'remotes/upstream/material_buttons' into beta
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / adapter / DiskLruImageCache.java
index 93efdf1..5a53a86 100644 (file)
@@ -1,5 +1,7 @@
-/* ownCloud Android client application
- *   Copyright (C) 2012-2014 ownCloud Inc.
+/**
+ *   ownCloud Android client application
+ *
+ *   Copyright (C) 2015 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
@@ -118,10 +120,10 @@ public class DiskLruImageCache {
             }
             final InputStream in = snapshot.getInputStream( 0 );
             if ( in != null ) {
             }
             final InputStream in = snapshot.getInputStream( 0 );
             if ( in != null ) {
-                final BufferedInputStream buffIn = 
+                final BufferedInputStream buffIn =
                 new BufferedInputStream( in, IO_BUFFER_SIZE );
                 new BufferedInputStream( in, IO_BUFFER_SIZE );
-                bitmap = BitmapFactory.decodeStream( buffIn );              
-            }   
+                bitmap = BitmapFactory.decodeStream( buffIn );
+            }
         } catch ( IOException e ) {
             e.printStackTrace();
         } finally {
         } catch ( IOException e ) {
             e.printStackTrace();
         } finally {
@@ -191,4 +193,12 @@ public class DiskLruImageCache {
             e.printStackTrace();
         }
     }
             e.printStackTrace();
         }
     }
+
+    public void setMaxSize(long maxSize){
+        mDiskCache.setMaxSize(maxSize);
+    }
+
+    public long getMaxSize(){
+        return mDiskCache.getMaxSize();
+    }
 }
\ No newline at end of file
 }
\ No newline at end of file