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"
package="com.thejoshwa.ultrasonic.androidapp"
a:installLocation="auto"
a:versionCode="36"
a:versionName="1.2.0.9" >
a:versionCode="37"
a:versionName="1.2.0.10" >
<uses-permission a:name="android.permission.INTERNET" />
<uses-permission a:name="android.permission.READ_PHONE_STATE" />

View File

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