— a/device/mediatek/system/mssi_32_ago_h_ww/SystemConfig.mk
+++ b/device/mediatek/system/mssi_32_ago_h_ww/SystemConfig.mk
@@ -31,7 +31,7 @@ MSSI_MTK_IMS_SUPPORT = yes
MSSI_MTK_KERNEL_POWER_OFF_CHARGING = yes
MSSI_MTK_BT_LHDC_CODEC_SUPPORT = yes
MSSI_MTK_LIVEWALLPAPER_APP = no
-MSSI_MTK_LOG_CUSTOMER_SUPPORT = no
+MSSI_MTK_LOG_CUSTOMER_SUPPORT = yes
MSSI_MTK_LOG_SUPPORT_MOBILE_LOG = yes
MSSI_MTK_MDLOGGER_SUPPORT = yes
MSSI_MTK_MDMI_SUPPORT = no
diff --git a/device/mediatek/system/mssi_32_ago_ww/SystemConfig.mk b/device/mediatek/system/mssi_32_ago_ww/SystemConfig.mk
index 5f4450dccc9…b5539da15df 100755
— a/device/mediatek/system/mssi_32_ago_ww/SystemConfig.mk
+++ b/device/mediatek/system/mssi_32_ago_ww/SystemConfig.mk
@@ -31,7 +31,7 @@ MSSI_MTK_IMS_SUPPORT = yes
MSSI_MTK_KERNEL_POWER_OFF_CHARGING = yes
MSSI_MTK_BT_LHDC_CODEC_SUPPORT = yes
MSSI_MTK_LIVEWALLPAPER_APP = no
-MSSI_MTK_LOG_CUSTOMER_SUPPORT = no
+MSSI_MTK_LOG_CUSTOMER_SUPPORT = yes
MSSI_MTK_LOG_SUPPORT_MOBILE_LOG = yes
MSSI_MTK_MDLOGGER_SUPPORT = yes
MSSI_MTK_MDMI_SUPPORT = no
diff --git a/device/mediatek/system/mssi_32_ago_ww_armv7/SystemConfig.mk b/device/mediatek/system/mssi_32_ago_ww_armv7/SystemConfig.mk
index ae784d6b14c…663a6533ac7 100755
— a/device/mediatek/system/mssi_32_ago_ww_armv7/SystemConfig.mk
+++ b/device/mediatek/system/mssi_32_ago_ww_armv7/SystemConfig.mk
@@ -31,7 +31,7 @@ MSSI_MTK_IMS_SUPPORT = yes
MSSI_MTK_KERNEL_POWER_OFF_CHARGING = yes
MSSI_MTK_BT_LHDC_CODEC_SUPPORT = yes
MSSI_MTK_LIVEWALLPAPER_APP = no
-MSSI_MTK_LOG_CUSTOMER_SUPPORT = no
+MSSI_MTK_LOG_CUSTOMER_SUPPORT = yes
MSSI_MTK_LOG_SUPPORT_MOBILE_LOG = yes
MSSI_MTK_MDLOGGER_SUPPORT = yes
MSSI_MTK_MDMI_SUPPORT = no
diff --git a/device/mediatek/system/mssi_64_ww/SystemConfig.mk b/device/mediatek/system/mssi_64_ww/SystemConfig.mk
index 6862f32f384…49c0c550e75 100755
— a/device/mediatek/system/mssi_64_ww/SystemConfig.mk
+++ b/device/mediatek/system/mssi_64_ww/SystemConfig.mk
@@ -31,7 +31,7 @@ MSSI_MTK_IMS_SUPPORT = yes
MSSI_MTK_KERNEL_POWER_OFF_CHARGING = yes
MSSI_MTK_BT_LHDC_CODEC_SUPPORT = yes
MSSI_MTK_LIVEWALLPAPER_APP = yes
-MSSI_MTK_LOG_CUSTOMER_SUPPORT = no
+MSSI_MTK_LOG_CUSTOMER_SUPPORT = yes
MSSI_MTK_LOG_SUPPORT_MOBILE_LOG = yes
MSSI_MTK_MDLOGGER_SUPPORT = yes
MSSI_MTK_MDMI_SUPPORT = no
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 4d8609c51fc…b42594b1a60 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
@@ -4640,4 +4640,5 @@
设置时间
引擎设置
-
<string name="mtklog_setting">Mtklog</string>
-
<Preference
-
android:key="Mtklog_mode_key"
-
android:title="@string/mtklog_setting" />
-
<Preference android:key="Factory_mode_key" android:title="@string/Factory_mode" />
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index b35c18fd105…bb2e1826a64 100755
— a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -409,6 +409,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
controllers.add(new AgingMode(context));
controllers.add(new Factory_mode(context));
controllers.add(new Engineer_mode(context));
-
controllers.add(new Mtklog_mode(context)); controllers.add(new StayAwakePreferenceController(context, lifecycle)); controllers.add(new HdcpCheckingPreferenceController(context)); controllers.add(new BluetoothSnoopLogPreferenceController(context));
diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/development/Mtklog_mode.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/development/Mtklog_mode.java
new file mode 100755
index 00000000000…d1cc2956141
— /dev/null
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/development/Mtklog_mode.java
@@ -0,0 +1,73 @@
+/*^M
-
- Copyright © 2019 The Android Open Source Project^M
- *^M
-
- Licensed under the Apache License, Version 2.0 (the “License”);^M
-
- you may not use this file except in compliance with the License.^M
-
- You may obtain a copy of the License at^M
- *^M
-
-
http://www.apache.org/licenses/LICENSE-2.0^M
-
- *^M
-
- Unless required by applicable law or agreed to in writing, software^M
-
- distributed under the License is distributed on an “AS IS” BASIS,^M
-
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.^M
-
- See the License for the specific language governing permissions and^M
-
- limitations under the License.^M
- */^M
+^M
+package com.android.settings.development;^M
+^M
+import android.app.ActivityManager;^M
+import android.content.ComponentName;^M
+import android.content.Context;^M
+import android.content.Intent;^M
+import android.os.Build;^M
+import android.os.Handler;^M
+import android.os.Looper;^M
+import android.os.RemoteException;^M
+import android.os.UserManager;^M
+import android.util.Log;^M
+import android.widget.Toast;^M
+^M
+import androidx.preference.Preference;^M
+^M
+import com.android.settings.R;^M
+import com.android.settings.core.PreferenceControllerMixin;^M
+import com.android.settingslib.development.DeveloperOptionsPreferenceController;^M
+^M
+public class Mtklog_mode extends DeveloperOptionsPreferenceController^M -
implements PreferenceControllerMixin {^M
+^M
- private static final String KEY_AGING_MODE_KEY = “Mtklog_mode_key”;^M
- private Context mContext;^M
+^M - public Mtklog_mode(Context context) {^M
-
super(context);^M
-
Log.d("ycj","Mtklog_mode onPreferenceClick 0");^M
-
this.mContext = context;^M
- }^M
+^M - @Override^M
- public boolean isAvailable() {^M
-
return true;^M
- }^M
+^M - @Override^M
- public String getPreferenceKey() {^M
-
return KEY_AGING_MODE_KEY;^M
- }^M
+^M - @Override^M
- public boolean handlePreferenceTreeClick(Preference preference) {^M
-
if (KEY_AGING_MODE_KEY.equals(preference.getKey())) {^M
-
Intent intent = new Intent(Intent.ACTION_MAIN);^M
-
intent.addCategory(Intent.CATEGORY_LAUNCHER);^M
-
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);^M
-
ComponentName cn = new ComponentName("com.debug.loggerui", "com.debug.loggerui.MainActivity");^M
-
intent.setComponent(cn);^M
-
mContext.startActivity(intent);^M
-
Log.d("ycj","Mtklog_mode onPreferenceClick 1");^M
-
return true;^M
-
}^M
-
return false;^M
- }^M
+}^