Android Open Source - PlayerHater Service Player Hater






From Project

Back to project page PlayerHater.

License

The source code is released under:

Apache License

If you think the Android project PlayerHater listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.prx.playerhater.wrappers;
/*  w  w w .j a  v a  2 s  .c  om*/
import org.prx.playerhater.PlayerHater;
import org.prx.playerhater.Song;
import org.prx.playerhater.ipc.IPlayerHaterClient;
import org.prx.playerhater.service.PlayerHaterService;

import android.app.Notification;
import android.app.PendingIntent;

public class ServicePlayerHater extends PlayerHater {
  private final PlayerHaterService mService;

  public ServicePlayerHater(PlayerHaterService service) {
    mService = service;
  }

  @Override
  public boolean pause() {
    return mService.pause();
  }

  @Override
  public boolean stop() {
    return mService.stop();
  }

  @Override
  public boolean play() {
    return mService.play();
  }

  @Override
  public boolean play(int startTime) {
    return mService.play(startTime);
  }

  @Override
  public boolean play(Song song) {
    return play(song, 0);
  }

  @Override
  public boolean play(Song song, int startTime) {
    return mService.play(song, startTime);
  }

  @Override
  public boolean seekTo(int startTime) {
    return mService.seekTo(startTime);
  }

  @Override
  public int enqueue(Song song) {
    return mService.enqueue(song);
  }

  @Override
  public void enqueue(int position, Song song) {
    mService.enqueue(position, song);
  }

  @Override
  public boolean skipTo(int position) {
    return mService.skipTo(position);
  }

  @Override
  public void skip() {
    mService.skip();
  }

  @Override
  public void skipBack() {
    mService.skipBack();
  }

  @Override
  public void emptyQueue() {
    mService.emptyQueue();
  }

  @Override
  public int getCurrentPosition() {
    return mService.getCurrentPosition();
  }

  @Override
  public int getDuration() {
    return mService.getDuration();
  }

  @Override
  public Song nowPlaying() {
    return mService.nowPlaying();
  }

  @Override
  public boolean isPlaying() {
    return mService.isPlaying();
  }

  @Override
  public boolean isLoading() {
    return mService.isLoading();
  }

  @Override
  public int getState() {
    return mService.getState();
  }

  @Override
  public void setTransportControlFlags(int transportControlFlags) {
    mService.setTransportControlFlags(transportControlFlags);
  }

  @Override
  public int getQueueLength() {
    return mService.getQueueLength();
  }

  @Override
  public int getQueuePosition() {
    return mService.getQueuePosition();
  }

  @Override
  public boolean removeFromQueue(int position) {
    return mService.removeFromQueue(position);
  }

  @Override
  public void setPendingIntent(PendingIntent intent) {
    mService.setPendingIntent(intent);
  }

  /*
   * Service Specific stuff.
   */

  public void setClient(IPlayerHaterClient client) {
    mService.setClient(client);
  }

  public void onRemoteControlButtonPressed(int keyCode) {
    mService.onRemoteControlButtonPressed(keyCode);
  }

  public void startForeground(int notificationNu, Notification notification) {
    mService.startForeground(notificationNu, notification);
  }

  public void stopForeground(boolean removeNotification) {
    mService.stopForeground(removeNotification);
    mService.quit();
  }

  public void duck() {
    mService.duck();
  }

  public void unduck() {
    mService.unduck();
  }

  @Override
  public int getTransportControlFlags() {
    return mService.getTransportControlFlags();
  }
}




Java Source Code List

.AbstractPlugin.java
.AudioFocusPlugin.java
.BackgroundedPlugin.java
.BoundPlayerHater.java
.BroadcastReceiver.java
.ClientPlugin.java
.Config.java
.ExpandableNotificationPlugin.java
.HeadphoneButtonGestureHelper.java
.IPlayerHater.java
.LockScreenControlsPlugin.java
.Log.java
.MediaPlayerPool.java
.NotificationPlugin.java
.OnAudioFocusChangedListener.java
.PebblePlugin.java
.PlaybackService.java
.PlayerHaterClient.java
.PlayerHaterListenerPlugin.java
.PlayerHaterListener.java
.PlayerHaterPlugin.java
.PlayerHaterServer.java
.PlayerHaterService.java
.PlayerHater.java
.PlayerStateWatcher.java
.Player.java
.PlaylistParser.java
.PlaylistSupportingPlayer.java
.PluginCollection.java
.Receiver.java
.RemoteControlButtonReceiver.java
.RemoteSong.java
.ServerPlayerHater.java
.ServicePlayerHater.java
.SongHost.java
.SongQueue.java
.Song.java
.Songs.java
.StatelyPlayer.java
.SynchronousPlayer.java
.ThreadsafePlayerHater.java
.ThreadsafeServicePlayerHater.java
.TouchableNotificationPlugin.java
org.prx.playerhater.BroadcastReceiver.java
org.prx.playerhater.PlaybackService.java
org.prx.playerhater.PlayerHaterListener.java
org.prx.playerhater.PlayerHaterPlugin.java
org.prx.playerhater.PlayerHater.java
org.prx.playerhater.Song.java
org.prx.playerhater.broadcast.HeadphoneButtonGestureHelper.java
org.prx.playerhater.broadcast.OnAudioFocusChangedListener.java
org.prx.playerhater.broadcast.Receiver.java
org.prx.playerhater.broadcast.RemoteControlButtonReceiver.java
org.prx.playerhater.ipc.ClientPlugin.java
org.prx.playerhater.ipc.PlayerHaterClient.java
org.prx.playerhater.ipc.PlayerHaterServer.java
org.prx.playerhater.ipc.ServerPlayerHater.java
org.prx.playerhater.mediaplayer.MediaPlayerPool.java
org.prx.playerhater.mediaplayer.Player.java
org.prx.playerhater.mediaplayer.PlaylistSupportingPlayer.java
org.prx.playerhater.mediaplayer.StatelyPlayer.java
org.prx.playerhater.mediaplayer.SynchronousPlayer.java
org.prx.playerhater.plugins.AbstractPlugin.java
org.prx.playerhater.plugins.AudioFocusPlugin.java
org.prx.playerhater.plugins.BackgroundedPlugin.java
org.prx.playerhater.plugins.ExpandableNotificationPlugin.java
org.prx.playerhater.plugins.LockScreenControlsPlugin.java
org.prx.playerhater.plugins.NotificationPlugin.java
org.prx.playerhater.plugins.PebblePlugin.java
org.prx.playerhater.plugins.PlayerHaterListenerPlugin.java
org.prx.playerhater.plugins.PluginCollection.java
org.prx.playerhater.plugins.ScrubbableLockScreenControlsPlugin.java
org.prx.playerhater.plugins.TouchableNotificationPlugin.java
org.prx.playerhater.service.PlayerHaterService.java
org.prx.playerhater.service.PlayerStateWatcher.java
org.prx.playerhater.songs.RemoteSong.java
org.prx.playerhater.songs.SongHost.java
org.prx.playerhater.songs.SongQueue.java
org.prx.playerhater.songs.Songs.java
org.prx.playerhater.util.Config.java
org.prx.playerhater.util.IPlayerHater.java
org.prx.playerhater.util.Log.java
org.prx.playerhater.util.PlaylistParser.java
org.prx.playerhater.wrappers.BoundPlayerHater.java
org.prx.playerhater.wrappers.ServicePlayerHater.java
org.prx.playerhater.wrappers.ThreadsafePlayerHater.java
org.prx.playerhater.wrappers.ThreadsafeServicePlayerHater.java