已关闭
[Bug]: setPreferredApn bug fix #747
liuyiang创建于 14 天前关闭于 13 天前
openharmony_ci
14 天前 评论:
14 天前 评论:
感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@dingxiaochen](https://gitcode.com/dingxiaochen) [@k_lee9575](https://gitcode.com/k_lee9575) [@jiayanhong_hw](https://gitcode.com/jiayanhong_hw) 。如果需要调整订阅PR、Issue的变更状态,请访问链接。
Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.


14 天前 添加了label:waiting_for_assign
liuyiang
14 天前 评论:
14 天前 评论:
13 天前 关闭了 issue
13 天前 issue状态由 待办的 改变为 已完成
感谢对OpenHarmony社区的支持与关注,欢迎反馈缺陷。
发生了什么问题?
在 MDM 场景下,调用 networkManager.setPreferredApn 接口设置优选 APN,接口返回成功(result:0),但系统 APN 设置页面显示的默认 APN 未生效,仍显示为 SIM 卡内置 APN(CTNET)。
期望行为是什么?
设置生效
如何复现该缺陷
时间轴 EDM 进程 (PID 1274) CellularData 进程 (PID 888)
───────────────── ──────────────────────────────
10:06:24.845 HandleAdd start ──→ addApn 写入 DB
│
10:06:24.887 OnChange (addApn 触发)
↓
HandleApnChanged #1 开始
├─ CreateApnItem:
10:06:24.909 │ query preferId_ = 58 (从 DB 读到旧值)
│ (EDM 还没写 81)
│
10:06:24.915 HandleSetPrefer start
10:06:24.946 SetPreferApn profileId:81 ──→ DB 变更为 81
(EDM 直写 DB)
│
ClearConnectionsOnUpdateApns:
├─ GetRilAttachApn() → profileId=58 (内存旧值)
└─ UpdateApnInfo(58):
10:06:24.948 读 DB → 81 (EDM 刚写的!)
81 ≠ 58 → 用 58 覆盖 DB!
★★★ DB 从 81 被覆盖回 58 ★★★
其他补充信息
版本或分支信息