Merge pull request #8068 from TacoTheDank/lintCleaning
Some lint cleaning
This commit is contained in:
commit
6d2b5d976d
26 changed files with 55 additions and 52 deletions
|
|
@ -5,7 +5,6 @@ import static org.schabi.newpipe.player.helper.PlayerHelper.formatSpeed;
|
|||
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -601,7 +600,6 @@ public final class PlayQueueActivity extends AppCompatActivity
|
|||
|
||||
//2) Icon change accordingly to current App Theme
|
||||
// using rootView.getContext() because getApplicationContext() didn't work
|
||||
final Context context = queueControlBinding.getRoot().getContext();
|
||||
item.setIcon(player.isMuted() ? R.drawable.ic_volume_off : R.drawable.ic_volume_up);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,8 @@ public class AudioReactor implements AudioManager.OnAudioFocusChangeListener, An
|
|||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
@Override
|
||||
public void onAudioSessionIdChanged(final EventTime eventTime, final int audioSessionId) {
|
||||
public void onAudioSessionIdChanged(@NonNull final EventTime eventTime,
|
||||
final int audioSessionId) {
|
||||
notifyAudioSessionUpdate(true, audioSessionId);
|
||||
}
|
||||
private void notifyAudioSessionUpdate(final boolean active, final int audioSessionId) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ import java.io.File;
|
|||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DataSource createDataSource() {
|
||||
Log.d(TAG, "initExoPlayerCache: cacheDir = " + cacheDir.getAbsolutePath());
|
||||
|
|
@ -86,8 +87,8 @@ import java.io.File;
|
|||
|
||||
Log.d(TAG, "tryDeleteCacheFiles: " + filePath + " deleted = " + deleteSuccessful);
|
||||
}
|
||||
} catch (final Exception ignored) {
|
||||
Log.e(TAG, "Failed to delete file.", ignored);
|
||||
} catch (final Exception e) {
|
||||
Log.e(TAG, "Failed to delete file.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,9 +135,7 @@ public class MediaSessionManager {
|
|||
lastTitleHashCode = title.hashCode();
|
||||
lastArtistHashCode = artist.hashCode();
|
||||
lastDuration = duration;
|
||||
if (optAlbumArt.isPresent()) {
|
||||
lastAlbumArtHashCode = optAlbumArt.get().hashCode();
|
||||
}
|
||||
optAlbumArt.ifPresent(bitmap -> lastAlbumArtHashCode = bitmap.hashCode());
|
||||
}
|
||||
|
||||
private boolean checkIfMetadataShouldBeSet(
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public class PlaybackParameterDialog extends DialogFragment {
|
|||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
@Override
|
||||
public void onAttach(final Context context) {
|
||||
public void onAttach(@NonNull final Context context) {
|
||||
super.onAttach(context);
|
||||
if (context instanceof Callback) {
|
||||
callback = (Callback) context;
|
||||
|
|
@ -151,7 +151,7 @@ public class PlaybackParameterDialog extends DialogFragment {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(final Bundle outState) {
|
||||
public void onSaveInstanceState(@NonNull final Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putDouble(INITIAL_TEMPO_KEY, initialTempo);
|
||||
outState.putDouble(INITIAL_PITCH_KEY, initialPitch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue