Android 9.0 隐藏设置中一级菜单“已连接的设备”

Android 9.0 隐藏设置中一级菜单“已连接的设备”

接到客户反馈需要隐藏设备设置中的“已连接的设备”一级菜单,具体修改参照如下:

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

        somethingChanged = setTileEnabled(changedList,
                new ComponentName(packageName,
                        Settings.ConnectedDeviceDashboardActivity.class.getName()),
-                !UserManager.isDeviceInDemoMode(this) /* enabled */,
+                false,
                isAdmin) || somethingChanged;

下拉状态栏中对应“已连接的设备”一级菜单中功能的bt图标也需要屏蔽掉:

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

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

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

重新编译验证,修改生效,设备设置中的“已连接的设备”一级菜单已经隐藏

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