using 2 additional app-control operations to distinguish what module("do not distur... 99/66399/3 accepted/tizen/mobile/20160423.055842 submit/tizen/20160426.105621 submit/tizen_mobile/20160422.143034
authorAndrey Klimenko <and.klimenko@samsung.com>
Mon, 18 Apr 2016 14:50:50 +0000 (17:50 +0300)
committerGennadiy Azarov <gen.azarov@samsung.com>
Thu, 21 Apr 2016 13:55:09 +0000 (06:55 -0700)
Change-Id: I6c72d0077467444d3af5c05b95e4e36d2ddea75c
Signed-off-by: Andrey Klimenko <and.klimenko@samsung.com>
src/main.c
tizen-manifest.xml

index 38dbd29..18492f7 100755 (executable)
@@ -24,6 +24,9 @@
 #include "excepted-apps-efl.h"
 #include "common-efl.h"
 
+#define DO_NOT_DISTURB_OP "http://tizen.org/appcontrol/operation/setting/do_not_disturb"
+#define APP_NOTIFICATIONS_OP "http://tizen.org/appcontrol/operation/setting/app_notifications"
+
 typedef enum
 {
        NOTIF_APP_TYPE,
@@ -244,8 +247,13 @@ static void on_app_control(app_control_h app_control, void *user_data)
 
        NOTISET_DBG("%s", op_str);
 
-       // TODO: impl choice of necessary view
-       ugd->layout = _create_fullview(ugd->win, ugd, NOTIF_APP_TYPE);
+       app_type type = NOTIF_APP_TYPE;
+       if (strcmp(DO_NOT_DISTURB_OP, op_str) == 0)
+       {
+           type = DO_NOT_DISTURB_APP_TYPE;
+       }
+
+       ugd->layout = _create_fullview(ugd->win, ugd, type);
        elm_object_content_set(ugd->win, ugd->layout);
 
        free(op_str);
index f45d3a0..b15b5f8 100644 (file)
@@ -4,6 +4,10 @@
     <ui-application appid="org.tizen.setting-notification" exec="setting-notification" launch_mode="caller" multiple="false" nodisplay="true" taskmanage="false" type="capp">
         <label>setting-notification</label>
         <icon>setting-notification.png</icon>
+        <app-control>
+            <operation name="http://tizen.org/appcontrol/operation/setting/do_not_disturb"/>
+            <operation name="http://tizen.org/appcontrol/operation/setting/app_notifications"/>
+        </app-control>
     </ui-application>
     <privileges>
         <privilege>http://tizen.org/privilege/packagemanager.info</privilege>