[SABER-SD/Android] Battery Status

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[SABER-SD/Android] Battery Status

872 Views
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 ?

Labels (2)
0 Kudos
2 Replies

569 Views
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 Kudos

569 Views
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 Kudos