Remove oldState in the changed broadcast

It is not really all that useful
This commit is contained in:
Christopher Eby committed 2010-03-28 21:45:17 -05:00
1 parent e11c0fec25
commit 2116ca6fa6
2 files changed
+2 -5

No files matched your search

+1 -3
View File
@@ -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() {
+1 -2
View File
@@ -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);