[Cleanup] Fixing Warnings
This commit is contained in:
parent
1fdd537253
commit
fa976b1cba
68 changed files with 242 additions and 498 deletions
|
@ -245,7 +245,6 @@ public class MusicService extends MediaBrowserServiceCompat
|
|||
private List<Song> originalPlayingQueue = new ArrayList<>();
|
||||
private List<Song> playingQueue = new ArrayList<>();
|
||||
private boolean pausedByTransientLossOfFocus;
|
||||
private AudioVolumeObserver audioVolumeObserver = null;
|
||||
|
||||
private final BroadcastReceiver becomingNoisyReceiver =
|
||||
new BroadcastReceiver() {
|
||||
|
@ -453,7 +452,7 @@ public class MusicService extends MediaBrowserServiceCompat
|
|||
.registerContentObserver(
|
||||
MediaStore.Audio.Playlists.INTERNAL_CONTENT_URI, true, mediaStoreObserver);
|
||||
|
||||
audioVolumeObserver = new AudioVolumeObserver(this);
|
||||
AudioVolumeObserver audioVolumeObserver = new AudioVolumeObserver(this);
|
||||
audioVolumeObserver.register(AudioManager.STREAM_MUSIC, this);
|
||||
|
||||
PreferenceUtil.INSTANCE.registerOnSharedPreferenceChangedListener(this);
|
||||
|
|
|
@ -38,6 +38,6 @@ class ThrottledSeekHandler(
|
|||
|
||||
companion object {
|
||||
// milliseconds to throttle before calling run() to aggregate events
|
||||
private val THROTTLE: Long = 500
|
||||
private const val THROTTLE: Long = 500
|
||||
}
|
||||
}
|
|
@ -54,7 +54,7 @@ class PlayingNotificationImpl : PlayingNotification(), KoinComponent {
|
|||
stopped = false
|
||||
GlobalScope.launch {
|
||||
val song = service.currentSong
|
||||
val playlist: PlaylistEntity? = MusicUtil.repository.favoritePlaylist()
|
||||
val playlist: PlaylistEntity = MusicUtil.repository.favoritePlaylist()
|
||||
val isPlaying = service.isPlaying
|
||||
val isFavorite = if (playlist != null) {
|
||||
val songEntity = song.toSongEntity(playlist.playListId)
|
||||
|
|
|
@ -183,21 +183,21 @@ class PlayingNotificationOreo : PlayingNotification() {
|
|||
service,
|
||||
R.drawable.ic_close,
|
||||
primary
|
||||
)!!, NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
), NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
)
|
||||
val prev = createBitmap(
|
||||
RetroUtil.getTintedVectorDrawable(
|
||||
service,
|
||||
R.drawable.ic_skip_previous_round_white_32dp,
|
||||
primary
|
||||
)!!, NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
), NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
)
|
||||
val next = createBitmap(
|
||||
RetroUtil.getTintedVectorDrawable(
|
||||
service,
|
||||
R.drawable.ic_skip_next_round_white_32dp,
|
||||
primary
|
||||
)!!, NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
), NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
)
|
||||
val playPause = createBitmap(
|
||||
RetroUtil.getTintedVectorDrawable(
|
||||
|
@ -206,7 +206,7 @@ class PlayingNotificationOreo : PlayingNotification() {
|
|||
R.drawable.ic_pause_white_48dp
|
||||
else
|
||||
R.drawable.ic_play_arrow_white_48dp, primary
|
||||
)!!, NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
), NOTIFICATION_CONTROLS_SIZE_MULTIPLIER
|
||||
)
|
||||
|
||||
notificationLayout.setTextColor(R.id.title, primary)
|
||||
|
@ -233,7 +233,7 @@ class PlayingNotificationOreo : PlayingNotification() {
|
|||
service,
|
||||
R.drawable.ic_notification,
|
||||
secondary
|
||||
)!!, 0.6f
|
||||
), 0.6f
|
||||
)
|
||||
)
|
||||
notificationLayoutBig.setImageViewBitmap(
|
||||
|
@ -243,7 +243,7 @@ class PlayingNotificationOreo : PlayingNotification() {
|
|||
service,
|
||||
R.drawable.ic_notification,
|
||||
secondary
|
||||
)!!, 0.6f
|
||||
), 0.6f
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue