首页 > 代码库 > RK3288开发过程中遇到的问题点和解决方法之Framework层
RK3288开发过程中遇到的问题点和解决方法之Framework层
删除小电池图标及百分比
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_VALUE_MAX];
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>
去除锁屏界面No SIM Card
Keyguard/src/com/android/keyguard/CarrierText.java
注释函数updateCarrierText的setText(displayText);
RK3288开发过程中遇到的问题点和解决方法之Framework层