fix: the difference between blue and yellow

Signed-off-by: yanxuejun <yanxuejun@h-partners.com>
This commit is contained in:
yanxuejun 2024-07-19 13:14:07 +00:00
parent 0362537bf3
commit 4209b8a89b
6 changed files with 29 additions and 29 deletions

View File

@ -191,8 +191,8 @@ static void SetFrameworkBootStage(bool isReboot)
ret = ioctl(fd, SET_SHUT_STAGE, &stage);
if (ret < 0) {
POWER_HILOGE(FEATURE_SHUTDOWN, "set shut stage failed!");
close(fd);
}
close(fd);
return;
}

View File

@ -367,22 +367,6 @@ bool PowerMgrClient::UnRegisterPowerModeCallback(const sptr<IPowerModeCallback>&
return ret;
}
bool PowerMgrClient::RegisterRunningLockCallback(const sptr<IPowerRunninglockCallback>& callback)
{
RETURN_IF_WITH_RET((callback == nullptr) || (Connect() != ERR_OK), false);
POWER_HILOGI(FEATURE_RUNNING_LOCK, "Register running lock Callback by client");
bool ret = proxy_->RegisterRunningLockCallback(callback);
return ret;
}
bool PowerMgrClient::UnRegisterRunningLockCallback(const sptr<IPowerRunninglockCallback>& callback)
{
RETURN_IF_WITH_RET((callback == nullptr) || (Connect() != ERR_OK), false);
POWER_HILOGI(FEATURE_RUNNING_LOCK, "Unregister running lock Callback by client");
bool ret = proxy_->UnRegisterRunningLockCallback(callback);
return ret;
}
bool PowerMgrClient::RegisterScreenStateCallback(int32_t remainTime, const sptr<IScreenOffPreCallback>& callback)
{
RETURN_IF_WITH_RET((remainTime <= 0) || (callback == nullptr) || (Connect() != ERR_OK), false);
@ -399,6 +383,22 @@ bool PowerMgrClient::UnRegisterScreenStateCallback(const sptr<IScreenOffPreCallb
return ret;
}
bool PowerMgrClient::RegisterRunningLockCallback(const sptr<IPowerRunninglockCallback>& callback)
{
RETURN_IF_WITH_RET((callback == nullptr) || (Connect() != ERR_OK), false);
POWER_HILOGI(FEATURE_RUNNING_LOCK, "Register running lock Callback by client");
bool ret = proxy_->RegisterRunningLockCallback(callback);
return ret;
}
bool PowerMgrClient::UnRegisterRunningLockCallback(const sptr<IPowerRunninglockCallback>& callback)
{
RETURN_IF_WITH_RET((callback == nullptr) || (Connect() != ERR_OK), false);
POWER_HILOGI(FEATURE_RUNNING_LOCK, "Unregister running lock Callback by client");
bool ret = proxy_->UnRegisterRunningLockCallback(callback);
return ret;
}
bool PowerMgrClient::SetDisplaySuspend(bool enable)
{
RETURN_IF_WITH_RET(Connect() != ERR_OK, false);

View File

@ -17,6 +17,8 @@
#define POWERMGR_POWER_MGR_CLIENT_H
#include <string>
#include <singleton.h>
#include "power_state_machine_info.h"
#include "running_lock.h"
@ -168,11 +170,11 @@ public:
bool UnRegisterSyncSleepCallback(const sptr<ISyncSleepCallback>& callback);
bool RegisterPowerModeCallback(const sptr<IPowerModeCallback>& callback);
bool UnRegisterPowerModeCallback(const sptr<IPowerModeCallback>& callback);
void RecoverRunningLocks();
bool RegisterScreenStateCallback(int32_t remainTime, const sptr<IScreenOffPreCallback>& callback);
bool UnRegisterScreenStateCallback(const sptr<IScreenOffPreCallback>& callback);
bool RegisterRunningLockCallback(const sptr<IPowerRunninglockCallback>& callback);
bool UnRegisterRunningLockCallback(const sptr<IPowerRunninglockCallback>& callback);
void RecoverRunningLocks();
std::string Dump(const std::vector<std::string>& args);
PowerErrors GetError();

View File

@ -55,15 +55,15 @@ enum class PowerMgrInterfaceCode {
UNREG_SYNC_SLEEP_CALLBACK,
SET_FORCE_TIMING_OUT,
LOCK_SCREEN_AFTER_TIMING_OUT,
REG_RUNNINGLOCK_CALLBACK,
UNREG_RUNNINGLOCK_CALLBACK,
HIBERNATE,
REG_SCREEN_OFF_PRE_CALLBACK,
UNREG_SCREEN_OFF_PRE_CALLBACK,
REG_RUNNINGLOCK_CALLBACK,
UNREG_RUNNINGLOCK_CALLBACK,
SET_SUSPEND_TAG,
UPDATE_WORK_SOURCE,
REG_SYNC_HIBERNATE_CALLBACK,
UNREG_SYNC_HIBERNATE_CALLBACK,
UPDATE_WORK_SOURCE
};
} // space PowerMgr
} // namespace OHOS

View File

@ -22,8 +22,7 @@ export default class PowerUiExtensionAbility extends UIExtensionAbility {
'session': session
});
if('isInputDlg' in want.parameters)
{
if ('isInputDlg' in want.parameters) {
if (want.parameters.isInputDlg === true) {
session.loadContent('pages/inputDialog', storage);
session.setWindowBackgroundColor('#00000000');

View File

@ -30,6 +30,10 @@ SCREEN:
STATE: {type: INT32, desc: screen state}
BRIGHTNESS: {type: INT32, desc: brightness level}
STATE:
__BASE: {type: STATISTIC, level: MINOR, tag: PowerStats, desc: power state}
STATE: {type: INT32, desc: power state}
SCREEN_ON_TIMEOUT:
__BASE: {type: FAULT, level: CRITICAL, desc: timeout screen on information}
PID: {type: INT32, desc: session pid}
@ -48,11 +52,6 @@ SCREEN_OFF_TIMEOUT:
MSG: {type: STRING, desc: screen off timeout message}
REASON: {type: STRING, desc: screen off reason}
STATE:
__BASE: {type: STATISTIC, level: MINOR, tag: PowerStats, desc: power state}
STATE: {type: INT32, desc: power state}
STATE_CORRECTION:
__BASE: {type: FAULT, level: CRITICAL, desc: the power state is inconsistent with the display state}
ERROR_STATE: {type: INT32, desc: the state of the current error}