diff options
author | Brian Muramatsu <btmura@google.com> | 2012-08-14 15:21:02 -0700 |
---|---|---|
committer | Brian Muramatsu <btmura@google.com> | 2012-08-20 10:04:12 -0700 |
commit | 37a37f445cbcd64376af153dd79ea2a123d9405d (patch) | |
tree | 7b2ae5f75d4c6bff056472da64752473e1d211f9 /cmds/svc/src | |
parent | 82d53ce283b7c275624d66e9bf20cfe2614af5c4 (diff) | |
download | frameworks_base-37a37f445cbcd64376af153dd79ea2a123d9405d.zip frameworks_base-37a37f445cbcd64376af153dd79ea2a123d9405d.tar.gz frameworks_base-37a37f445cbcd64376af153dd79ea2a123d9405d.tar.bz2 |
add wireless charger support
bug: 6879638
- add new enum value BATTERY_PLUGGED_WIRELESS
- check for sys online file with contents "Wireless"
Change-Id: I22dc3c40f50573c98643e7b5cbcb237d0216530d
Diffstat (limited to 'cmds/svc/src')
-rw-r--r-- | cmds/svc/src/com/android/commands/svc/PowerCommand.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmds/svc/src/com/android/commands/svc/PowerCommand.java b/cmds/svc/src/com/android/commands/svc/PowerCommand.java index deef2a3..ec3ec3e 100644 --- a/cmds/svc/src/com/android/commands/svc/PowerCommand.java +++ b/cmds/svc/src/com/android/commands/svc/PowerCommand.java @@ -37,7 +37,7 @@ public class PowerCommand extends Svc.Command { public String longHelp() { return shortHelp() + "\n" + "\n" - + "usage: svc power stayon [true|false|usb|ac]\n" + + "usage: svc power stayon [true|false|usb|ac|wireless]\n" + " Set the 'keep awake while plugged in' setting.\n"; } @@ -48,7 +48,8 @@ public class PowerCommand extends Svc.Command { int val; if ("true".equals(args[2])) { val = BatteryManager.BATTERY_PLUGGED_AC | - BatteryManager.BATTERY_PLUGGED_USB; + BatteryManager.BATTERY_PLUGGED_USB | + BatteryManager.BATTERY_PLUGGED_WIRELESS; } else if ("false".equals(args[2])) { val = 0; @@ -56,8 +57,9 @@ public class PowerCommand extends Svc.Command { val = BatteryManager.BATTERY_PLUGGED_USB; } else if ("ac".equals(args[2])) { val = BatteryManager.BATTERY_PLUGGED_AC; - } - else { + } else if ("wireless".equals(args[2])) { + val = BatteryManager.BATTERY_PLUGGED_WIRELESS; + } else { break fail; } IPowerManager pm |