feat: optimize system application recognition and add power save#1151
Conversation
services Changed case sensitivity handling in third-party app detection to first match desktop names exactly, then apply lowercase fallback for system app identification. Added ssh, udcp-guard, appstore daemon, and serial- getty services to power save configuration, plus fcitx5-helper to autostart list. Log: Optimized system app recognition logic Influence: 1. Verify system applications are correctly identified without case- sensitivity issues 2. Test autostart behavior with Fcitx5-related applications 3. Confirm new services (ssh, udcp-guard, appstore daemon, serial-getty) are properly managed during power save 4. Validate short-idle blacklist applications still function as expected 5. Ensure existing third-party applications continue to trigger power save correctly feat: 优化系统应用识别逻辑并新增电源节电服务 修改了第三方应用检测中的大小写处理逻辑,先完全匹配desktop名称,再对系统 应用识别使用小写回退。将ssh、udcp-guard、应用商店守护进程和serial-getty 服务添加到电源节电配置中,同时将fcitx5-helper添加到自动启动列表。 Log: 优化系统应用识别逻辑 Influence: 1. 验证系统应用能否在无大小写问题的情况下正确识别 2. 测试与Fcitx5相关应用的自动启动行为 3. 确认新增服务(ssh、udcp-guard、应用商店守护进程、serial-getty)在节电 期间能被正确管理 4. 验证短空闲黑名单应用仍按预期运行 5. 确保现有第三方应用继续正确触发电源节电 PMS: TASK-389737 Change-Id: Ic51334bb540d923cec79dc1cddb0c8928394745d
There was a problem hiding this comment.
Sorry @xionglinlin, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 func (psp *powerSavePlan) isThirdPartyAppRunning() (ret bool) {
// 检查启动应用的desktop,是否在系统应用 systemApplicationsMap 中
// 只要有一个运行中的desktop不存在于 systemApplicationsMap 中,说明就有第三方应用运行
for _, app := range launchedApplications {
desktop := psp.getDesktopName(app)
// 如果存在短idle黑名单应用在运行,则返回true -> 不进短idle
if _, exists := shortIdleBlacklistApplicationsMap[desktop]; exists {
logger.Info("Found shortIdle blacklist application running: ", app, desktop)
return true
}
if _, exists := systemApplicationsMap[desktop]; !exists {
desktop = strings.ToLower(desktop)
// 如果不存在的应用的desktop包含deepin、dde、uos说明也是系统应用,这个应用应该加到系统应用列表中
if strings.Contains(desktop, "deepin") || strings.Contains(desktop, "dde") || strings.Contains(desktop, "uos") {
logger.Warning("Need add systemApplicationsMap, Running app : ", app, desktop)
continue
}
logger.Info("Found third party application running: ", app, desktop)
return true
}
}
return false
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, xionglinlin 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 |
services
Changed case sensitivity handling in third-party app detection to first match desktop names exactly, then apply lowercase fallback for system app identification. Added ssh, udcp-guard, appstore daemon, and serial- getty services to power save configuration, plus fcitx5-helper to autostart list.
Log: Optimized system app recognition logic
Influence:
feat: 优化系统应用识别逻辑并新增电源节电服务
修改了第三方应用检测中的大小写处理逻辑,先完全匹配desktop名称,再对系统
应用识别使用小写回退。将ssh、udcp-guard、应用商店守护进程和serial-getty
服务添加到电源节电配置中,同时将fcitx5-helper添加到自动启动列表。
Log: 优化系统应用识别逻辑
Influence:
PMS: TASK-389737
Change-Id: Ic51334bb540d923cec79dc1cddb0c8928394745d