[SABER-SD/Android] Battery Status

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

[SABER-SD/Android] Battery Status

1,606 次查看
norisugi
Contributor II

When I got the battery status on SABER-SD/Android, its result was BATTERY_PLUGGED_USB.

But the AC adapter is plugged into the board actually.

So I'd like to change its status to BATTERY_PLUGGED_AC.

What should I do ?

标签 (2)
0 项奖励
回复
2 回复数

1,303 次查看
SergioSolis
NXP Employee
NXP Employee

hello Nori,

can you please tell me how you got that status?, which android version are you using? and if possible can you send a photo of it?

0 项奖励
回复

1,303 次查看
norisugi
Contributor II

My android version is 4.3.

I tried to make the "stay_on_while_plugged_in" enable.

But even if I made the "def_stay_on_while_plugged_in" true,

"stay_on_while_plugged_in" didn't become enable.

It became enable by changing as follows.

frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

            loadSetting(stmt, Settings.Global.STAY_ON_WHILE_PLUGGED_IN,

                    ("1".equals(SystemProperties.get("ro.kernel.qemu")) ||

                        mContext.getResources().getBoolean(R.bool.def_stay_on_while_plugged_in))

                     ? 3 : 0); // BATTERY_PLUGGED_AC|BATTERY_PLUGGED_USB

//                     ? 1 : 0);  // BATTERY_PLUGGED_AC

So I wonder if the current battery status is BATTERY_PLUGGED_USB.

0 项奖励
回复