Home
last modified time | relevance | path

Searched refs:BatteryManager (Results 1 – 25 of 30) sorted by relevance

12

/frameworks/base/cmds/svc/src/com/android/commands/svc/
DPowerCommand.java20 import android.os.BatteryManager;
54 val = BatteryManager.BATTERY_PLUGGED_AC | in run()
55 BatteryManager.BATTERY_PLUGGED_USB | in run()
56 BatteryManager.BATTERY_PLUGGED_WIRELESS; in run()
61 val = BatteryManager.BATTERY_PLUGGED_USB; in run()
63 val = BatteryManager.BATTERY_PLUGGED_AC; in run()
65 val = BatteryManager.BATTERY_PLUGGED_WIRELESS; in run()
/frameworks/base/docs/html-intl/intl/ja/training/monitoring-device-state/
Dbattery-monitoring.jd39 <p>初めに、現在の充電状態を特定します。{@link android.os.BatteryManager} によって電池と充電状態に関するすべての詳細情報が sticky {@link andro…
49 int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
50 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
51 status == BatteryManager.BATTERY_STATUS_FULL;
54 int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
65 <p>{@link android.os.BatteryManager} は、端末が電源に接続されたときや接続が解除されたときに、アクションをブロードキャストします。このようなイベントは、アプリが実…
79 int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
80 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
81 status == BatteryManager.BATTERY_STATUS_FULL;
83 int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
[all …]
/frameworks/base/docs/html-intl/intl/zh-cn/training/monitoring-device-state/
Dbattery-monitoring.jd39 <p>请先确定当前的充电状态。{@link android.os.BatteryManager} 会通过一个包含充电状态的持续 {@link android.content.Intent} 广播所有…
49 int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
50 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
51 status == BatteryManager.BATTERY_STATUS_FULL;
54 int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
65 <p>只要设备连接或断开电源,{@link android.os.BatteryManager} 就会广播相应的操作。即使您的应用没有运行,也请务必接收这些事件,尤其是当这些事件会影响您启动应用以执…
79 int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
80 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
81 status == BatteryManager.BATTERY_STATUS_FULL;
83 int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
[all …]
/frameworks/base/docs/html-intl/intl/ko/training/monitoring-device-state/
Dbattery-monitoring.jd39 <p>먼저 현재 충전 상태를 확인하는 것부터 시작합니다. {@link android.os.BatteryManager}는 배터리 충전 상태 등 충전 정보를 스티키 {@link an…
49 int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
50 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
51 status == BatteryManager.BATTERY_STATUS_FULL;
54 int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
65 <p>{@link android.os.BatteryManager}는 기기가 전원에 연결되어 있는지 여부와 관계없이 언제나 액션을 브로드캐스트합니다. 앱이 실행되지 않는 동안에도 …
79 int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
80 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
81 status == BatteryManager.BATTERY_STATUS_FULL;
83 int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
[all …]
/frameworks/base/docs/html-intl/intl/ru/training/monitoring-device-state/
Dbattery-monitoring.jd39 <p>Начните с определения текущего состояния зарядки. {@link android.os.BatteryManager} передает все…
49 int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
50 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
51 status == BatteryManager.BATTERY_STATUS_FULL;
54 int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
65 <p>{@link android.os.BatteryManager} передает действие каждый раз, когда устройство подключается к …
79 int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
80 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
81 status == BatteryManager.BATTERY_STATUS_FULL;
83 int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
[all …]
/frameworks/base/services/core/java/com/android/server/
DBatteryService.java32 import android.os.BatteryManager;
226 if (mBatteryProps.batteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) { in isPoweredLocked()
229 … if ((plugTypeSet & BatteryManager.BATTERY_PLUGGED_AC) != 0 && mBatteryProps.chargerAcOnline) { in isPoweredLocked()
232 … if ((plugTypeSet & BatteryManager.BATTERY_PLUGGED_USB) != 0 && mBatteryProps.chargerUsbOnline) { in isPoweredLocked()
235 …if ((plugTypeSet & BatteryManager.BATTERY_PLUGGED_WIRELESS) != 0 && mBatteryProps.chargerWirelessO… in isPoweredLocked()
252 && mBatteryProps.batteryStatus != BatteryManager.BATTERY_STATUS_UNKNOWN in shouldSendBatteryLowLocked()
260 … if (mBatteryProps.batteryLevel == 0 && !isPoweredLocked(BatteryManager.BATTERY_PLUGGED_ANY)) { in shutdownIfNoPowerLocked()
312 mPlugType = BatteryManager.BATTERY_PLUGGED_AC; in processValuesLocked()
314 mPlugType = BatteryManager.BATTERY_PLUGGED_USB; in processValuesLocked()
316 mPlugType = BatteryManager.BATTERY_PLUGGED_WIRELESS; in processValuesLocked()
[all …]
DUiModeManagerService.java34 import android.os.BatteryManager;
140 mCharging = (intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0) != 0);
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBatteryController.java23 import android.os.BatteryManager;
78 * intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0) in onReceive()
79 / intent.getIntExtra(BatteryManager.EXTRA_SCALE, 100)); in onReceive()
80 mPluggedIn = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0) != 0; in onReceive()
82 final int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, in onReceive()
83 BatteryManager.BATTERY_STATUS_UNKNOWN); in onReceive()
84 mCharged = status == BatteryManager.BATTERY_STATUS_FULL; in onReceive()
85 mCharging = mCharged || status == BatteryManager.BATTERY_STATUS_CHARGING; in onReceive()
/frameworks/base/docs/html/training/monitoring-device-state/
Dbattery-monitoring.jd46 <p>Start by determining the current charge status. The {@link android.os.BatteryManager}
63 int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
64 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
65 status == BatteryManager.BATTERY_STATUS_FULL;
68 int chargePlug = batteryStatus.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
69 boolean usbCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_USB;
70 boolean acCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_AC;</pre>
82 <p>The {@link android.os.BatteryManager} broadcasts an action whenever the device is connected or
103 int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
104 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/
DPowerUI.java25 import android.os.BatteryManager;
51 private int mBatteryStatus = BatteryManager.BATTERY_STATUS_UNKNOWN;
155 mBatteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 100); in onReceive()
157 mBatteryStatus = intent.getIntExtra(BatteryManager.EXTRA_STATUS, in onReceive()
158 BatteryManager.BATTERY_STATUS_UNKNOWN); in onReceive()
160 mPlugType = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 1); in onReceive()
162 mInvalidCharger = intent.getIntExtra(BatteryManager.EXTRA_INVALID_CHARGER, 0); in onReceive()
196 && mBatteryStatus != BatteryManager.BATTERY_STATUS_UNKNOWN in onReceive()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DBatteryMeterView.java30 import android.os.BatteryManager;
101 * intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0) in onReceive()
102 / intent.getIntExtra(BatteryManager.EXTRA_SCALE, 100)); in onReceive()
104 plugType = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0); in onReceive()
106 health = intent.getIntExtra(BatteryManager.EXTRA_HEALTH, in onReceive()
107 BatteryManager.BATTERY_HEALTH_UNKNOWN); in onReceive()
108 status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, in onReceive()
109 BatteryManager.BATTERY_STATUS_UNKNOWN); in onReceive()
110 technology = intent.getStringExtra(BatteryManager.EXTRA_TECHNOLOGY); in onReceive()
111 voltage = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, 0); in onReceive()
[all …]
/frameworks/base/docs/html-intl/intl/es/training/monitoring-device-state/
Dbattery-monitoring.jd39 …mendamos que determines el estado de carga actual. {@link android.os.BatteryManager} envía los det…
49 int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
50 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
51 status == BatteryManager.BATTERY_STATUS_FULL;
54 int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
65 <p>{@link android.os.BatteryManager} emite una acción siempre que el dispositivo se conecta o desco…
79 int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
80 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
81 status == BatteryManager.BATTERY_STATUS_FULL;
83 int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DKeyguardIndicationController.java29 import android.os.BatteryManager;
165 mPowerPluggedIn = status.status == BatteryManager.BATTERY_STATUS_CHARGING
166 || status.status == BatteryManager.BATTERY_STATUS_FULL;
/frameworks/base/services/core/java/com/android/server/power/
DWirelessChargerDetector.java23 import android.os.BatteryManager;
186 if (isPowered && plugType == BatteryManager.BATTERY_PLUGGED_WIRELESS) { in update()
197 if (plugType != 0 && plugType != BatteryManager.BATTERY_PLUGGED_WIRELESS) { in update()
DPowerManagerService.java44 import android.os.BatteryManager;
638 Settings.Global.STAY_ON_WHILE_PLUGGED_IN, BatteryManager.BATTERY_PLUGGED_AC); in updateSettingsLocked()
1258 mIsPowered = mBatteryManagerInternal.isPowered(BatteryManager.BATTERY_PLUGGED_ANY); in updateIsPoweredLocked()
1320 && oldPlugType == BatteryManager.BATTERY_PLUGGED_WIRELESS) { in shouldWakeUpWhenPluggedOrUnpluggedLocked()
1327 && mPlugType == BatteryManager.BATTERY_PLUGGED_WIRELESS in shouldWakeUpWhenPluggedOrUnpluggedLocked()
/frameworks/base/packages/Keyguard/src/com/android/keyguard/
DKeyguardUpdateMonitor.java34 import static android.os.BatteryManager.BATTERY_STATUS_FULL;
35 import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
36 import static android.os.BatteryManager.BATTERY_HEALTH_UNKNOWN;
37 import static android.os.BatteryManager.EXTRA_STATUS;
38 import static android.os.BatteryManager.EXTRA_PLUGGED;
39 import static android.os.BatteryManager.EXTRA_LEVEL;
40 import static android.os.BatteryManager.EXTRA_HEALTH;
44 import android.os.BatteryManager;
522 return plugged == BatteryManager.BATTERY_PLUGGED_AC in isPluggedIn()
523 || plugged == BatteryManager.BATTERY_PLUGGED_USB in isPluggedIn()
[all …]
DKeyguardMessageArea.java24 import android.os.BatteryManager;
/frameworks/base/tests/BatteryWaster/src/com/android/batterywaster/
DBatteryWaster.java24 import android.os.BatteryManager;
173 int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
/frameworks/base/services/core/java/com/android/server/job/controllers/
DBatteryController.java25 import android.os.BatteryManager;
167 mCharging = batteryManagerInternal.isPowered(BatteryManager.BATTERY_PLUGGED_ANY); in startTracking()
/frameworks/base/core/java/android/os/
DBatteryManager.java29 public class BatteryManager { class
DBatteryStats.java3514 case BatteryManager.BATTERY_STATUS_UNKNOWN: in printNextItem()
3517 case BatteryManager.BATTERY_STATUS_CHARGING: in printNextItem()
3520 case BatteryManager.BATTERY_STATUS_DISCHARGING: in printNextItem()
3523 case BatteryManager.BATTERY_STATUS_NOT_CHARGING: in printNextItem()
3526 case BatteryManager.BATTERY_STATUS_FULL: in printNextItem()
3538 case BatteryManager.BATTERY_HEALTH_UNKNOWN: in printNextItem()
3541 case BatteryManager.BATTERY_HEALTH_GOOD: in printNextItem()
3544 case BatteryManager.BATTERY_HEALTH_OVERHEAT: in printNextItem()
3547 case BatteryManager.BATTERY_HEALTH_DEAD: in printNextItem()
3550 case BatteryManager.BATTERY_HEALTH_OVER_VOLTAGE: in printNextItem()
[all …]
/frameworks/base/docs/html/sdk/api_diff/5/
DmissingSinces.txt395 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_HEALTH
396 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_ICON_SMALL
398 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_LEVEL
399 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_PLUGGED
400 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_PRESENT
402 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_SCALE
403 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_STATUS
404 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_TECHNOLOGY
405 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_TEMPERATURE
406 NO DOC BLOCK: android.os.BatteryManager Field EXTRA_VOLTAGE
/frameworks/base/media/java/android/mtp/
DMtpDatabase.java30 import android.os.BatteryManager;
136 mBatteryScale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, 0);
137 int newLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0);
/frameworks/base/core/java/com/android/internal/os/
DBatteryStatsImpl.java30 import android.os.BatteryManager;
2049 if ((h.batteryPlugType&BatteryManager.BATTERY_PLUGGED_AC) != 0) { in buildStateInt()
2051 } else if ((h.batteryPlugType&BatteryManager.BATTERY_PLUGGED_USB) != 0) { in buildStateInt()
2053 } else if ((h.batteryPlugType&BatteryManager.BATTERY_PLUGGED_WIRELESS) != 0) { in buildStateInt()
2114 cur.batteryPlugType = BatteryManager.BATTERY_PLUGGED_AC; in readHistoryDelta()
2117 cur.batteryPlugType = BatteryManager.BATTERY_PLUGGED_USB; in readHistoryDelta()
2120 cur.batteryPlugType = BatteryManager.BATTERY_PLUGGED_WIRELESS; in readHistoryDelta()
6745 if (!mNoAutoReset && (oldStatus == BatteryManager.BATTERY_STATUS_FULL in setOnBatteryLocked()
6999 if (!onBattery && status == BatteryManager.BATTERY_STATUS_FULL) { in setBatteryState()
/frameworks/base/core/java/android/app/
DContextImpl.java102 import android.os.BatteryManager;
433 return new BatteryManager(); in registerService()

12