• Android MTK 去掉 Setting 中 Wifi 和 蓝牙



    http://blog.csdn.net/mr_kings/article/details/51802609


        //去除SystemUI下拉中的 wifi和Bluetooth开关选项  
        frameworksasepackagesSystemUIsrccomandroidsystemuistatusbarphone QuickSettings.java  
          private void addWifiTile(ViewGroup parent, LayoutInflater inflater) {  
          
        //Remove wifi systemUI lhw start   
               // if (!FeatureOption.MTK_WLAN_SUPPORT) {  
               if (FeatureOption.MTK_WLAN_SUPPORT) {  
               //Remove wifi systemUI lhw end  
                    wifiTile.setVisibility(View.GONE);  
                }  
          
        private void addBluetoothTile(ViewGroup parent, LayoutInflater inflater) {  
          
        if (mModel.deviceSupportsBluetooth()  
                        && FeatureOption.MTK_BT_SUPPORT) {  
                       //Remove bluetooth systemUI lhw start   
                       //parent.addView(bluetoothTile);  
                     //  parent.removeView(view);  
                       bluetoothTile.setVisibility(View.GONE);  
                     //Remove bluetooth systemUI lhw start   
                }  
        //去掉Setting 中的 wifi 和蓝牙 条目  
        packagesappsSettingssrccomandroidsettingsSettings.java  
        //根据判断获取当前是否支持该属性 进行移除 逆向处理  
          private void updateHeaderList(List<Header> target) {  
           } else if (id == R.id.wifi_settings) {  
                        // Remove WiFi Settings if WiFi service is not available.  
                         //Remove WIFI Settings lhw start  
                        //if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI)) {  
                        if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI)) {  
                 target.remove(i);  
                            //Remove WIFI Settings lhw end  
        } else if (id == R.id.bluetooth_settings) {  
                        // Remove Bluetooth Settings if Bluetooth service is not available.  
                        //Remove Bluetooth Settings lhw start  
                        if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)) {  
                        //if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)) {  
                       //Remove Bluetooth Settings lhw end  
                            target.remove(i);  


  • 相关阅读:
    Oracle导数据到SQL server的方法总结
    linux vmware 安装步骤
    linux user
    linux 下载jdk
    Jaxb2实现JavaBean与xml互转的方法详解
    idea 远程代码调试
    Java一次读取文本文件所有内容
    mysql 8 server windows 安装经验分享
    java和mysql的length()区别及char_length()
    Java web 强制301跳转
  • 原文地址:https://www.cnblogs.com/ztguang/p/12644806.html
Copyright © 2020-2023  润新知