update shortcut overrides and other code changes
This commit is contained in:
parent
fc6a71b2c0
commit
d8d5b97d4b
29 changed files with 55 additions and 51 deletions
|
|
@ -55,7 +55,7 @@ public abstract class PlayingNotification {
|
|||
|
||||
if (newNotifyMode == NOTIFY_MODE_FOREGROUND) {
|
||||
service.startForeground(NOTIFICATION_ID, notification);
|
||||
} else if (newNotifyMode == NOTIFY_MODE_BACKGROUND) {
|
||||
} else {
|
||||
notificationManager.notify(NOTIFICATION_ID, notification);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ public class PlayingNotificationNougat extends PlayingNotification {
|
|||
stopped = false;
|
||||
|
||||
final Song song = service.getCurrentSong();
|
||||
|
||||
final boolean isPlaying = service.isPlaying();
|
||||
|
||||
final int playButtonResId = isPlaying
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import com.dkanada.gramophone.model.Song;
|
|||
import com.dkanada.gramophone.util.MusicUtil;
|
||||
import com.dkanada.gramophone.util.PreferenceUtil;
|
||||
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||
import com.google.android.exoplayer2.ExoPlayer;
|
||||
import com.google.android.exoplayer2.Player;
|
||||
import com.google.android.exoplayer2.Player.EventListener;
|
||||
import com.google.android.exoplayer2.MediaItem;
|
||||
import com.google.android.exoplayer2.SimpleExoPlayer;
|
||||
import com.google.android.exoplayer2.database.ExoDatabaseProvider;
|
||||
|
|
@ -35,7 +35,7 @@ public class LocalPlayer implements Playback {
|
|||
|
||||
private PlaybackCallbacks callbacks;
|
||||
|
||||
private final ExoPlayer.EventListener eventListener = new ExoPlayer.EventListener() {
|
||||
private final EventListener eventListener = new EventListener() {
|
||||
@Override
|
||||
public void onPlayWhenReadyChanged(boolean playWhenReady, int reason) {
|
||||
Log.i(TAG, String.format("onPlayWhenReadyChanged: %b %d", playWhenReady, reason));
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ public class NetworkReceiver extends BroadcastReceiver {
|
|||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo netInfo = cm.getActiveNetworkInfo();
|
||||
NetworkInfo networkInfo = cm.getActiveNetworkInfo();
|
||||
|
||||
// network info will be null in airplane mode
|
||||
if (netInfo != null && netInfo.isConnected()) {
|
||||
if (networkInfo != null && networkInfo.isConnected()) {
|
||||
context.sendBroadcast(new Intent(LoginService.STATE_ONLINE));
|
||||
} else {
|
||||
context.sendBroadcast(new Intent(LoginService.STATE_OFFLINE));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue