mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1311245 - part3 : mActionState should only store resume/pause/stop. r=sebastian
There is no big difference between 'ACTION_RESUME' and 'ACTION_RESUME_BY_AUDIO_FOCUS', we can simplify it. MozReview-Commit-ID: 4nqfgoopuJ6 --HG-- extra : rebase_source : adf46ef7f3ccd81ed68c02ba32187a8da8b8c7a0
This commit is contained in:
parent
8800fa805c
commit
95c44cf1ee
@ -134,8 +134,7 @@ public class MediaControlService extends Service implements Tabs.OnTabsChangedLi
|
||||
}
|
||||
|
||||
private boolean isMediaPlaying() {
|
||||
return mActionState.equals(ACTION_RESUME) ||
|
||||
mActionState.equals(ACTION_RESUME_BY_AUDIO_FOCUS);
|
||||
return mActionState.equals(ACTION_RESUME);
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
@ -251,11 +250,9 @@ public class MediaControlService extends Service implements Tabs.OnTabsChangedLi
|
||||
} else if (action.equals(ACTION_PAUSE_BY_AUDIO_FOCUS)) {
|
||||
Log.d(LOGTAG, "Controller, pause by audio focus changed");
|
||||
notifyControlInterfaceChanged(ACTION_RESUME);
|
||||
mActionState = ACTION_PAUSE_BY_AUDIO_FOCUS;
|
||||
} else if (action.equals(ACTION_RESUME_BY_AUDIO_FOCUS)) {
|
||||
Log.d(LOGTAG, "Controller, resume by audio focus changed");
|
||||
notifyControlInterfaceChanged(ACTION_PAUSE);
|
||||
mActionState = ACTION_RESUME_BY_AUDIO_FOCUS;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user