From 9d27de50101033f1efabc1834bb6187e85df18ee Mon Sep 17 00:00:00 2001 From: Joachim Fritzsch Date: Wed, 24 Jul 2013 12:15:16 +0200 Subject: [PATCH] android: added support for wireless charger. treat like AC. Issue #1312. --- android/BOINC/src/edu/berkeley/boinc/rpc/DeviceStatus.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/BOINC/src/edu/berkeley/boinc/rpc/DeviceStatus.java b/android/BOINC/src/edu/berkeley/boinc/rpc/DeviceStatus.java index 5ed53b3548..faee9fd147 100644 --- a/android/BOINC/src/edu/berkeley/boinc/rpc/DeviceStatus.java +++ b/android/BOINC/src/edu/berkeley/boinc/rpc/DeviceStatus.java @@ -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;