Browse Source

Changes due to Codacy

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 6 years ago
parent
commit
c29ccf6f67

+ 2 - 1
src/main/java/com/owncloud/android/files/StreamMediaFileOperation.java

@@ -82,8 +82,9 @@ public class StreamMediaFileOperation extends RemoteOperation {
             Log_OC.e(TAG, "Get stream url for file with id " + fileID + " failed: " + result.getLogMessage(),
                     result.getException());
         } finally {
-            if (postMethod != null)
+            if (postMethod != null) {
                 postMethod.releaseConnection();
+            }
         }
         return result;
     }

+ 1 - 1
src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -2329,7 +2329,7 @@ public class FileDisplayActivity extends HookActivity
      */
     public void startMediaPreview(OCFile file, int startPlaybackPosition, boolean autoplay, boolean showPreview,
                                   boolean streamMedia) {
-        if ((showPreview && file.isDown() && !file.isDownloading()) || streamMedia) {
+        if (showPreview && file.isDown() && !file.isDownloading() || streamMedia) {
             Fragment mediaFragment = PreviewMediaFragment.newInstance(file, getAccount(), startPlaybackPosition, autoplay);
             setSecondFragment(mediaFragment);
             updateFragmentsVisibility(true);