feat(power): migrate power services - #153
Conversation
There was a problem hiding this comment.
Sorry @mhduiy, your pull request is larger than the review limit of 150000 diff characters
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideUnifies session and system power services for X11 and Wayland under dde-services, adding a system Power1 plugin with richer battery/power-mode APIs, short-idle and ambient-brightness integration, hardened DPMS and sleep/shutdown handling, and updated DConfig/DBus/Polkit wiring. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
ebe043c to
8b1a80e
Compare
|
TAG Bot New tag: 1.0.40 |
|
TAG Bot New tag: 1.0.41 |
22fd43d to
e022cb4
Compare
|
/test sync-to-gitee |
|
@mhduiy: The specified target(s) for
Use
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1. Unify session Power scheduling across X11 and Wayland backends. 2. Add the system Power1 plugin with battery and power-mode APIs. 3. Preserve legacy idle, screen, brightness, short-idle, and shutdown behavior. 4. Harden legacy configuration migration and X11 process validation. 5. Move Power D-Bus, DConfig, Polkit, and activation assets into dde-services. 6. Require deepin-power-control for system hardware control. Log: Migrate Power1 ownership while preserving behavior across display backends. Influence: X11 and Wayland share compatible Power APIs. feat(power): 迁移电源服务 1. 统一 X11 与 Wayland 的会话电源调度。 2. 新增包含电池与电源模式接口的系统 Power1 插件。 3. 保持旧版空闲、屏幕、亮度、短空闲及关机行为。 4. 加固旧配置迁移和 X11 进程校验。 5. 将电源 D-Bus、DConfig、Polkit 与激活文件迁移至 dde-services。 6. 为系统硬件控制添加 deepin-power-control 依赖。 Log: 迁移 Power1 所有权并保持两种显示后端的兼容行为。 PMS: TASK-394241 Influence: X11 与 Wayland 共用兼容的电源接口。
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 建议将 canEnterShortIdle 中的检查逻辑拆分,提升可读性
bool PowerManager::canEnterShortIdle() const
{
if (m_useWayland)
return true;
if (!checkNoBlacklistedAppRunning())
return false;
if (!checkNoThirdPartyAppRunning())
return false;
if (!checkNoThirdPartyServiceRunning())
return false;
return true;
}
bool PowerManager::checkNoBlacklistedAppRunning() const
{
// 原有应用黑名单检查逻辑
// ...
return true;
}
bool PowerManager::checkNoThirdPartyAppRunning() const
{
// 原有第三方应用检查逻辑
// ...
return true;
}
bool PowerManager::checkNoThirdPartyServiceRunning() const
{
// 原有第三方服务检查逻辑
// ...
return true;
} |
This PR contains the functional Power migration only.
The deepin-security-loader caller authorization integration is intentionally split into the stacked follow-up PR so its security design can be revised independently.
Log: Migrate Power1 ownership while preserving behavior across both display backends.
PMS: TASK-394241
Influence: X11 and Wayland share compatible Power APIs.
Summary by Sourcery
Migrate session and system power management into unified Power1 services while retaining existing power behavior across display backends.
New Features:
Bug Fixes:
Enhancements:
Build:
Deployment:
Chores: