Changes due to Codacy

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-07-13 09:33:27 +02:00
parent 8869e4ce5f
commit c29ccf6f67
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}

View file

@ -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);