• 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);
        }

     

  • 相关阅读:
    正则表达式
    编译原理如何写出不带回溯的递归子程序?
    华为三层交换机之基本操作
    C++中的继承(上)
    InNoClassDefFoundError:InternalFutureFailureAccess-命令打包出错解决办法
    看门狗 WDG
    res_config_settings.py文件详解
    Git 学习笔记 | Git 基本操作命令
    【LinuxC】进程(未完)
    文件的打开方式
  • 原文地址:https://blog.csdn.net/qq_46687516/article/details/134436047