noti = add_notification("TempCooldownNotiOn");
}
+static void broadcast_thermal_state_legacy(int state, int level)
+{
+ static int old = NOTHING;
+ int type;
+ char *param[1];
+
+ switch (state) {
+ case THERMAL_STATE_LOW:
+ case THERMAL_STATE_NORMAL:
+ type = NOTHING;
+ break;
+ case THERMAL_STATE_HIGH:
+ if (level == THERMAL_LEVEL_WARNING)
+ type = WARNING;
+ else if (level == THERMAL_LEVEL_CRITICAL ||
+ level == THERMAL_LEVEL_POWEROFF)
+ type = CRITICAL;
+ else
+ type = NOTHING;
+ break;
+ default:
+ _E("Invalid state(%d)", state);
+ return;
+ }
+
+ if (old == type)
+ return;
+
+ switch (type) {
+ case NOTHING:
+ param[0] = "CoolDownRelease";
+ break;
+ case WARNING:
+ param[0] = "WarningAction";
+ break;
+ case CRITICAL:
+ param[0] = "LimitAction";
+ break;
+ default:
+ _I("Invalid type (%d)", type);
+ return;
+ }
+
+ old = type;
+
+ broadcast_edbus_signal(DEVICED_PATH_SYSNOTI,
+ DEVICED_INTERFACE_SYSNOTI,
+ "CoolDownChanged",
+ "s", param);
+}
+
static Eina_Bool thermal_overheat_time_broadcast(void *data)
{
int ret;
}
}
+ broadcast_thermal_state_legacy(info->state, info->level);
+
if (update == UPDATE) {
old_state = info->state;
old_level = info->level;