OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:BatteryManager
(Results
1 - 25
of
70
) sorted by null
1
2
3
/frameworks/base/cmds/svc/src/com/android/commands/svc/
PowerCommand.java
20
import android.os.
BatteryManager
;
55
val =
BatteryManager
.BATTERY_PLUGGED_AC |
56
BatteryManager
.BATTERY_PLUGGED_USB |
57
BatteryManager
.BATTERY_PLUGGED_WIRELESS;
62
val =
BatteryManager
.BATTERY_PLUGGED_USB;
64
val =
BatteryManager
.BATTERY_PLUGGED_AC;
66
val =
BatteryManager
.BATTERY_PLUGGED_WIRELESS;
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
BatteryInfoTest.java
21
import android.os.
BatteryManager
;
64
mDisChargingBatteryBroadcast.putExtra(
BatteryManager
.EXTRA_PLUGGED, 0);
65
mDisChargingBatteryBroadcast.putExtra(
BatteryManager
.EXTRA_LEVEL, 0);
66
mDisChargingBatteryBroadcast.putExtra(
BatteryManager
.EXTRA_SCALE, 100);
67
mDisChargingBatteryBroadcast.putExtra(
BatteryManager
.EXTRA_STATUS,
68
BatteryManager
.BATTERY_STATUS_FULL);
71
mChargingBatteryBroadcast.putExtra(
BatteryManager
.EXTRA_PLUGGED,
72
BatteryManager
.BATTERY_PLUGGED_AC);
73
mChargingBatteryBroadcast.putExtra(
BatteryManager
.EXTRA_LEVEL, 50);
74
mChargingBatteryBroadcast.putExtra(
BatteryManager
.EXTRA_SCALE, 100)
[
all
...]
/external/libmojo/base/android/java/src/org/chromium/base/
PowerMonitor.java
10
import android.os.
BatteryManager
;
75
int chargePlug = intent.getIntExtra(
BatteryManager
.EXTRA_PLUGGED, -1);
77
sInstance.mIsBatteryPower = chargePlug !=
BatteryManager
.BATTERY_PLUGGED_USB
78
&& chargePlug !=
BatteryManager
.BATTERY_PLUGGED_AC;
/packages/apps/Settings/tests/app/src/com/android/settings/tests/
KeepOnScreenTest.java
22
import android.os.
BatteryManager
;
41
private static int EXPECTED_FLAG =
BatteryManager
.BATTERY_PLUGGED_AC
42
|
BatteryManager
.BATTERY_PLUGGED_USB |
BatteryManager
.BATTERY_PLUGGED_WIRELESS;
/packages/apps/StorageManager/src/com/android/storagemanager/automatic/
JobPreconditions.java
7
import android.os.
BatteryManager
;
43
BatteryManager
batteryManager
= (
BatteryManager
) context.getSystemService(
45
if (
batteryManager
!= null) {
46
return
batteryManager
.isCharging();
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
BatteryBroadcastReceiverTest.java
20
import android.os.
BatteryManager
;
63
mChargingIntent.putExtra(
BatteryManager
.EXTRA_LEVEL, BATTERY_INTENT_LEVEL);
64
mChargingIntent.putExtra(
BatteryManager
.EXTRA_SCALE, BATTERY_INTENT_SCALE);
65
mChargingIntent.putExtra(
BatteryManager
.EXTRA_STATUS,
66
BatteryManager
.BATTERY_STATUS_CHARGING);
BatteryHeaderPreferenceControllerTest.java
29
import android.os.
BatteryManager
;
85
mBatteryIntent.putExtra(
BatteryManager
.EXTRA_LEVEL, BATTERY_LEVEL);
86
mBatteryIntent.putExtra(
BatteryManager
.EXTRA_SCALE, 100);
/frameworks/base/services/core/java/com/android/server/
BatteryService.java
37
import android.os.
BatteryManager
;
253
if (mBatteryProps.batteryStatus ==
BatteryManager
.BATTERY_STATUS_UNKNOWN) {
256
if ((plugTypeSet &
BatteryManager
.BATTERY_PLUGGED_AC) != 0 && mBatteryProps.chargerAcOnline) {
259
if ((plugTypeSet &
BatteryManager
.BATTERY_PLUGGED_USB) != 0 && mBatteryProps.chargerUsbOnline) {
262
if ((plugTypeSet &
BatteryManager
.BATTERY_PLUGGED_WIRELESS) != 0 && mBatteryProps.chargerWirelessOnline) {
279
&& mBatteryProps.batteryStatus !=
BatteryManager
.BATTERY_STATUS_UNKNOWN
287
if (mBatteryProps.batteryLevel == 0 && !isPoweredLocked(
BatteryManager
.BATTERY_PLUGGED_ANY)) {
339
mPlugType =
BatteryManager
.BATTERY_PLUGGED_AC;
341
mPlugType =
BatteryManager
.BATTERY_PLUGGED_USB;
343
mPlugType =
BatteryManager
.BATTERY_PLUGGED_WIRELESS
[
all
...]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/jobscheduler/
ChargingConstraintTestActivity.java
12
import android.os.
BatteryManager
;
87
intentFilter.addAction(
BatteryManager
.ACTION_CHARGING);
88
intentFilter.addAction(
BatteryManager
.ACTION_DISCHARGING);
102
return batteryInfo.getBooleanExtra(
BatteryManager
.EXTRA_PRESENT, true);
108
int status = batteryStatus.getIntExtra(
BatteryManager
.EXTRA_PLUGGED, -1);
115
BatteryManager
bm = (
BatteryManager
) getSystemService(BATTERY_SERVICE);
127
if (
BatteryManager
.ACTION_CHARGING.equals(intent.getAction())) {
133
} else if (
BatteryManager
.ACTION_DISCHARGING.equals(intent.getAction())) {
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
BatteryControllerImpl.java
23
import android.os.
BatteryManager
;
115
* intent.getIntExtra(
BatteryManager
.EXTRA_LEVEL, 0)
116
/ intent.getIntExtra(
BatteryManager
.EXTRA_SCALE, 100));
117
mPluggedIn = intent.getIntExtra(
BatteryManager
.EXTRA_PLUGGED, 0) != 0;
119
final int status = intent.getIntExtra(
BatteryManager
.EXTRA_STATUS,
120
BatteryManager
.BATTERY_STATUS_UNKNOWN);
121
mCharged = status ==
BatteryManager
.BATTERY_STATUS_FULL;
122
mCharging = mCharged || status ==
BatteryManager
.BATTERY_STATUS_CHARGING;
146
dummy.putExtra("plugged", incr > 0 ?
BatteryManager
.BATTERY_PLUGGED_AC
/frameworks/base/services/core/java/com/android/server/job/controllers/
BatteryController.java
23
import android.os.
BatteryManager
;
147
filter.addAction(
BatteryManager
.ACTION_CHARGING);
148
filter.addAction(
BatteryManager
.ACTION_DISCHARGING);
155
mCharging = batteryManagerInternal.isPowered(
BatteryManager
.BATTERY_PLUGGED_ANY);
220
} else if (
BatteryManager
.ACTION_CHARGING.equals(action)) {
227
} else if (
BatteryManager
.ACTION_DISCHARGING.equals(action)) {
234
mLastBatterySeq = intent.getIntExtra(
BatteryManager
.EXTRA_SEQUENCE,
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DeviceStateMonitor.java
30
import android.os.
BatteryManager
;
80
* is going up (or the battery is fully charged). See
BatteryManager
.isCharging() for the
137
case
BatteryManager
.ACTION_CHARGING:
141
case
BatteryManager
.ACTION_DISCHARGING:
187
filter.addAction(
BatteryManager
.ACTION_CHARGING);
188
filter.addAction(
BatteryManager
.ACTION_DISCHARGING);
349
* See {@link android.os.
BatteryManager
#isPowerSaveMode
BatteryManager
.isPowerSaveMode()}.
361
* See {@link android.os.
BatteryManager
#isCharging
BatteryManager
.isCharging()}
[
all
...]
/frameworks/base/core/java/android/os/
BatteryManager.java
25
* The
BatteryManager
class contains strings and constants used for values
30
public class
BatteryManager
{
225
public
BatteryManager
() {
233
public
BatteryManager
(IBatteryStats batteryStats,
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DeviceStateMonitorTest.java
32
import android.os.
BatteryManager
;
106
Intent intent = new Intent(
BatteryManager
.ACTION_CHARGING);
114
intent = new Intent(
BatteryManager
.ACTION_DISCHARGING);
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
Utils.java
21
import android.os.
BatteryManager
;
137
int level = batteryChangedIntent.getIntExtra(
BatteryManager
.EXTRA_LEVEL, 0);
138
int scale = batteryChangedIntent.getIntExtra(
BatteryManager
.EXTRA_SCALE, 100);
143
int status = batteryChangedIntent.getIntExtra(
BatteryManager
.EXTRA_STATUS,
144
BatteryManager
.BATTERY_STATUS_UNKNOWN);
146
if (status ==
BatteryManager
.BATTERY_STATUS_CHARGING) {
148
} else if (status ==
BatteryManager
.BATTERY_STATUS_DISCHARGING) {
150
} else if (status ==
BatteryManager
.BATTERY_STATUS_NOT_CHARGING) {
152
} else if (status ==
BatteryManager
.BATTERY_STATUS_FULL) {
BatteryInfo.java
22
import android.os.
BatteryManager
;
136
info.mCharging = batteryBroadcast.getIntExtra(
BatteryManager
.EXTRA_PLUGGED, 0) != 0;
160
final int status = batteryBroadcast.getIntExtra(
BatteryManager
.EXTRA_STATUS,
161
BatteryManager
.BATTERY_STATUS_UNKNOWN);
163
if (chargeTime > 0 && status !=
BatteryManager
.BATTERY_STATUS_FULL) {
/packages/apps/Settings/src/com/android/settings/
CryptKeeperSettings.java
27
import android.os.
BatteryManager
;
63
final int level = intent.getIntExtra(
BatteryManager
.EXTRA_LEVEL, 0);
64
final int plugged = intent.getIntExtra(
BatteryManager
.EXTRA_PLUGGED, 0);
66
BatteryManager
.EXTRA_INVALID_CHARGER, 0);
70
((plugged &
BatteryManager
.BATTERY_PLUGGED_ANY) != 0) &&
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/
PowerUI.java
27
import android.os.
BatteryManager
;
60
private int mBatteryStatus =
BatteryManager
.BATTERY_STATUS_UNKNOWN;
170
mBatteryLevel = intent.getIntExtra(
BatteryManager
.EXTRA_LEVEL, 100);
172
mBatteryStatus = intent.getIntExtra(
BatteryManager
.EXTRA_STATUS,
173
BatteryManager
.BATTERY_STATUS_UNKNOWN);
175
mPlugType = intent.getIntExtra(
BatteryManager
.EXTRA_PLUGGED, 1);
177
mInvalidCharger = intent.getIntExtra(
BatteryManager
.EXTRA_INVALID_CHARGER, 0);
213
&& mBatteryStatus !=
BatteryManager
.BATTERY_STATUS_UNKNOWN
/packages/apps/Settings/src/com/android/settings/fuelgauge/
BatterySaverController.java
23
import android.os.
BatteryManager
;
153
final int status = intent.getIntExtra(
BatteryManager
.EXTRA_STATUS, -1);
155
final boolean enabled = !(status ==
BatteryManager
.BATTERY_STATUS_CHARGING
156
|| status ==
BatteryManager
.BATTERY_STATUS_FULL);
BatterySaverSettings.java
28
import android.os.
BatteryManager
;
201
final int status = intent.getIntExtra(
BatteryManager
.EXTRA_STATUS, -1);
204
!(status ==
BatteryManager
.BATTERY_STATUS_CHARGING
205
|| status ==
BatteryManager
.BATTERY_STATUS_FULL));
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
BatteryManagerFacade.java
24
import android.os.
BatteryManager
;
36
* Exposes
Batterymanager
API. Note that in order to use any of the batteryGet* functions, you need
115
Field f =
BatteryManager
.class.getField(name);
/frameworks/base/tests/BatteryWaster/src/com/android/batterywaster/
BatteryWaster.java
24
import android.os.
BatteryManager
;
173
int level = intent.getIntExtra(
BatteryManager
.EXTRA_LEVEL, -1);
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
JobPreconditionsTest.java
23
import android.os.
BatteryManager
;
51
@Mock
BatteryManager
mBatteryManager;
/packages/screensavers/WebView/src/com/android/dreams/web/
Screensaver.java
31
import android.os.
BatteryManager
;
/frameworks/base/services/core/java/com/android/server/storage/
DiskStatsLoggingService.java
28
import android.os.
BatteryManager
;
109
BatteryManager
batteryManager
=
110
(
BatteryManager
) context.getSystemService(Context.BATTERY_SERVICE);
111
if (
batteryManager
!= null) {
112
return
batteryManager
.isCharging();
Completed in 602 milliseconds
1
2
3