Tizen设备设置电源状态的代码
设置电源状态正常(假)或昏暗的(真正)状态// PRIVILEGE needed to be set in tizen-manifest.xml:
// http://tizen.org/privilege/display
#include <device/power.h>
#include <dlog.h> // for logging purposes
void
set_power_state(bool dim) {
if(device_power_wakeup(dim) == DEVICE_ERROR_NONE)
LOGI("Device dim %s", dim? "enabled" : "disabled");
}
页:
[1]