Back to project page PlayerHater.
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.
package org.prx.playerhater.wrappers; /*from w ww.jav a 2s .com*/ import org.prx.playerhater.ipc.IPlayerHaterClient; import org.prx.playerhater.service.PlayerHaterService; import android.app.Notification; public class ThreadsafeServicePlayerHater extends ThreadsafePlayerHater { private final PlayerHaterService mService; public ThreadsafeServicePlayerHater(PlayerHaterService service) { super(new ServicePlayerHater(service)); mService = service; } /* * 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 boolean pause(final boolean fromApp) { return new PlayerHaterTask<Boolean>(mHandler) { @Override protected Boolean run() { return mService.pause(fromApp); } }.get(); } public void duck() { mService.duck(); } public void unduck() { mService.unduck(); } }