引言
保留修改记录,方便后期参考
修改方案
diff --git a/frameworks/base/core/java/android/content/res/Configuration.java b/frameworks/base/core/java/android/content/res/Configuration.java
old mode 100644
new mode 100755
index 193e56ef40..112ab0d370
--- a/frameworks/base/core/java/android/content/res/Configuration.java
+++ b/frameworks/base/core/java/android/content/res/Configuration.java
@@ -1173,7 +1173,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
* Set this object to the system defaults.
*/
public void setToDefaults() {
- fontScale = 1;
+ fontScale = 1.3f;
mcc = mnc = 0;
mLocaleList = LocaleList.getEmptyLocaleList();
locale = null;
diff --git a/vendor/mediatek/proprietary/packages/apps/SettingsProvider/res/values/defaults.xml b/vendor/mediatek/proprietary/packages/apps/SettingsProvider/res/values/defaults.xml
index 730b962ea0..d3444778eb 100755
--- a/vendor/mediatek/proprietary/packages/apps/SettingsProvider/res/values/defaults.xml
+++ b/vendor/mediatek/proprietary/packages/apps/SettingsProvider/res/values/defaults.xml
@@ -222,4 +222,5 @@
<!-- Default for Settings.Secure.SWIPE_UP_TO_SWITCH_APPS_ENABLED -->
<integer name="gesture_swipe_up">0</integer>
<bool name="def_ethernet_on">false</bool>
+ <string name="display_density_forced">264</string>
</resources>
diff --git a/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 5b0b5a243a..44003153c8 100755
--- a/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2423,6 +2423,9 @@ class DatabaseHelper extends SQLiteOpenHelper {
// Set default tty mode
loadSetting(stmt, Settings.System.TTY_MODE, 0);
+ loadSetting(stmt, Settings.System.FONT_SCALE, 1.30f);
+
loadIntegerSetting(stmt, Settings.System.SCREEN_BRIGHTNESS,
R.integer.def_screen_brightness);
@@ -2578,6 +2581,10 @@ class DatabaseHelper extends SQLiteOpenHelper {
loadIntegerSetting(stmt, Settings.Secure.SLEEP_TIMEOUT,
R.integer.def_sleep_timeout);
+ loadStringSetting(stmt, Settings.Secure.DISPLAY_DENSITY_FORCED,
+ R.string.display_density_forced);
+
//mid add
loadIntegerSetting(stmt, Settings.Secure.SWIPE_UP_TO_SWITCH_APPS_ENABLED,
R.integer.gesture_swipe_up);
diff --git a/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
old mode 100644
new mode 100755
index 1c635c4117..3a0c3566b0
--- a/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
+++ b/vendor/mediatek/proprietary/packages/apps/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
@@ -264,7 +264,8 @@ public class SettingsHelper {
return !TextUtils.isEmpty(Settings.Secure.getString(
mContext.getContentResolver(), name));
case Settings.System.FONT_SCALE:
- return Settings.System.getFloat(mContext.getContentResolver(), name, 1.0f) != 1.0f;
+ return Settings.System.getFloat(mContext.getContentResolver(), name, 1.30f) != 1.30f;
default:
return false;
}