MTK Android 11 设置关于手机增加显示项

---
 .../MtkSettings/res/values-zh-rCN/strings.xml |  5 ++
 .../apps/MtkSettings/res/values/strings.xml   |  5 ++
 .../MtkSettings/res/xml/my_device_info.xml    | 25 ++++++-
 .../deviceinfo/CpuPreferenceController.java   | 65 +++++++++++++++++++
 .../deviceinfo/LcdPreferenceController.java   | 65 +++++++++++++++++++
 .../deviceinfo/RamPreferenceController.java   | 65 +++++++++++++++++++
 .../deviceinfo/RomPreferenceController.java   | 65 +++++++++++++++++++
 .../aboutphone/MyDeviceInfoFragment.java      |  8 +++
 8 files changed, 302 insertions(+), 1 deletion(-)
 create mode 100755 vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/CpuPreferenceController.java
 create mode 100755 vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/LcdPreferenceController.java
 create mode 100755 vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RamPreferenceController.java
 create mode 100755 vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RomPreferenceController.java
 mode change 100644 => 100755 vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java

diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml b/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml
index 92818dbb5a1..0de26cc08ee 100755
--- a/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml
@@ -5003,4 +5003,9 @@
     <string name="bluetooth_connect_access_dialog_content" msgid="4336436466468405850">"“<xliff:g id="DEVICE_NAME_0">%1$s</xliff:g>”想连接到此手机。\n\n您之前没有连接过“<xliff:g id="DEVICE_NAME_1">%2$s</xliff:g>”。"</string>
     <string name="bluetooth_connect_access_dialog_negative" msgid="4944672755226375059">"不连接"</string>
     <string name="bluetooth_connect_access_dialog_positive" msgid="3630561675207269710">"连接"</string>
+    <string name="cpu_info_title">CPU信息</string>
+    <string name="cpu_info">8核 2.0GHZ</string>
+    <string name="lcd_info_title">屏幕分辨率</string>
+    <string name="ram_info_title">运行内存</string>
+    <string name="rom_info_title">存储容量</string>
 </resources>
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/strings.xml b/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/strings.xml
index f9fa6be6cd7..66e9dbfb72f 100755
--- a/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/strings.xml
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/strings.xml
@@ -12221,6 +12221,11 @@
     <string name="bnd_manufacturer_info">manufacturer</string>
     <string name="bnd_fingerprint_info">fingerprint</string>
     <string name="bnd_release_info">release</string>
+    <string name="cpu_info_title">CPU info</string>
+    <string name="cpu_info">8-core 2.0GHZ</string>
+    <string name="lcd_info_title">Screen resolution</string>
+    <string name="ram_info_title">RAM</string>
+    <string name="rom_info_title">ROM</string>
 
     <!-- Bluetooth message permission alert for notification content [CHAR LIMIT=none] -->
     <string name="bluetooth_message_access_notification_content">Untrusted device wants to access your messages. Tap for details.</string>
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml b/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml
index 81c039bdb69..3fc8215e68f 100755
--- a/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml
@@ -106,11 +106,34 @@
         settings:enableCopying="true"
         settings:keywords="@string/keywords_model_and_hardware"
         settings:controller="com.android.settings.deviceinfo.HardwareInfoPreferenceController"/>
+    <!-- yim mod -->
+    <Preference
+        android:key="cpu_display"
+        android:order="32"
+        android:title="@string/cpu_info_title"
+	android:summary="@string/cpu_info"/>
+     <Preference
+        android:key="lcd_display"
+        android:order="33"
+        android:title="@string/lcd_info_title"
+	android:summary="2000*1200"/>
+     
+     <Preference
+        android:key="ram_display"
+        android:order="34"
+        android:title="@string/ram_info_title"
+	android:summary="6GB"/>
+     
+     <Preference
+        android:key="rom_display"
+        android:order="35"
+        android:title="@string/rom_info_title"
+	android:summary="128GB"/>
 
     <!-- IMEI -->
     <Preference
         android:key="imei_info"
