This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void setMediaPlayer(final MediaPlayerControl player) { | |
Log.d(TAG, "setMediaPlayer called with " + player); | |
super.setMediaPlayer(new MediaPlayerControl() { | |
@Override | |
public void start() { | |
player.start(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private MediaController getMediaController() { | |
MediaController mediaController = new MediaController(this, false) { | |
@Override | |
public void hide() { | |
super.hide(); | |
onMediaControllerHide(); | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public MediaController getMediaController(Context context) { | |
MediaController mediaController = new MediaController(context) { | |
@Override | |
public void setMediaPlayer(MediaPlayerControl player) { | |
super.setMediaPlayer(player); | |
//todo: this causes things to blow up since the Activity is not initialized yet when this is called? | |
//show(0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is the service that plays the audio | |
private ServiceConnection audioServiceConnection = new ServiceConnection() { | |
public void onServiceConnected(ComponentName componentName, IBinder binder) { | |
mediaController = getMediaController(view.getApplicationContext()); | |
Log.d(TAG, "audio service connected"); | |
//noinspection unchecked | |
audioService = ((SimpleBinder<AudioService>) binder).getService(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected PlaylistInfo doInBackground(AudioTrack... params) { | |
// pull the track out of the single element array... | |
final AudioTrack audioTrack = params[0]; | |
// get the content and segment index | |
final Content content = audioTrack.getContent(); | |
final int segment = audioTrack.getSegment(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected PlaylistInfo doInBackground(AudioTrack... params) { | |
// pull the track out of the single element array... | |
final AudioTrack audioTrack = params[0]; | |
// get the content and segment index | |
final Content content = audioTrack.getContent(); | |
final int segment = audioTrack.getSegment(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var carousel_${carouselName} = $('#${carouselName}').bxSlider({ | |
minSlides: 7, | |
maxSlides: 7, | |
slideWidth: 120, | |
slideMargin: 10, | |
pager: false, | |
infiniteLoop: false, | |
controls: true, | |
onSlideNext: function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void bindProperties(Binder binder, String propertiesFile) { | |
log.info("binding {}", propertiesFile); | |
try { | |
final Properties props = new Properties(); | |
props.load(this.getClass().getClassLoader().getResourceAsStream(propertiesFile)); | |
Names.bindProperties(binder, props); | |
} catch (IOException e) { | |
throw new RuntimeException("Could not load " + propertiesFile, e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void should_throw_exception_for_configure() throws Exception { | |
// setup test | |
module = new AWSModule(); | |
final Binder binder = mock(Binder.class); | |
when(binder.skipSources(any(Class.class))).thenThrow(new IOException("WTF")); | |
try { | |
module.configure(binder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class KindService extends BaseCacheService { | |
public static final String LIST = "/browse/kinds/list"; | |
private Logger log = LoggerFactory.getLogger(KindService.class); | |
static List<Kind> cachedList; | |
@Inject | |
public KindService(CacheWrapper<String, Object> cache, | |
HttpExecutor httpExecutor, |
OlderNewer