Give different priority for feedback pattern
[platform/core/system/libsvi.git] / src / check.c
index bd813f4..34231e7 100644 (file)
@@ -579,11 +579,35 @@ static bool profile_is_notification_type(int pattern)
                return false;
 }
 
-static int profile_get_priority(int pattern)
+static int mobile_get_priority(int pattern)
 {
+       switch (pattern) {
+       case FEEDBACK_PATTERN_TAP ... FEEDBACK_PATTERN_KEY_BACK:
+               return PRIORITY_MIN;
+       case FEEDBACK_PATTERN_WAKEUP:
+       case FEEDBACK_PATTERN_SCHEDULE:
+       case FEEDBACK_PATTERN_TIMER:
+               return PRIORITY_HIGH;
+       case FEEDBACK_PATTERN_SEND_SOS_MESSAGE:
+       case FEEDBACK_PATTERN_RINGER:
+               return PRIORITY_TOP;
+       }
+
        return PRIORITY_MIDDLE;
 }
 
+static int profile_get_priority(int pattern)
+{
+       int prof;
+
+       prof = get_profile();
+
+       if (prof == PROFILE_MOBILE)
+               return mobile_get_priority(pattern);
+       else
+               return PRIORITY_MIDDLE;
+}
+
 static bool mobile_get_always_alert_case(int type, int pattern)
 {
        switch (pattern) {