зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1357639 - part1 : change tab's media playing state when the tab is controlled by media control. r=sebastian
MozReview-Commit-ID: HGuMXut29uB --HG-- extra : rebase_source : fe78344533cb691562e31ce68b382d8e514b349b
This commit is contained in:
Родитель
7b21c27198
Коммит
d9cc434862
|
@ -335,6 +335,14 @@ public class MediaControlService extends Service implements Tabs.OnTabsChangedLi
|
|||
|
||||
}
|
||||
|
||||
private void setMediaStateForTab(boolean isTabPlaying) {
|
||||
final Tab tab = mTabReference.get();
|
||||
if (tab == null) {
|
||||
return;
|
||||
}
|
||||
tab.setIsMediaPlaying(isTabPlaying);
|
||||
}
|
||||
|
||||
private void notifyObservers(String topic, String data) {
|
||||
GeckoAppShell.notifyObservers(topic, data);
|
||||
}
|
||||
|
@ -345,6 +353,7 @@ public class MediaControlService extends Service implements Tabs.OnTabsChangedLi
|
|||
|
||||
private void setState(State newState) {
|
||||
mMediaState = newState;
|
||||
setMediaStateForTab(mMediaState.equals(State.PLAYING));
|
||||
onStateChanged();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче