Skip to content

Commit

Permalink
Revert the streaming change for Gingerbread and older
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Steele committed Jul 10, 2012
1 parent d2fa575 commit 9e20e19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fm.last.android" android:versionCode="61" android:versionName="1.9.9">
package="fm.last.android" android:versionCode="62" android:versionName="1.9.9.1">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
14 changes: 8 additions & 6 deletions app/src/fm/last/android/player/RadioPlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -728,13 +728,15 @@ private void playTrack(RadioTrack track, MediaPlayer p) {
track.setLocationUrl(newURL.toString());
}
String url = track.getLocationUrl();
//Stream through a proxy to enforce one connection per track
if (proxy == null) {
proxy = new StreamProxy();
proxy.init();
proxy.start();
//Stream through a proxy to enforce one connection per track (Honeycomb+)
if(Integer.decode(Build.VERSION.SDK) >= 11) {
if (proxy == null) {
proxy = new StreamProxy();
proxy.init();
proxy.start();
}
url = String.format("http://127.0.0.1:%d/%s",proxy.getPort(), url);
}
url = String.format("http://127.0.0.1:%d/%s",proxy.getPort(), url);
if(!wifiLock.isHeld())
wifiLock.acquire();
if(!wakeLock.isHeld())
Expand Down

0 comments on commit 9e20e19

Please sign in to comment.