inherit sent time generation on state changes
The old code used to drop valid events. example: * Event 1 born * Event 2 born * Event 1 processed * Event 2 dropped This change inherits the 'born' time while still giving UI updates priority
This commit is contained in:
1 parent
f4cbd1053e
commit
12516353f3
1 file changed
+6
-2
@@ -261,8 +261,10 @@ public abstract class PlaybackActivity extends Activity
|
||||
*/
|
||||
public void setState(long uptime, int state)
|
||||
{
|
||||
if (uptime >= mLastStateEvent)
|
||||
if (uptime > mLastStateEvent) {
|
||||
setState(state);
|
||||
mLastStateEvent = uptime;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -327,8 +329,10 @@ public abstract class PlaybackActivity extends Activity
|
||||
*/
|
||||
public void setSong(long uptime, Song song)
|
||||
{
|
||||
if (uptime >= mLastSongEvent)
|
||||
if (uptime > mLastSongEvent) {
|
||||
setSong(song);
|
||||
mLastSongEvent = uptime;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user