fix: Add WiFi password input flag for lock screen and login interface#515
fix: Add WiFi password input flag for lock screen and login interface#515deepin-bot[bot] merged 2 commits intolinuxdeepin:masterfrom
Conversation
Added a flag to the NetManagerFlag enum in nettype.h to enable WiFi password input functionality on lock screen and login interface. When the lock screen or login interface detects this flag, it will display a WiFi password input dialog, allowing users to enter WiFi passwords to connect to networks. This addresses the issue where users couldn't connect to WiFi networks from lock screen or login screen due to missing password input capability. The bug was caused by the lack of proper flag configuration in the Net_LockFlags and Net_GreeterFlags enum values, which prevented the WiFi password input dialog from being triggered in lock screen and login scenarios. Log: Added new flag configuration to enable WiFi password input functionality for lock screen and login interface scenarios. PMG: BUG-350613 fix: 为锁屏和登录界面添加WiFi密码输入标记 在nettype.h文件的NetManagerFlag枚举中添加了标记,用于在锁屏和登录界面启用WiFi密码输入功能。当锁屏或登录界面检测到此标记时,将显示WiFi密码输入对话框,允许用户输入WiFi密码来连接网络。这解决了用户在锁屏或登录界面无法连接WiFi网络的问题。 该bug的原因是Net_LockFlags和Net_GreeterFlags枚举值中缺少适当的标记配置,导致在锁屏和登录场景下无法触发WiFi密码输入对话框。 Log: 添加新的标记配置,启用锁屏和登录界面的WiFi密码输入功能。
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ut003640 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 guide (collapsed on small PRs)Reviewer's GuideUpdates lock screen and greeter (login) network manager flag sets to include the hidden WiFi configuration/update capability so that WiFi password input dialogs are available in those contexts. Sequence diagram for WiFi password prompt on lock screensequenceDiagram
actor User
participant LockScreenUI
participant NetManager
participant SecretAgent
User->>LockScreenUI: openWifiPanel()
LockScreenUI->>NetManager: requestNetworks(contextLock, Net_LockFlags)
NetManager-->>LockScreenUI: availableNetworks
User->>LockScreenUI: selectNetwork(ssid)
LockScreenUI->>NetManager: connectNetwork(ssid, contextLock, Net_LockFlags)
NetManager->>NetManager: checkFlags(Net_LockFlags)
NetManager->>NetManager: hasFlag(Net_autoUpdateHiddenConfig)
NetManager->>SecretAgent: requestWifiCredentials(ssid)
SecretAgent-->>User: showPasswordDialog(ssid)
User->>SecretAgent: submitPassword(password)
SecretAgent-->>NetManager: provideCredentials(ssid, password)
NetManager-->>LockScreenUI: connectionResult(success)
LockScreenUI-->>User: showConnectionStatus(success)
Class diagram for updated NetType flagsclassDiagram
class NetType {
<<enumeration>>
Net_Device
Net_VPN
Net_SysProxy
Net_Airplane
Net_AirplaneTips
Net_VPNTips
Net_ServiceNM
Net_AutoAddConnection
Net_UseSecretAgent
Net_CheckPortal
Net_8021xSendNotifyUnderConnect
Net_autoUpdateHiddenConfig
Net_LockFlags
Net_GreeterFlags
}
NetType <|-- Net_LockFlags
NetType <|-- Net_GreeterFlags
NetType <|-- Net_autoUpdateHiddenConfig
Flow diagram for flag-based WiFi password dialog enablingflowchart TD
A[Context: lock_or_greeter_screen] --> B[Determine flag_set]
B --> C{Context_is_lock_screen?}
C -- Yes --> D[Use Net_LockFlags]
C -- No --> E[Use Net_GreeterFlags]
D --> F{Flag_set_contains Net_autoUpdateHiddenConfig?}
E --> F
F -- Yes --> G[Enable_WiFi_password_dialog]
F -- No --> H[Do_not_show_password_dialog]
G --> I[User_can_enter_password_and_connect]
H --> J[User_cannot_connect_to_protected_WiFi]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The three flag sets (Net_DockFlags, Net_LockFlags, Net_GreeterFlags) are very similar and now diverge by only a couple of bits; consider factoring shared combinations into named base masks or helper functions to make it harder to accidentally miss new flags in one of the variants in future changes.
- If Net_autoUpdateHiddenConfig is now the switch that enables WiFi password entry on lock/greeter, consider either renaming it or adding a more focused flag so that the enum value’s name reflects its behavioral effect rather than overloading a seemingly unrelated configuration concept.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The three flag sets (Net_DockFlags, Net_LockFlags, Net_GreeterFlags) are very similar and now diverge by only a couple of bits; consider factoring shared combinations into named base masks or helper functions to make it harder to accidentally miss new flags in one of the variants in future changes.
- If Net_autoUpdateHiddenConfig is now the switch that enables WiFi password entry on lock/greeter, consider either renaming it or adding a more focused flag so that the enum value’s name reflects its behavioral effect rather than overloading a seemingly unrelated configuration concept.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
TAG Bot New tag: 2.0.84 |
deepin pr auto review这段代码修改主要涉及 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
总结与改进建议这段代码修改本身没有语法错误,逻辑上主要是为了统一不同界面(Dock、Lock、Greeter)对 改进建议:
改进后的代码示例(仅参考格式): // 建议的多行写法,便于阅读和 Diff
Net_LockFlags = Net_Device
| Net_VPN
| Net_SysProxy
| Net_Airplane
| Net_AirplaneTips
| Net_VPNTips
| Net_UseSecretAgent
| Net_CheckPortal
| Net_8021xSendNotifyUnderConnect
| Net_autoUpdateHiddenConfig, |
|
/merge |
|
This pr cannot be merged! (status: unstable) |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Added a flag to the NetManagerFlag enum in nettype.h to enable WiFi password input functionality on lock screen and login interface. When the lock screen or login interface detects this flag, it will display a WiFi password input dialog, allowing users to enter WiFi passwords to connect to networks. This addresses the issue where users couldn't connect to WiFi networks from lock screen or login screen due to missing password input capability.
The bug was caused by the lack of proper flag configuration in the Net_LockFlags and Net_GreeterFlags enum values, which prevented the WiFi password input dialog from being triggered in lock screen and login scenarios.
Log: Added new flag configuration to enable WiFi password input functionality for lock screen and login interface scenarios.
PMG: BUG-350613
fix: 为锁屏和登录界面添加WiFi密码输入标记
在nettype.h文件的NetManagerFlag枚举中添加了标记,用于在锁屏和登录界面启用WiFi密码输入功能。当锁屏或登录界面检测到此标记时,将显示WiFi密码输入对话框,允许用户输入WiFi密码来连接网络。这解决了用户在锁屏或登录界面无法连接WiFi网络的问题。
该bug的原因是Net_LockFlags和Net_GreeterFlags枚举值中缺少适当的标记配置,导致在锁屏和登录场景下无法触发WiFi密码输入对话框。
Log: 添加新的标记配置,启用锁屏和登录界面的WiFi密码输入功能。
Summary by Sourcery
Bug Fixes: