android: added support for wireless charger. treat like AC. Issue #1312.

This commit is contained in:
Joachim Fritzsch 2013-07-24 12:15:16 +02:00
parent cef81cc487
commit 9d27de5010
1 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,11 @@ public class DeviceStatus{
if(!on_ac_power) change = true; // if different from before, set flag
on_ac_power = true;
break;
case 4: // constant BATTERY_PLUGGED_WIRELESS, only defined in API Level 17
// treat like AC power
if(!on_ac_power) change = true; // if different from before, set flag
on_ac_power = true;
break;
case BatteryManager.BATTERY_PLUGGED_USB:
if(!on_usb_power) change = true; // if different from before, set flag
on_usb_power = true;