RK3399 9.0 Setting去掉一级菜单以及网络下二级菜单,留下以太网二级菜单
rk3399_9.0/packages/apps/Settings$ cat YBL_MeetingBOX_Setting_Modify.patch
Date: Tue Sep 13 15:39:51 2022 +0800
1、Remove the Bluetooth module
2、keep only the Ethernet
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b3fd4b6..d12f931 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
[url=home.php?mod=space&uid=1999721]@@[/url] -158,31 +158,44 @@
<!
android:icon="@drawable/ic_homepage_network"
-->
<activity
android:name=".Settings$NetworkDashboardActivity"
android:label="@string/network_dashboard_title"
- ```
android:icon="@drawable/ic_homepage_network"
android:icon="@drawable/ic_ethernet"
android:parentActivityName="Settings"
android:taskAffinity="com.android.settings">
<intent-filter android:priority="1">
<action android:name="android.settings.WIRELESS_SETTINGS" />
<action android:name="android.settings.AIRPLANE_MODE_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.VOICE_LAUNCH" />
</intent-filter>
<intent-filter android:priority="11">
<category android:name="android.intent.category.VOICE_LAUNCH" />
</intent-filter>
<intent-filter android:priority="11">
<action android:name="com.android.settings.action.SETTINGS"/>
</intent-filter>
<meta-data android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.homepage"/>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.network.NetworkDashboardFragment"/>
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
<meta-data android:name="com.android.settings.title"
android:resource="@string/network_setting"/>
<meta-data android:name="com.android.settings.summary"
android:resource="@string/ethernet"/>
</activity>
<activity
@@ -204,8 +217,10 @@
<!
<meta-data android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.homepage"/>
-->
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -2438,8 +2453,10 @@
<!
<meta-data android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.wireless" />
-->
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.datausage.DataUsageSummary" />
</activity>
@@ -3432,6 +3449,7 @@
<activity android:name="com.android.settings.display.ScreenScaleActivity"/>
+ </application>
</manifest>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index a3b89b3..b4d7a06 100755
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -4177,4 +4177,8 @@
<string name="screen_full_vh">"满屏显示"</string>
<string name="confirm_dialog_title">保存确认</string>
<string name="confirm_dialog_message">将会取消</string>
+
+
+ <string name="null_string">""</string>
+ <string name="network_setting">"网络设置"</string>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f8549a4..a7c7ef6 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -9232,7 +9232,7 @@
<item quantity="one">1 restriction</item>
<item quantity="other"><xliff:g id="count" example="10">%1$d</xliff:g> restrictions</item>
</plurals>
-
+
<string name="operator_warning">Carrier data accounting may differ from device accounting</string>
@@ -10159,4 +10159,8 @@
<string name="screen_full_vh">screen full display</string>
<string name="confirm_dialog_title">Save Confirm</string>
<string name="confirm_dialog_message">Will cancel it</string>
+
+ ```
- ""
- "Network Setting"
diff --git a/src/com/android/settings/network/NetworkDashboardFragment.java b/src/com/android/settings/network/NetworkDashboardFragment.java
old mode 100644
new mode 100755
index 89bf5f4..fac34af
--- a/src/com/android/settings/network/NetworkDashboardFragment.java
+++ b/src/com/android/settings/network/NetworkDashboardFragment.java
@@ -38,11 +38,13 @@ import com.android.settings.wifi.WifiMasterSwitchPreferenceController;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import com.android.settingslib.core.lifecycle.Lifecycle;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import android.os.Bundle;
+import android.os.SystemProperties;
+import android.os.Build;
+import android.support.v7.preference.PreferenceScreen;
public class NetworkDashboardFragment extends DashboardFragment implements
MobilePlanPreferenceHost {
@@ -62,12 +64,28 @@ public class NetworkDashboardFragment extends DashboardFragment implements
protected int getPreferenceScreenResId()
- @Override
- public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
-
super.onCreatePreferences (savedInstanceState, rootKey);
-
if(Build.MODEL.equals("BOX")){
-
PreferenceScreen preferenceScreen = getPreferenceScreen();
-
preferenceScreen.removePreference(findPreference("toggle_wifi"));
-
preferenceScreen.removePreference(findPreference("mobile_network_settings"));
-
preferenceScreen.removePreference(findPreference("manage_mobile_plan"));
-
preferenceScreen.removePreference(findPreference("airplane_mode"));
-
preferenceScreen.removePreference(findPreference("proxy_settings"));
-
preferenceScreen.removePreference(findPreference("vpn_settings"));
-
preferenceScreen.removePreference(findPreference("tether_settings"));
-
preferenceScreen.removePreference(findPreference("private_dns_settings"));
-
}
- }
- @Override
public void onAttach(Context context) {
super.onAttach(context);
原作者:要不要买菜!