aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/res/menu/nowplaying.xml5
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java6
2 files changed, 11 insertions, 0 deletions
diff --git a/subsonic-android/res/menu/nowplaying.xml b/subsonic-android/res/menu/nowplaying.xml
index c8097bf0..859fb108 100644
--- a/subsonic-android/res/menu/nowplaying.xml
+++ b/subsonic-android/res/menu/nowplaying.xml
@@ -28,4 +28,9 @@
<item
android:id="@+id/menu_toggle_now_playing"
android:title="@string/download.show_downloading"/>
+
+ <item
+ android:id="@+id/menu_exit"
+ android:icon="@drawable/action_exit"
+ android:title="@string/menu.exit"/>
</menu>
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
index 0670b148..c2f8c7f8 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
@@ -610,6 +610,12 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
case R.id.menu_toggle_now_playing:
toggleNowPlaying();
return true;
+ case R.id.menu_exit:
+ intent = new Intent(this, MainActivity.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ intent.putExtra(Constants.INTENT_EXTRA_NAME_EXIT, true);
+ Util.startActivityWithoutTransition(this, intent);
+ return true;
default:
return false;
}