Android12/13 解决WiFi输入框被遮挡问题

/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/wifi/

WifiConfigController2.java

public WifiConfigController2(WifiConfigUiBase2 parent, View view, WifiEntry wifiEntry,
int mode) {
mConfigUi = parent;
mView = view;
mWifiEntry = wifiEntry;
mContext = mConfigUi.getContext();

// Init Wi-Fi manager
mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
initWifiConfigController2(wifiEntry, mode);
//*/ 20230508,solve inputmethod popup causing Edit Error && Cast Exception 1
(scanForActivity(mContext)).getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
//*/

}
//*/2023058,solve inputmethod popup cause Edit Error && Cast Exception 2
private static Activity scanForActivity(Context cont) {

if (cont == null)
return null;
else if (cont instanceof Activity)
return (Activity)cont;
else if (cont instanceof ContextWrapper)
return scanForActivity(((ContextWrapper)cont).getBaseContext());
return null;
}
//*/
@VisibleForTesting
public WifiConfigController2(WifiConfigUiBase2 parent, View view, WifiEntry wifiEntry,
int mode, WifiManager wifiManager) {
mConfigUi = parent;

mView = view;
mWifiEntry = wifiEntry;
mContext = mConfigUi.getContext();
mWifiManager = wifiManager;
initWifiConfigController2(wifiEntry, mode);
}

相关推荐
大迪吃小迪几秒前
每秒 400 请求场景下,线程池如何合理配置?
java·开发语言
n***265617 分钟前
MySQL JSON数据类型全解析(JSON datatype and functions)
android·mysql·json
t***821119 分钟前
mysql的主从配置
android·mysql·adb
雨中飘荡的记忆1 小时前
财务对账系统设计与实现
java
0***h9421 小时前
使用 java -jar 命令启动 Spring Boot 应用时,指定特定的配置文件的几种实现方式
java·spring boot·jar
雨中飘荡的记忆1 小时前
布式事务详解:从理论到实践(RocketMQ + Seata)
java·rocketmq
i***48611 小时前
微服务生态组件之Spring Cloud LoadBalancer详解和源码分析
java·spring cloud·微服务
zzlyx991 小时前
用C#采用Avalonia+Mapsui在离线地图上插入图片画信号扩散图
java·开发语言·c#
Aevget1 小时前
MyEclipse全新发布v2025.2——AI + Java 24 +更快的调试
java·ide·人工智能·eclipse·myeclipse
一 乐2 小时前
购物|明星周边商城|基于springboot的明星周边商城系统设计与实现(源码+数据库+文档)
java·数据库·spring boot·后端·spring