RK3399 9.0 Setting修改一级菜单和二级菜单

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
@@ -158,31 +158,44 @@
         </activity>
 
         <!-- Wireless Controls -->
+               <!--ic_ethernet
+            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>
+ <!--去掉设置一级菜单 network & internet -->
+                   <intent-filter android:priority="11">
                 <action android:name="com.android.settings.action.SETTINGS"/>
             </intent-filter>
+ <!--end-->
             <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 @@
             </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                 android:value="com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment"/>
+                       <!-- 
             <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 @@
             <intent-filter android:priority="10">
                 <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.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"/>
 
-        <!-- This is the longest AndroidManifest.xml ever. -->
+       <!-- This is the longest AndroidManifest.xml ever. -->
+ 
     </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>
-
+   
     <!-- A summary shown on data usage screens to indicate inaccuracy of data tracking [CHAR LIMIT=NONE] -->
     <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>
+
+       <!--全视通-->
+    <string name="null_string">""</string>
+    <string name="network_setting">"Network Setting"</string>
 </resources>
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() {
         return R.xml.network_and_internet;
     }
-
+
+    @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);
-
-        use(AirplaneModePreferenceController.class).setFragment(this);
+        use(AirplaneModePreferenceController.class).setFragment(this);
     }
 
     @Override
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

那肯定是很多年以后!

你的鼓励就我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值