-        android:order="32"
+        android:order="36"
         android:title="@string/status_imei"
         android:summary="@string/summary_placeholder"
         settings:keywords="@string/keywords_imei_info"
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/CpuPreferenceController.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/CpuPreferenceController.java
new file mode 100755
index 00000000000..eb7aa2abc84
--- /dev/null
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/CpuPreferenceController.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.deviceinfo;
+
+import android.content.Context;
+
+import android.util.Log;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settingslib.core.AbstractPreferenceController;
+
+
+public class CpuPreferenceController extends AbstractPreferenceController
+            implements PreferenceControllerMixin {
+    private static final String KEY_SUPPORT_CPU_DISPLAY = "cpu_display";
+
+    private Context mContext;
+
+    public CpuPreferenceController(Context context) {
+        super(context);
+        mContext = context;
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return true;
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_SUPPORT_CPU_DISPLAY;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        super.updateState(preference);
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+    }
+
+   
+
+   
+
+    
+
+    
+}
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/LcdPreferenceController.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/LcdPreferenceController.java
new file mode 100755
index 00000000000..7042a512401
--- /dev/null
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/LcdPreferenceController.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.deviceinfo;
+
+import android.content.Context;
+
+import android.util.Log;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settingslib.core.AbstractPreferenceController;
+
+
+public class LcdPreferenceController extends AbstractPreferenceController
+            implements PreferenceControllerMixin {
+    private static final String KEY_SUPPORT_LCD_DISPLAY = "lcd_display";
+
+    private Context mContext;
+
+    public LcdPreferenceController(Context context) {
+        super(context);
+        mContext = context;
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return true;
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_SUPPORT_LCD_DISPLAY;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        super.updateState(preference);
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+    }
+
+   
+
+   
+
+    
+
+    
+}
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RamPreferenceController.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RamPreferenceController.java
new file mode 100755
index 00000000000..a1a18bb2d4e
--- /dev/null
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RamPreferenceController.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.deviceinfo;
+
+import android.content.Context;
+
+import android.util.Log;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settingslib.core.AbstractPreferenceController;
+
+
+public class RamPreferenceController extends AbstractPreferenceController
+            implements PreferenceControllerMixin {
+    private static final String KEY_SUPPORT_RAM_DISPLAY = "ram_display";
+
+    private Context mContext;
+
+    public RamPreferenceController(Context context) {
+        super(context);
+        mContext = context;
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return true;
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_SUPPORT_RAM_DISPLAY;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        super.updateState(preference);
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+    }
+
+   
+
+   
+
+    
+
+    
+}
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RomPreferenceController.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RomPreferenceController.java
new file mode 100755
index 00000000000..d55b0c4d23f
--- /dev/null
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/RomPreferenceController.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.deviceinfo;
+
+import android.content.Context;
+
+import android.util.Log;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settingslib.core.AbstractPreferenceController;
+
+
+public class RomPreferenceController extends AbstractPreferenceController
+            implements PreferenceControllerMixin {
+    private static final String KEY_SUPPORT_ROM_DISPLAY = "rom_display";
+
+    private Context mContext;
+
+    public RomPreferenceController(Context context) {
+        super(context);
+        mContext = context;
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return true;
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_SUPPORT_ROM_DISPLAY;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        super.updateState(preference);
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+    }
+
+   
+
+   
+
+    
+
+    
+}
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
old mode 100644
new mode 100755
index bf1f79fd9ec..951d8b80deb
--- a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
@@ -37,6 +37,10 @@ import com.android.settings.deviceinfo.IpAddressPreferenceController;
 import com.android.settings.deviceinfo.ManualPreferenceController;
 import com.android.settings.deviceinfo.RegulatoryInfoPreferenceController;
 import com.android.settings.deviceinfo.SafetyInfoPreferenceController;
+import com.android.settings.deviceinfo.CpuPreferenceController; 
+import com.android.settings.deviceinfo.LcdPreferenceController; 
+import com.android.settings.deviceinfo.RamPreferenceController; 
+import com.android.settings.deviceinfo.RomPreferenceController; 
 import com.android.settings.deviceinfo.UptimePreferenceController;
 import com.android.settings.deviceinfo.WifiMacAddressPreferenceController;
 import com.android.settings.deviceinfo.imei.ImeiInfoPreferenceController;
@@ -124,6 +128,10 @@ public class MyDeviceInfoFragment extends DashboardFragment
                 UserManager.get(context)));
         controllers.add(new CustomizeSystemUpdatePreferenceController(context,
                 UserManager.get(context)));
+		controllers.add(new CpuPreferenceController(context));
+		controllers.add(new LcdPreferenceController(context));
+		controllers.add(new RomPreferenceController(context));
+		controllers.add(new RamPreferenceController(context));
         /// M: @}
         return controllers;
     }
-- 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值