Remove oldState in the changed broadcast
It is not really all that useful
This commit is contained in:
parent
e11c0fec25
commit
2116ca6fa6
@ -121,9 +121,7 @@ public abstract class PlaybackActivity extends Activity implements ServiceConnec
|
||||
|
||||
protected void onServiceChange(Intent intent)
|
||||
{
|
||||
int newState = intent.getIntExtra("newState", 0);
|
||||
if (intent.getIntExtra("oldState", 0) != newState)
|
||||
setState(newState);
|
||||
setState(intent.getIntExtra("state", 0));
|
||||
}
|
||||
|
||||
private BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||
|
@ -412,8 +412,7 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
||||
{
|
||||
if (newState != oldState || song != mLastSongBroadcast) {
|
||||
Intent intent = new Intent(EVENT_CHANGED);
|
||||
intent.putExtra("oldState", oldState);
|
||||
intent.putExtra("newState", newState);
|
||||
intent.putExtra("state", newState);
|
||||
intent.putExtra("song", song);
|
||||
sendBroadcast(intent);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user