Skip to content

Commit

Permalink
Workaround for Acer A500 tablets
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Steele committed May 7, 2012
1 parent 1cc49dc commit 5283b76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/fm/last/android/player/RadioPlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,10 @@ public boolean onError(MediaPlayer p, int what, int extra) {

private void playTrack(RadioTrack track, MediaPlayer p) {
try {
if (mState == STATE_STOPPED || mState == STATE_PAUSED || mState == STATE_PREPARING) {
logger.severe("playTrack() called from wrong state!");
return;
}
if (p == mp) {
currentTrack = track;
RadioWidgetProvider.updateAppWidget_playing(this, track.getTitle(), track.getCreator(), 0, 0, true, track.getLoved(), false);
Expand All @@ -699,13 +703,9 @@ private void playTrack(RadioTrack track, MediaPlayer p) {
URL newURL = UrlUtil.getRedirectedUrl(new URL(track.getLocationUrl()));
track.setLocationUrl(newURL.toString());
}
if (mState == STATE_STOPPED || mState == STATE_PAUSED || mState == STATE_PREPARING) {
logger.severe("playTrack() called from wrong state!");
return;
}
String url = track.getLocationUrl();
//Stream through a proxy on Honeycomb to enforce one connection per track
if(Integer.decode(Build.VERSION.SDK) > 10 && Integer.decode(Build.VERSION.SDK) < 14) {
if(Integer.decode(Build.VERSION.SDK) > 10 && (Integer.decode(Build.VERSION.SDK) < 14 || Build.MODEL.equals("A500") || Build.MODEL.equals("ST18i"))) {
if (proxy == null) {
proxy = new StreamProxy();
proxy.init();
Expand Down

0 comments on commit 5283b76

Please sign in to comment.