Disable jukebox by default when the user does not have access

This commit is contained in:
Joshua Bahnsen 2013-12-06 19:52:58 -07:00
parent 58ecfcb724
commit 887b8877d7
2 changed files with 9 additions and 11 deletions

View File

@ -2,8 +2,8 @@
<manifest xmlns:a="http://schemas.android.com/apk/res/android" <manifest xmlns:a="http://schemas.android.com/apk/res/android"
package="com.thejoshwa.ultrasonic.androidapp" package="com.thejoshwa.ultrasonic.androidapp"
a:installLocation="auto" a:installLocation="auto"
a:versionCode="36" a:versionCode="37"
a:versionName="1.2.0.9" > a:versionName="1.2.0.10" >
<uses-permission a:name="android.permission.INTERNET" /> <uses-permission a:name="android.permission.INTERNET" />
<uses-permission a:name="android.permission.READ_PHONE_STATE" /> <uses-permission a:name="android.permission.READ_PHONE_STATE" />

View File

@ -859,28 +859,26 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
} }
} }
if (jukeboxOption != null) if (jukeboxOption != null)
{ {
jukeboxOption.setEnabled(jukeboxAvailable); jukeboxOption.setEnabled(jukeboxAvailable);
jukeboxOption.setVisible(jukeboxAvailable); jukeboxOption.setVisible(jukeboxAvailable);
if (downloadService.isJukeboxEnabled()) if (!jukeboxAvailable)
{ {
if (jukeboxOption != null) downloadService.setJukeboxEnabled(false);
}
if (downloadService.isJukeboxEnabled())
{ {
jukeboxOption.setTitle(R.string.download_menu_jukebox_off); jukeboxOption.setTitle(R.string.download_menu_jukebox_off);
} }
}
else else
{
if (jukeboxOption != null)
{ {
jukeboxOption.setTitle(R.string.download_menu_jukebox_on); jukeboxOption.setTitle(R.string.download_menu_jukebox_on);
} }
} }
} }
}
return true; return true;
} }