RK3288开发过程中遇到的问题点和解决方法
无意中看到别人总结的(http://www.cnblogs.com/huke4853/p/6394936.html)发出来给大家借鉴一下,后续我会把自己的一些经验记录加上来删除小电池图标及百分比
a、SystemUI/.../statusbar/policy/BatteryController.java
mBatteryPercentageView.setVisibility(View.GONE);———————右上角百分比
c、SystemUI/.../statusbar/phone/StatusBarHeaderView.java
注释((BatteryMeterView) findViewById(R.id.battery)).setBatteryController(batteryController); ——下拉图标
mBatteryLevel.setVisibility = (View.GONE);———————————锁屏百分比
e、SystemUI/.../statusbar/phone/KeyguardStatusBarView.java
mBatteryLevel.setVisibility(View.GONE);————————————下拉百分比
注释((BatteryMeterView) findViewById(R.id.battery)).setBatteryController(batteryController); —锁屏界面图标
f、SystemUI/.../statusbar/phone/PhoneStatusBar.java
注释((BatteryMeterView) mStatusBarView.findViewById(R.id.battery)) ———右上角图标
注释dispatchDemoCommandToView(command, args, R.id.battery);
g、SystemUI/.../res/layout/system_icon.xml
注释battery
h、statusbar/phone/PhoneStatusBarTransitions.java———————解除电池图标相关属性设置
注释mBattery相关的内容
隐藏NOSIM图标
SystemUI/.../statusbar/SignalClusterView.java
mNoSims.setVisibility(/*mNoSimsVisible ? View.VISIBLE : */View.GONE);
修改壁纸图片
frameworks/base/core/res/res/drawable-sw720dp-nodpi
修改开机动画
代码:bootAnimation.cpp
函数:bool BootAnimation::android()
图片:frameworks/base/core/res/assets/images/
隐藏全屏提示
frameworks/base/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java
public class ImmersiveModeConfirmation {
public void handleMessage(Message msg) {
switch(msg.what) {
case SHOW:
// handleShow();-----注释
case PANIC:
// handlePanic();--------注释
下拉快捷菜单
frameworks/base/packages/SystemUI/res/values/config.xml文件quick_settings_tiles_default_bt
修改鼠标右键功能
/framework/native/services/inputflinger/InputReader.cpp文件
if (mBtnRight) {
//$_rochchips_$_modify_by_huangjc make sure mouse BtnRight for product
/*char *mIsBox = new char;
property_get("ro.target.product", mIsBox, "tablet");
if(strcmp(mIsBox, "tablet")==0)
result |= AMOTION_EVENT_BUTTON_SECONDARY;
else*/
result |= AMOTION_EVENT_BUTTON_BACK;
}
永不锁屏
frameworks/base/packages/SettingsProvider/res/values/defaults.xml——————禁止锁屏
<bool name="def_lockscreen_disabled">false</bool> 改为 true;即默认禁止锁屏
修改默认时间制式
修改布局文件
找到frameworks/base/packages/SettingsProvider/res/values/defaults.xml添加
<string name=”time_12_24”translatable=”false”>24</string>
修改Java文件
找到
frameworks/base/packages/SettingsProvider/src/com/android/provider/Settings/Databasehelper.java
在loadSystemSettings()函数添加
loadStringSetting(stmt,Settings.System.TIME_12_24,R.string.time_12_24);
多用户支持
frameworks/base/core/res/res/values/config.xml
<integer name="config_multiuserMaximumUsers">1</integer> 不允许多用户;即最大用户数为1
默认输入法
frameworks/base/core/res/res/values/config.xml
<string-array name="config_disabledUntilUsedPreinstalledImes" translatable="false">
<item>com.google.android.inputmethod.pinyin/.GooglePinyinIME</item>
默认打开硬件输入法
frameworks/base/services/core/java/com/android/server/wm/WindowManagerService.java
resolver.registerContentObserver(mShowImeWithHardKeyboardUri, false, this);------>false改为true
frameworks/base/services/core/java/com/android/server/InputMethodManagerService.java
resolver.registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD), false, this);---false改为true
去除锁屏界面No SIM Card
Keyguard/src/com/android/keyguard/CarrierText.java
注释函数updateCarrierText的setText(displayText);去除桌面渐变黑边
Launcher3/.../Launcher.java
SETWorkspaceBackground => setWorkspaceBackground
注释boolean isMultiMode = (0 != Settings.System.getInt(getContentResolver(), "multi_window_config", 0));
添加mLauncherView.setBackground(null);
修改桌面布局
/packages/apps/Launcher3/res/xml/default_workspace_5x6.xml
/packages/apps/Launcher3/src/com/android/launcher3/DynamicGrid.java
修改“设置”页面布局
Settings/res/xml/dashboard_categories.xml——————————删除对应布局即可
有时还需要去除AndroidManifest.xml中对应的布局
修改截屏设置
Settings/.../ ScreenshotSetting.java——————————————设置默认时间
String summary_delay =mDelay.getSharedPreferences().getString("screenshot_delay", "15");
Settings/res/values/arrays.xml———————————————设置截屏延时数组
搜索“<!-- screenshot setting-->”
去除“设置”HDMI选项
Settings/.../SettingsActivity.java———————————————修改以下内容
boolean isTablet = "box".equals(SystemProperties.get("ro.target.product", "tablet"));改为
boolean isTablet = true;
“无线和网络”—>“更多”
res/xml/wireless_settings.xml
永不休眠
Settings/res/xml/display_settings.xml——————————————————删除休眠选项
注释"screen_timeout"
Settings/.../DisplaySettings.java添加if条件,如果没有找到这个preference就不执行相关操作;
mScreenTimeoutPreference = (ListPreference) findPreference(KEY_SCREEN_TIMEOUT);
if (mScreenTimeoutPreference !=null ) {
....
}
devices/rockchip/rk3288/system.prop ——————————————永不休眠
ro.rk.screenoff_time=2147483647
修改内核版本
/src/com/android/settings/DeviceInfoSettings.java
//m.group(2) + " " + m.group(3) + "\n" + // x@y.com #1———————————删除第二行
修改“版本号”
/build/core/build_id.mk----------------->export BUILD_ID=xxx
/build/core/Makefile--->BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S) ==>BUILD_NUMBER := $(shell date +%Y%m%d.%H%M%S)
/build/core/version_defaults.mk--># BUILD_DISPLAY_ID := $(build_desc)==>BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER)
{:5_247:}Mark {:4_211:}
页:
[1]