auto import from //branches/cupcake/...@132276

This commit is contained in:
The Android Open Source Project
2009-02-19 10:57:31 -08:00
parent da996f390e
commit 3001a03543
301 changed files with 11400 additions and 9612 deletions

View File

@ -121,9 +121,10 @@ class BatteryService extends Binder {
}
int plugTypeBit = 0;
if (mAcOnline) {
plugTypeBit = BatteryManager.BATTERY_PLUGGED_AC;
} else if (mUsbOnline) {
plugTypeBit = BatteryManager.BATTERY_PLUGGED_USB;
plugTypeBit |= BatteryManager.BATTERY_PLUGGED_AC;
}
if (mUsbOnline) {
plugTypeBit |= BatteryManager.BATTERY_PLUGGED_USB;
}
return (plugTypeSet & plugTypeBit) != 0;
}