Android 9.0 屏蔽设备的WLAN功能

Android 9.0 屏蔽设备的WLAN功能

最近接到需求反馈,想要屏蔽设备的WLAN功能,具体修改参照如下:

/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/bools.xml

    
-    true
+    false

另外一级菜单“网络和互联网”的 summary 也要调整,将WLAN字样去除,具体修改参照如下:

/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/network/NetworkDashboardFragment.java

       public void setListening(boolean listening) {
            if (listening) {
                /*/
                String summary = BidiFormatter.getInstance()
                       .unicodeWrap(mContext.getString(R.string.wifi_settings_title));
                if (mMobileNetworkPreferenceController.isAvailable()) {
                    final String mobileSettingSummary = mContext.getString(
                            R.string.network_dashboard_summary_mobile);
		//*/
                    String summary = BidiFormatter.getInstance()
                        .unicodeWrap(mContext.getString(R.string.network_dashboard_summary_mobile));
                //}
		//*/

下拉状态栏中对应WLAN功能的quick setting图标也需要屏蔽掉:

/vendor/mediatek/proprietary/packages/apps/SystemUI/res/values/config.xml

    
-        wifi,bt,dnd,flashlight,rotation,cell,airplane,cast,location,screenrecord
+        bt,dnd,flashlight,rotation,cell,airplane,cast,location,screenrecord
    

    
-        wifi,cell,dnd,flashlight,rotation,bt,airplane,location,screenrecord,hotspot,inversion,saver,work,cast,night
+        cell,dnd,flashlight,rotation,bt,airplane,location,screenrecord,hotspot,inversion,saver,work,cast,night
    

重新编译验证,修改生效,设备WLAN功能已屏蔽

你可能感兴趣的:(Android,android)