[SABER-SD/Android] Battery Status

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[SABER-SD/Android] Battery Status

889件の閲覧回数
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 返答(返信)

586件の閲覧回数
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 件の賞賛

586件の閲覧回数
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 件の賞賛