MTK隐藏导航栏
修改全局属性, 有兴趣的可以全局搜索这个属性,在systemui以及framework中好像都有写
qemu.hw.mainkeys=1
MTK去掉下拉通知
这里去掉添加的view,只是没有界面了
--- a/alps/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/alps/vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -5081,7 +5081,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd@ShadeViewRefactor(RefactorComponent.SHADE_VIEW)public void addContainerView(View v) {Assert.isMainThread();
- addView(v);
+ //addView(v);}
MTK永不锁屏
在设置里添加永不选项 然后在代码中修改,有部分平台是有自己修改的 ,像RK
--- a/alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/arrays.xml
+++ b/alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/arrays.xml
@@ -37,6 +37,7 @@<item msgid="7489864775127957179">"5 分钟"</item><item msgid="2314124409517439288">"10 分钟"</item><item msgid="6864027152847611413">"30 分钟"</item>
+ <item msgid="6864027152847611413">"永不"</item></string-array><string-array name="dream_timeout_entries"><item msgid="3149294732238283185">"永不"</item>/alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-/arrays.xml<!-- Do not translate. --><string-array name="screen_timeout_values" translatable="false"><!-- Do not translate. --><item>15000</item><!-- Do not translate. --><item>30000</item><!-- Do not translate. --><item>60000</item><!-- Do not translate. --><item>120000</item><!-- Do not translate. --><item>300000</item><!-- Do not translate. --><item>600000</item><!-- Do not translate. --><item>1800000</item><!-- Do not translate. -->+ <item>0</item></string-array>diff --git a/alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/display/TimeoutPreferenceController.java b/alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/display/TimeoutPreferenceController.java
index 60b7e24b85..aa6e86f03a 100644
--- a/alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/display/TimeoutPreferenceController.java
+++ b/alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/display/TimeoutPreferenceController.java
@@ -86,7 +86,11 @@ public class TimeoutPreferenceController extends AbstractPreferenceController impublic boolean onPreferenceChange(Preference preference, Object newValue) {try {int value = Integer.parseInt((String) newValue);
- Settings.System.putInt(mContext.getContentResolver(), SCREEN_OFF_TIMEOUT, value);
+ if(value == 0){
+ Settings.System.putInt(mContext.getContentResolver(), SCREEN_OFF_TIMEOUT, Integer.MAX_VALUE-1000);
+ }else{
+ Settings.System.putInt(mContext.getContentResolver(), SCREEN_OFF_TIMEOUT, value);
+ }updateTimeoutPreferenceDescription((TimeoutListPreference) preference, value);} catch (NumberFormatException e) {Log.e(TAG, "could not persist screen timeout setting", e);
修改开机默认值
第一次开机的时候会加载这个值, 有兴趣的可以看一下SettingsProvider中的DatabaseHelper.java,
开机的时候会加载一大堆的默认值
--- a/alps/vendor/mediatek/proprietary/packages/apps/SettingsProvider/res/values/defaults.xml
+++ b/alps/vendor/mediatek/proprietary/packages/apps/SettingsProvider/res/values/defaults.xml
@@ -18,7 +18,7 @@--><resources><bool name="def_dim_screen">true</bool>
- <integer name="def_screen_off_timeout">60000</integer>
+ <integer name="def_screen_off_timeout">2147482647</integer><integer name="def_sleep_timeout">-1</integer><bool name="def_airplane_mode_on">false</bool><bool name="def_theater_mode_on">false</bool>
永不灭屏
这个值, 跟熄屏有关,在PMS中可以搜索一下具体使用
--- a/alps/frameworks/base/core/res/res/values/config.xml
+++ b/alps/frameworks/base/core/res/res/values/config.xml
@@ -2385,7 +2385,7 @@This value must be greater than zero, otherwise the device will immediatelyfall asleep again as soon as it is awoken.-->
- <integer name="config_minimumScreenOffTimeout">10000</integer>
+ <integer name="config_minimumScreenOffTimeout">2147482647</integer><!-- User activity timeout: Maximum screen dim duration in milliseconds.