【Android 4.4 不休眠+不锁屏+默认中文+去除导航栏】白日放歌须纵酒,青春作伴好还乡。这篇文章主要讲述Android 4.4 不休眠+不锁屏+默认中文+去除导航栏相关的知识,希望能为你提供帮助。
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.javaprivate 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.mkPRODUCT_PROPERTY_OVERRIDES := \
ro.config.notification_sound=OnTheHunt.ogg \
ro.config.alarm_alert=Alarm_Classic.ogg \+
persist.sys.language=zh \+
persist.sys.country=CN4.去掉导航栏\frameworks\base\core\res\res\values\config.xmlbool name="config_showNavigationBar">
true ------------>
true和false控制开关。参考http://m.blog.csdn.net/blog/lcpajj/8850152
推荐阅读
- Android Studio将module变为library
- 安卓手机上传同一张图片第二次不触发onchange
- Android——build.prop 解析
- wesome-android
- (转载)[Android开发]zxing扫描结果乱码
- Android4.0.4-在build.prop中添加属性的方法
- Android艺术——Bitmap高效加载和缓存代码分析
- Android艺术——性能优化问题
- Common Words Used in Android