Android11去掉Setings里的投射菜单条目

news/2024/12/2 21:58:29/

Android11去掉【设置】--【已连接的设备】--【连接偏好设置】里的投射菜单条目,具体如下:

commit 0c0583e6ddcdea21ec02db291d9a07d90f10aa59
Author: wzh <wzh@incartech.com>
Date:   Wed Jul 21 16:37:13 2021 +0800去掉投射菜单Change-Id: Id7f205cdf9b8e17f836eb697195ab39d1e3a6b8cdiff --git a/AndroidManifest.xml b/AndroidManifest.xml
old mode 100644
new mode 100755
index c22eab0..fe351f9
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2149,7 +2149,7 @@android:value="true" /></activity>-        <activity
+        <!-- activityandroid:name="Settings$WifiDisplaySettingsActivity"android:label="@string/wifi_display_settings_title"android:icon="@drawable/ic_cast_24dp">
@@ -2159,7 +2159,7 @@</intent-filter><meta-data android:name="com.android.settings.FRAGMENT_CLASS"android:value="com.android.settings.wfd.WifiDisplaySettings" />
-        </activity>
+        </activity --><activity android:name="Settings$TestingSettingsActivity" android:label="@string/testing"><meta-data android:name="com.android.settings.FRAGMENT_CLASS"
diff --git a/res/xml/connected_devices_advanced.xml b/res/xml/connected_devices_advanced.xml
old mode 100644
new mode 100755
index 3ff7d99..eba8849
--- a/res/xml/connected_devices_advanced.xml
+++ b/res/xml/connected_devices_advanced.xml
@@ -35,14 +35,14 @@settings:searchable="false"settings:controller="com.android.settings.connecteddevice.NfcAndPaymentFragmentController"/>-    <Preference
+    <!-- Preferenceandroid:fragment="com.android.settings.wfd.WifiDisplaySettings"android:key="wifi_display_settings"android:title="@string/wifi_display_settings_title"android:icon="@drawable/ic_cast_24dp"android:order="-6"settings:controller="com.android.settings.wfd.WifiDisplayPreferenceController"
-        settings:keywords="@string/keywords_wifi_display_settings"/>
+        settings:keywords="@string/keywords_wifi_display_settings"/ --><com.android.settingslib.RestrictedPreferenceandroid:fragment="com.android.settings.nfc.AndroidBeam"
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
old mode 100644
new mode 100755
index e94e647..32cd096
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -131,7 +131,7 @@ public class Settings extends SettingsActivity {public static class SavedAccessPointsSettingsActivity extends SettingsActivity { /* empty */ }public static class TextToSpeechSettingsActivity extends SettingsActivity { /* empty */ }public static class AndroidBeamSettingsActivity extends SettingsActivity { /* empty */ }
-    public static class WifiDisplaySettingsActivity extends SettingsActivity { /* empty */ }
+    //public static class WifiDisplaySettingsActivity extends SettingsActivity { /* empty */ }public static class DreamSettingsActivity extends SettingsActivity { /* empty */ }public static class NotificationStationActivity extends SettingsActivity { /* empty */ }public static class UserSettingsActivity extends SettingsActivity { /* empty */ }
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
old mode 100644
new mode 100755
index 76739f0..63b3a8a
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -649,10 +649,10 @@ public class SettingsActivity extends SettingsBaseActivityshowDev, isAdmin)|| somethingChanged;-        somethingChanged = setTileEnabled(changedList, new ComponentName(packageName,
+        /*somethingChanged = setTileEnabled(changedList, new ComponentName(packageName,Settings.WifiDisplaySettingsActivity.class.getName()),WifiDisplaySettings.isAvailable(this), isAdmin)
-                || somethingChanged;
+                || somethingChanged;*/somethingChanged = setTileEnabled(changedList, new ComponentName(packageName,Settings.ScreenshotSettingsActivity.class.getName()),
diff --git a/src/com/android/settings/core/gateway/SettingsGateway.java b/src/com/android/settings/core/gateway/SettingsGateway.java
old mode 100644
new mode 100755
index 77adbf0..8875ca7
--- a/src/com/android/settings/core/gateway/SettingsGateway.java
+++ b/src/com/android/settings/core/gateway/SettingsGateway.java
@@ -338,7 +338,7 @@ public class SettingsGateway {Settings.DataUsageSummaryActivity.class.getName(),// Home page > Connected devicesSettings.BluetoothSettingsActivity.class.getName(),
-            Settings.WifiDisplaySettingsActivity.class.getName(),
+            //Settings.WifiDisplaySettingsActivity.class.getName(),Settings.PrintSettingsActivity.class.getName(),// Home page > Apps & NotificationsSettings.UserSettingsActivity.class.getName(),


http://www.ppmy.cn/news/1078905.html

相关文章

【数据结构回顾】

数据结构回顾 一、单链表二、单循环链表 一、单链表 #include <stdio.h> #include <stdlib.h>typedef struct Node {int data;Node *next; }Node;Node* initList() {Node *list (Node*)malloc(sizeof(Node));list->data 0;list->next NULL;return list; }…

vue3的provide

provide 和 inject 通常成对一起使用&#xff0c;使一个祖先组件作为其后代组件的依赖注入方&#xff0c;无论这个组件的层级有多深都可以注入成功&#xff0c;只要他们处于同一条组件链上。 provide&#xff1a;提供一个值&#xff0c;可以被后代组件注入。 inject&#xff…

freemarker学习+集成springboot+导出word

目录 一 FreeMarker简介 二 集成springboot&#xff0c;实现案例导出 三 常见面试题总结 一 FreeMarker简介 FreeMarker 是一款 模板引擎&#xff1a; 即一种基于模板和要改变的数据&#xff0c; 并用来生成输出文本(HTML网页&#xff0c;电子邮件&#xff0c;配置文件&…

Qt 动态中英文切换

背景&#xff1a; 需要界面实现动态国际化&#xff0c;一键点击切换中英文或其他语言。 前提&#xff1a; 已经完成了整个界面的翻译&#xff0c;拿到匹配的ts翻译文件&#xff0c;注意&#xff1a;要保证界面切换后&#xff0c;翻译的全覆盖&#xff0c;要保证任何需要反应的地…

第P3周:天气识别

一、前期准备 1、设置GPU import torch import torch.nn as nn import torchvision.transforms as transforms import torchvision from torchvision import transforms, datasetsimport os,PIL,pathlibdevice torch.device("cuda" if torch.cuda.is_available() …

一些进程/线程调试经验和基础

查看进程/线程/系统运行状况等的命令 主线剧情02-ARM-Linux基础学习记录_Real-Staok的博客-CSDN博客 里面的 Linux Shell 一节 的 任务后台执行 / 任务&进程查看 部分。 关于Linux下进程的详解【进程查看与管理】 - AshJo - 博客园 (cnblogs.com)。 linux top命令查看内存…

kubevirt虚机创建svc通过NodePort的方式暴露端口

背景 存在kubevit存在的三个虚机&#xff1a; ubuntu-4tlg7 7d22h Running True ubuntu-7kgrk 7d22h Running True ubuntu-94kg2 7d22h Running True 网络没有做透传&#xff0c;pod也不是underlay网络想要通过NodePort方式暴露虚机22端口进行远程登录。 …

【Java 动态数据统计图】动态X轴二级数据统计图思路案例(动态,排序,动态数组(重点推荐:难))八(130)

需求&#xff1a; 1.有一组数据集合&#xff0c;数据集合中的数据为动态&#xff1b; 举例如下&#xff1a; [{province陕西省, city西安市}, {province陕西省, city咸阳市}, {province陕西省, city宝鸡市}, {province陕西省, city延安市}, {province陕西省, city汉中市}, {pr…