Android11去掉【设置】--【已连接的设备】--【连接偏好设置】里的投射菜单条目,具体如下:文章来源地址https://www.toymoban.com/news/detail-686831.html
commit 0c0583e6ddcdea21ec02db291d9a07d90f10aa59
Author: wzh <wzh@incartech.com>
Date: Wed Jul 21 16:37:13 2021 +0800
去掉投射菜单
Change-Id: Id7f205cdf9b8e17f836eb697195ab39d1e3a6b8c
diff --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
+ <!-- activity
android: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
+ <!-- Preference
android: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.RestrictedPreference
android: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 SettingsBaseActivity
showDev, 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 devices
Settings.BluetoothSettingsActivity.class.getName(),
- Settings.WifiDisplaySettingsActivity.class.getName(),
+ //Settings.WifiDisplaySettingsActivity.class.getName(),
Settings.PrintSettingsActivity.class.getName(),
// Home page > Apps & Notifications
Settings.UserSettingsActivity.class.getName(),
文章来源:https://www.toymoban.com/news/detail-686831.html
到了这里,关于Android11去掉Setings里的投射菜单条目的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!