Removed method that does the same as loadMediaInfo anyway

This commit is contained in:
ByteHamster 2021-02-15 22:02:55 +01:00
parent 339aa936bf
commit 57587c928e
10 changed files with 2 additions and 53 deletions

View File

@ -88,12 +88,6 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
private PlaybackController newPlaybackController() {
return new PlaybackController(this) {
@Override
public void setupGUI() {
MediaplayerActivity.this.setupGUI();
}
@Override
public void onPositionObserverUpdate() {
MediaplayerActivity.this.onPositionObserverUpdate();

View File

@ -41,15 +41,10 @@ public class PlaybackControlsDialog extends DialogFragment {
super.onStart();
controller = new PlaybackController(getActivity()) {
@Override
public void setupGUI() {
public void loadMediaInfo() {
setupUi();
setupAudioTracks();
}
@Override
public void loadMediaInfo() {
}
};
controller.init();
setupUi();

View File

@ -46,11 +46,6 @@ public class SleepTimerDialog extends DialogFragment {
public void onStart() {
super.onStart();
controller = new PlaybackController(getActivity()) {
@Override
public void setupGUI() {
updateTime();
}
@Override
public void onSleepTimerUpdate() {
updateTime();

View File

@ -55,11 +55,6 @@ public class VariableSpeedDialog extends DialogFragment {
public void onStart() {
super.onStart();
controller = new PlaybackController(getActivity()) {
@Override
public void setupGUI() {
updateSpeed();
}
@Override
public void onPlaybackSpeedChange() {
updateSpeed();

View File

@ -312,12 +312,6 @@ public class AudioPlayerFragment extends Fragment implements
private PlaybackController newPlaybackController() {
return new PlaybackController(getActivity()) {
@Override
public void setupGUI() {
AudioPlayerFragment.this.loadMediaInfo();
}
@Override
public void onBufferStart() {
progressIndicator.setVisibility(View.VISIBLE);

View File

@ -76,11 +76,6 @@ public class ChaptersFragment extends Fragment {
ChaptersFragment.this.loadMediaInfo();
}
@Override
public void setupGUI() {
ChaptersFragment.this.loadMediaInfo();
}
@Override
public void onPositionObserverUpdate() {
adapter.notifyDataSetChanged();

View File

@ -120,11 +120,6 @@ public class CoverFragment extends Fragment {
public void loadMediaInfo() {
CoverFragment.this.loadMediaInfo();
}
@Override
public void setupGUI() {
CoverFragment.this.loadMediaInfo();
}
};
controller.init();
loadMediaInfo();

View File

@ -112,11 +112,6 @@ public class ExternalPlayerFragment extends Fragment {
ExternalPlayerFragment.this.loadMediaInfo();
}
@Override
public void setupGUI() {
ExternalPlayerFragment.this.loadMediaInfo();
}
@Override
public void onShutdownNotification() {
((MainActivity) getActivity()).setPlayerVisible(false);

View File

@ -143,11 +143,6 @@ public class ItemDescriptionFragment extends Fragment {
public void loadMediaInfo() {
load();
}
@Override
public void setupGUI() {
ItemDescriptionFragment.this.load();
}
};
controller.init();
load();

View File

@ -193,7 +193,6 @@ public abstract class PlaybackController {
bound = activity.bindService(optionalIntent.get(), mConnection, 0);
} else {
status = PlayerStatus.STOPPED;
setupGUI();
handleStatus();
}
} else {
@ -331,8 +330,6 @@ public abstract class PlaybackController {
}
};
public void setupGUI() {}
public void onPositionObserverUpdate() {}
@ -464,10 +461,9 @@ public abstract class PlaybackController {
status = info.playerStatus;
media = info.playable;
setupGUI();
handleStatus();
// make sure that new media is loaded if it's available
mediaInfoLoaded = false;
handleStatus();
} else {
Log.e(TAG,