1、不休眠
frameworks/base/packages/SettingsProvider/res/values/defaults.xml
里面60000改成-1,就是不进入休眠。
这个文件还保存其他默认设置,如:
"def_location_providers_allowed" translatable="true">gps
"def_location_providers_allowed_network" translatable="true">network
"assisted_gps_enabled">true
"def_netstats_enabled">true
"def_bluetooth_on">true
"def_wifi_display_on">false
"def_install_non_market_apps">false
"def_package_verifier_enable">true
"def_dim_screen">false
但是这个方法只适合于4.2以前的版本,4.4的版本还要修改以下:
修改/frameworks/base/services/java/com/android/server/power/PowerManagerService.java文件
getScreenOffTimeoutLocked()函数:
if (mUserActivityTimeoutOverrideFromWindowManager >= 0) {
timeout = (int)Math.min(timeout, mUserActivityTimeoutOverrideFromWindowManager);
}
+ if(mScreenOffTimeoutSetting < 0)
+ return mMaximumScreenOffTimeoutFromDeviceAdmin;
return Math.max(timeout, MINIMUM_SCREEN_OFF_TIMEOUT);
2、移除锁屏功能
./frameworks/base/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java
private boolean mExternallyEnabled = true
把mExternallyEnabled 改成false。但是这只是改了开机默认值,用户还是可用disableKeyguard/enableKeyGuard来启动。
为确保3rd app无法修改,
/frameworks/base/packages/keyguard/src/com/android/keyguard/KeyguradViewMediator.java:
private void doKeyguardLocked(Bundle options) {
...
if (DEBUG) Log.d(TAG, "doKeyguard: showing the lock screen");
+ // showLocked(options);
}
3、修改默认语言
/build/target/product/core_base.mk
PRODUCT_PROPERTY_OVERRIDES :=
ro.config.notification_sound=OnTheHunt.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
+ persist.sys.language=zh
+ persist.sys.country=CN
4.去掉导航栏
frameworksasecore
es
esvaluesconfig.xml
bool name="config_showNavigationBar">true ------------>true和false控制开关。
参考http://m.blog.csdn.net/blog/lcpajj/8850152