diff options
author | pr.jung <pr.jung@samsung.com> | 2016-10-25 11:12:29 +0900 |
---|---|---|
committer | Jung <pr.jung@samsung.com> | 2016-10-26 23:36:37 -0700 |
commit | d21d271d29ce617c9a7326d3f5e8e51f2073bc8e (patch) | |
tree | 577356234dad77516bc128b49f1917f8f3376f2f | |
parent | bf2f7c30c56ead7b4ea3f7312b8c53e53aabc934 (diff) | |
download | libsvi-d21d271d29ce617c9a7326d3f5e8e51f2073bc8e.tar.gz libsvi-d21d271d29ce617c9a7326d3f5e8e51f2073bc8e.tar.bz2 libsvi-d21d271d29ce617c9a7326d3f5e8e51f2073bc8e.zip |
Add notification type check for mobile
Change-Id: I0c2706b97fcba44ed913d3c2663c6568118a32ae
Signed-off-by: pr.jung <pr.jung@samsung.com>
-rw-r--r-- | mobile/src/check.c | 19 | ||||
-rw-r--r-- | src/profiles.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/mobile/src/check.c b/mobile/src/check.c index 0f99bd5..4a80953 100644 --- a/mobile/src/check.c +++ b/mobile/src/check.c @@ -264,6 +264,22 @@ static bool mobile_get_switched_pattern(int pattern, int *switched) return true; } +static bool mobile_is_notification_type(int pattern) +{ + switch (pattern) { + case FEEDBACK_PATTERN_WAKEUP: + case FEEDBACK_PATTERN_WAKEUP_ON_CALL: + case FEEDBACK_PATTERN_TIMER: + case FEEDBACK_PATTERN_TIMER_ON_CALL: + case FEEDBACK_PATTERN_MESSAGE ... FEEDBACK_PATTERN_EMAIL_ON_CALL: + case FEEDBACK_PATTERN_SCHEDULE: + case FEEDBACK_PATTERN_SCHEDULE_ON_CALL: + case FEEDBACK_PATTERN_GENERAL ... FEEDBACK_PATTERN_LOWBATT_ON_CALL: + return true; + } + return false; +} + static bool mobile_get_always_alert_case(int type, int pattern) { switch (pattern) { @@ -307,6 +323,8 @@ static bool mobile_get_always_alert_case(int type, int pattern) if (CHECK_SOUND(type) && camerastatus && shutter_sndstatus) return true; break; + case FEEDBACK_PATTERN_RINGER: + return true; default: break; } @@ -383,6 +401,7 @@ static const struct profile_ops mobile_profile_ops = { .get_always_alert_case = mobile_get_always_alert_case, .get_always_off_case = mobile_get_always_off_case, .get_strength_type = mobile_get_strength_type, + .is_notification_type = mobile_is_notification_type, .max_type = FEEDBACK_TYPE_END, .max_pattern = FEEDBACK_PATTERN_INTERNAL_END, .str_type = mobile_str_type, diff --git a/src/profiles.h b/src/profiles.h index 786b4c7..306485a 100644 --- a/src/profiles.h +++ b/src/profiles.h @@ -31,6 +31,7 @@ struct profile_ops { bool (*get_always_alert_case)(int type, int pattern); bool (*get_always_off_case)(int type, int pattern); int (*get_strength_type)(int type, int pattern); + bool (*is_notification_type)(int pattern); const int max_type; const int max_pattern; const char **str_type; |