Android 10.0 去掉无法连接WLAN网络的通知

Android 10.0 去掉无法连接WLAN网络的通知
在这里插入图片描述

在10.0的一个项目开发中,有时候连接网络在wifi网络差的时候 会提示 无法连接WLAN网络的 通知,客户觉得体验不好,所以要求去掉这个通知
这就要首先找到是哪里发出的通知 然后去掉发送通知的代码就可以了
1,查询源码找相关发送通知的代码
首先看下frameworks\opt\net\wifi\service\java\com\android\server\wifi\WrongPasswordNotifier.java
的相关源码
这里是处理密码错误的相关类

public class WrongPasswordNotifier {
   
    
    
// Number of milliseconds to wait before automatically dismiss the notification.
private static final long CANCEL_TIMEOUT_MILLISECONDS = 5 * 60 * 1000;
// Unique ID associated with the notification.
@VisibleForTesti

猜你喜欢

转载自blog.csdn.net/baidu_41666295/article/details/125130156