* notification_free(noti);
* }
* @endcode
- * @remarks If you want to post notification with icon that is related to minicontroller(play/pause/record etc),
- * you need to add tag that consists of "minicontrol_<specific_tag>" \n
+ *
+ * @remarks If you want to post notification in indicator's minicontroller area
+ * at default position set notification tag to "minicontrol" as in code example below:
+ *
+ * @code
+ * notification_set_tag(noti, "minicontrol");
+ * @endcode
+ *
+ * @remarks If you want to post notification at specific position in indicator's minicontroller
+ * area you need to add tag that consists of "minicontrol_<specific_tag>" \n
* <b>\<specific_tag\></b> must be established in cooperation with indicator maintainers. \n\n
* For now six actions/apps are supported in showing minicontrol icons:
* - "call" - notifies about call status(ongoing/outgoing/established)
* - "video" - play/pause video
* - "voice_recorder" - while recording voice \n\n
*
- * e.g.
+ *
* To notify about music playing status(play/pause) use following tag:
* @code
* const char *tag = "minicontrol_music";
* notification_set_tag(noti, tag);
* @endcode
+ *
* \n
*
* @subsection update_noti Update notification icon
} minictrl_prop;
static minictrl_prop noti_minictrl_app_list[] = {
- {"call", 1},
- {"call_mute", 2},
- {"call_speaker", 3},
- {"music", 4},
- {"video", 5},
- {"voice_recorder", 6},
- /* {"3rd_party", 7} TODO This will be handled later*/
+ {"_call", 1},
+ {"_call_mute", 2},
+ {"_call_speaker", 3},
+ {"_music", 4},
+ {"_video", 5},
+ {"_voice_recorder", 6},
+ {"", 7}, /* Handle plain "minicontrol" tag (for 3rd part apps) */
};
struct noti_status {
}
-static int noti_icon_priority_get(const char *tag)
+static int noti_icon_priority_get(const char *suffix)
{
int i;
- int minictrl_len = strlen("minicontrol_");
for (i = 0; i < ARRAY_SIZE(noti_minictrl_app_list); i++){
- if (!strcmp(tag + minictrl_len, noti_minictrl_app_list[i].name)) {
- _D("Sufix is is:%s", noti_minictrl_app_list[i].name);
+ if (!strcmp(suffix, noti_minictrl_app_list[i].name)) {
return noti_minictrl_app_list[i].priority;
}
}
ret_if (!tag);
if (util_string_prefix_check("minicontrol", tag)){
- int p = noti_icon_priority_get(tag);
+ int minictrl_len = strlen("minicontrol");
+ int p = noti_icon_priority_get(tag + minictrl_len);
if(p) {
- _D("The icon is for minicontrol area.");
+ _D("The icon is for minicontrol area. tag: %s, prior: %d", tag, p);
noti_data->icon->priority = p;
noti_data->icon->area = INDICATOR_ICON_AREA_MINICTRL;
}