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(),