Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5d5d608 authored by Brian Muramatsu's avatar Brian Muramatsu Committed by Android (Google) Code Review
Browse files

Merge "add wireless charger support" into jb-mr1-dev

parents 33da458d 37a37f44
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15525,6 +15525,7 @@ package android.os {
    field public static final int BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6; // 0x6
    field public static final int BATTERY_PLUGGED_AC = 1; // 0x1
    field public static final int BATTERY_PLUGGED_USB = 2; // 0x2
    field public static final int BATTERY_PLUGGED_WIRELESS = 4; // 0x4
    field public static final int BATTERY_STATUS_CHARGING = 2; // 0x2
    field public static final int BATTERY_STATUS_DISCHARGING = 3; // 0x3
    field public static final int BATTERY_STATUS_FULL = 5; // 0x5
+6 −4
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -115,4 +115,6 @@ public class BatteryManager {
    public static final int BATTERY_PLUGGED_AC = 1;
    /** Power source is a USB port. */
    public static final int BATTERY_PLUGGED_USB = 2;
    /** Power source is wireless. */
    public static final int BATTERY_PLUGGED_WIRELESS = 4;
}
+3 −0
Original line number Diff line number Diff line
@@ -2071,6 +2071,9 @@ public abstract class BatteryStats implements Parcelable {
                        case BatteryManager.BATTERY_PLUGGED_USB:
                            pw.print("usb");
                            break;
                        case BatteryManager.BATTERY_PLUGGED_WIRELESS:
                            pw.print("wireless");
                            break;
                        default:
                            pw.print(oldPlug);
                            break;
+1 −0
Original line number Diff line number Diff line
@@ -1147,6 +1147,7 @@ public final class Settings {
         * <li>{@code 0} to never stay on while plugged in</li>
         * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li>
         * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li>
         * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li>
         * </ul>
         * These values can be OR-ed together.
         */
Loading