android 8.1 设置默认语言 去屏保 不休眠

设置默认语言

在build/tools/buildinfo.sh中加入属性值

echo “persist.sys.language=zh”

echo “persist.sys.country=CN”

echo “persist.sys.timezone=Asia/Shanghai”

echo “ro.product.locale.language=zh”

echo “ro.product.region=CN”

 

去屏保

修改 frameworks/base/core/res/res/values/config.xml 中config_dreamsEnabledByDefault值

false

 

不休眠

修改代码: 

frameworks/base/core/res/res/values/config.xml

-1


 

frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java

private int getScreenOffTimeoutLocked(int sleepTimeout) {

int timeout = mScreenOffTimeoutSetting;

if (isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked()) {

timeout = Math.min(timeout, mMaximumScreenOffTimeoutFromDeviceAdmin);

}

if (mUserActivityTimeoutOverrideFromWindowManager >= 0) {

timeout = (int)Math.min(timeout, mUserActivityTimeoutOverrideFromWindowManager);

}

if (sleepTimeout >= 0) {

timeout = Math.min(timeout, sleepTimeout);

}

if (mMinimumScreenOffTimeoutConfig < 0 ) {

return mMaximumScreenOffTimeoutFromDeviceAdmin;

}

return Math.max(timeout, mMinimumScreenOffTimeoutConfig);

}

}

你可能感兴趣的:(android 8.1 设置默认语言 去屏保 不休眠)