base: pop view when usb state is changed 03/54803/1
authorJehun Lim <jehun.lim@samsung.com>
Fri, 18 Dec 2015 04:01:29 +0000 (13:01 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Fri, 18 Dec 2015 04:01:29 +0000 (13:01 +0900)
Change-Id: I591b96febb68a5d33e647ed3b19b4b398c4f3edf
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
src/view/base.c

index aba56f2..b318011 100644 (file)
@@ -813,6 +813,7 @@ static void _media_db_updated_cb(media_content_error_e error,
 static void _usb_changed_cb(void *data, int state)
 {
        media_content_noti_h noti_h;
+       struct view_update_data vdata;
        struct _priv *priv;
        int r;
 
@@ -827,6 +828,13 @@ static void _usb_changed_cb(void *data, int state)
                _ERR("failed to add db updated cb: %d", r);
 
        priv->noti_h = noti_h;
+
+       vdata.status = E_PLAYER_STOP;
+       viewmgr_update_view(VIEW_MPLAYER, UPDATE_PLAYER, &vdata);
+
+       /* to show base view */
+       while (viewmgr_active_view_count() > 1)
+               viewmgr_pop_view();
 }
 
 static Evas_Object *_create(Evas_Object *win, void *data)