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?
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.