summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-08-07 21:30:22 +0000
committerThomas Martitz <kugel@rockbox.org>2010-08-07 21:30:22 +0000
commitca4439ff65bdc93fc44f4cc1be52aab50217ce78 (patch)
tree06578c5243a9c7b0c4c5dcb322ffb9a4609b5e7a /apps/menu.c
parentf1184f963aea4cb16a5886c71cc662a0503e1cd5 (diff)
downloadrockbox-ca4439ff65bdc93fc44f4cc1be52aab50217ce78.tar.gz
rockbox-ca4439ff65bdc93fc44f4cc1be52aab50217ce78.tar.bz2
rockbox-ca4439ff65bdc93fc44f4cc1be52aab50217ce78.zip
Android port: handle incoming calls.
Stop explicitely if a call comes in, and resume playback (if it was playing before the call) upon hang up. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27746 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/menu.c b/apps/menu.c
index a88d725774..e6afec2d14 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -341,6 +341,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
const struct menu_item_ex *temp, *menu;
int ret = 0, i;
bool redraw_lists;
+ int old_audio_status = audio_status();
FOR_NB_SCREENS(i)
viewportmanager_theme_enable(i, !hide_theme, NULL);
@@ -380,6 +381,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
#endif
while (!done)
{
+ int new_old_audio_statusus;
redraw_lists = false;
if (!hide_theme)
{
@@ -389,6 +391,15 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
}
action = get_action(CONTEXT_MAINMENU,
list_do_action_timeout(&lists, HZ));
+
+ /* query audio status to see if it changed */
+ new_old_audio_statusus = audio_status();
+ if (old_audio_status != new_old_audio_statusus)
+ { /* force a redraw if anything changed the audio status
+ * from outside */
+ redraw_lists = true;
+ old_audio_status = new_old_audio_statusus;
+ }
/* HZ so the status bar redraws corectly */
if (menu_callback)
@@ -410,8 +421,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
if (gui_synclist_do_button(&lists, &action, LIST_WRAP_UNLESS_HELD))
continue;
- if (action == ACTION_NONE)
- continue;
#ifdef HAVE_QUICKSCREEN
else if (action == ACTION_STD_QUICKSCREEN)
{