瀏覽代碼

Fix build errors in SDK 33

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 年之前
父節點
當前提交
e236891827

+ 2 - 1
app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java

@@ -73,6 +73,7 @@ import org.apache.commons.httpclient.methods.GetMethod;
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.InputStream;
 import java.lang.ref.WeakReference;
 import java.net.URLEncoder;
@@ -944,7 +945,7 @@ public final class ThumbnailsCacheManager {
                     } finally {
                         try {
                             retriever.release();
-                        } catch (RuntimeException ex) {
+                        } catch (RuntimeException | IOException ex) {
                             // Ignore failure at this point.
                             Log_OC.w(TAG, "Failed release MediaMetadataRetriever for " + file.getAbsolutePath());
                         }

+ 2 - 3
app/src/main/java/com/owncloud/android/ui/activity/ExternalSiteWebView.java

@@ -193,9 +193,8 @@ public class ExternalSiteWebView extends FileActivity {
         webSettings.setDomStorageEnabled(true);
 
         // caching disabled in debug mode
-        if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
-            webSettings.setAppCacheEnabled(true);
-            webSettings.setAppCachePath(getCacheDir().getPath());
+        if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
+            getWebView().getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
         }
     }