codacy: fix reassigning of variable

This commit is contained in:
AndyScherzinger 2017-08-16 20:40:51 +02:00
parent 620e58a283
commit 4804a799e8
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 6 additions and 5 deletions

View file

@ -62,10 +62,11 @@ public abstract class AuthenticatorUrlUtils {
}
public static String normalizeUrlSuffix(String url) {
if (url.endsWith("/")) {
url = url.substring(0, url.length() - 1);
String normalizedUrl = url;
if (normalizedUrl.endsWith("/")) {
normalizedUrl = normalizedUrl.substring(0, normalizedUrl.length() - 1);
}
return trimUrlWebdav(url);
return trimUrlWebdav(normalizedUrl);
}
public static String normalizeUrl(String url, boolean sslWhenUnprefixed) {

View file

@ -443,14 +443,14 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
createMediaPlayerIfNeeded();
mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
String url = mFile.getStoragePath();
boolean mIsStreaming = false;
/* Streaming is not possible right now
if (url == null || url.length() <= 0) {
url = AccountUtils.constructFullURLForAccount(this, mAccount) + mFile.getRemotePath();
}
mIsStreaming = url.startsWith("http:") || url.startsWith("https:");
*/
//mIsStreaming = false;
mPlayer.setDataSource(url);
mState = State.PREPARING;