Renamed some vars and methods
This commit is contained in:
parent
68dd679824
commit
fe3a70c395
2 changed files with 12 additions and 12 deletions
|
|
@ -32,7 +32,7 @@ public abstract class AbsMusicServiceActivity extends AbsBaseActivity implements
|
||||||
|
|
||||||
public static final int REQUEST_EXTERNAL_STORAGE_PERMISSION = 0;
|
public static final int REQUEST_EXTERNAL_STORAGE_PERMISSION = 0;
|
||||||
|
|
||||||
private final ArrayList<MusicServiceEventListener> mMusicServiceEventListener = new ArrayList<>();
|
private final ArrayList<MusicServiceEventListener> mMusicServiceEventListeners = new ArrayList<>();
|
||||||
|
|
||||||
private MusicPlayerRemote.ServiceToken serviceToken;
|
private MusicPlayerRemote.ServiceToken serviceToken;
|
||||||
private MusicStateReceiver musicStateReceiver;
|
private MusicStateReceiver musicStateReceiver;
|
||||||
|
|
@ -105,21 +105,21 @@ public abstract class AbsMusicServiceActivity extends AbsBaseActivity implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addMusicStateListenerListener(final MusicServiceEventListener listener) {
|
public void addMusicServiceEventListener(final MusicServiceEventListener listener) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
mMusicServiceEventListener.add(listener);
|
mMusicServiceEventListeners.add(listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeMusicStateListenerListener(final MusicServiceEventListener listener) {
|
public void removeMusicServiceEventListener(final MusicServiceEventListener listener) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
mMusicServiceEventListener.remove(listener);
|
mMusicServiceEventListeners.remove(listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayingMetaChanged() {
|
public void onPlayingMetaChanged() {
|
||||||
for (MusicServiceEventListener listener : mMusicServiceEventListener) {
|
for (MusicServiceEventListener listener : mMusicServiceEventListeners) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onPlayingMetaChanged();
|
listener.onPlayingMetaChanged();
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +128,7 @@ public abstract class AbsMusicServiceActivity extends AbsBaseActivity implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayStateChanged() {
|
public void onPlayStateChanged() {
|
||||||
for (MusicServiceEventListener listener : mMusicServiceEventListener) {
|
for (MusicServiceEventListener listener : mMusicServiceEventListeners) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onPlayStateChanged();
|
listener.onPlayStateChanged();
|
||||||
}
|
}
|
||||||
|
|
@ -137,7 +137,7 @@ public abstract class AbsMusicServiceActivity extends AbsBaseActivity implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMediaStoreChanged() {
|
public void onMediaStoreChanged() {
|
||||||
for (MusicServiceEventListener listener : mMusicServiceEventListener) {
|
for (MusicServiceEventListener listener : mMusicServiceEventListeners) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onMediaStoreChanged();
|
listener.onMediaStoreChanged();
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +146,7 @@ public abstract class AbsMusicServiceActivity extends AbsBaseActivity implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRepeatModeChanged() {
|
public void onRepeatModeChanged() {
|
||||||
for (MusicServiceEventListener listener : mMusicServiceEventListener) {
|
for (MusicServiceEventListener listener : mMusicServiceEventListeners) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onRepeatModeChanged();
|
listener.onRepeatModeChanged();
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +155,7 @@ public abstract class AbsMusicServiceActivity extends AbsBaseActivity implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShuffleModeChanged() {
|
public void onShuffleModeChanged() {
|
||||||
for (MusicServiceEventListener listener : mMusicServiceEventListener) {
|
for (MusicServiceEventListener listener : mMusicServiceEventListeners) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onShuffleModeChanged();
|
listener.onShuffleModeChanged();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public abstract class AbsMainActivityRecyclerViewFragment<A extends RecyclerView
|
||||||
}
|
}
|
||||||
|
|
||||||
getMainActivity().addOnAppBarOffsetChangedListener(this);
|
getMainActivity().addOnAppBarOffsetChangedListener(this);
|
||||||
getMainActivity().addMusicStateListenerListener(this);
|
getMainActivity().addMusicServiceEventListener(this);
|
||||||
|
|
||||||
setUpRecyclerView();
|
setUpRecyclerView();
|
||||||
|
|
||||||
|
|
@ -174,7 +174,7 @@ public abstract class AbsMainActivityRecyclerViewFragment<A extends RecyclerView
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
getMainActivity().removeOnAppBarOffsetChangedListener(this);
|
getMainActivity().removeOnAppBarOffsetChangedListener(this);
|
||||||
getMainActivity().removeMusicStateListenerListener(this);
|
getMainActivity().removeMusicServiceEventListener(this);
|
||||||
ButterKnife.unbind(this);
|
ButterKnife.unbind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue