OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:PowerManager
(Results
1 - 25
of
237
) sorted by null
1
2
3
4
5
6
7
8
9
10
/packages/apps/DeskClock/src/com/android/deskclock/
AlarmAlertWakeLock.java
20
import android.os.
PowerManager
;
27
private static
PowerManager
.WakeLock sCpuWakeLock;
29
public static
PowerManager
.WakeLock createPartialWakeLock(Context context) {
30
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
31
return pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, LogUtils.LOGTAG);
47
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
48
sCpuWakeLock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK
49
|
PowerManager
.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE, LogUtils.LOGTAG)
[
all
...]
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
CellBroadcastAlertWakeLock.java
20
import android.os.
PowerManager
;
30
private static
PowerManager
.WakeLock sCpuWakeLock;
38
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
39
sCpuWakeLock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK
40
|
PowerManager
.ACQUIRE_CAUSES_WAKEUP |
PowerManager
.ON_AFTER_RELEASE, TAG);
/cts/tests/tests/permission/src/android/permission/cts/
DevicePowerPermissionTest.java
20
import android.os.
PowerManager
;
28
PowerManager
mPowerManager;
33
mPowerManager = (
PowerManager
) mContext.getSystemService(Context.POWER_SERVICE);
45
fail("Was able to call
PowerManager
.goToSleep without DEVICE_POWER Permission.");
NoWakeLockPermissionTest.java
24
import android.os.
PowerManager
;
32
private
PowerManager
mPowerManager;
34
private
PowerManager
.WakeLock mWakeLock;
39
mPowerManager = (
PowerManager
) mContext.getSystemService(Context.POWER_SERVICE);
40
mWakeLock = mPowerManager.newWakeLock(
PowerManager
.FULL_WAKE_LOCK, "tag");
69
mediaPlayer.setWakeMode(mContext,
PowerManager
.FULL_WAKE_LOCK);
81
* Verify that
PowerManager
.WakeLock.acquire() requires permissions.
96
* Verify that
PowerManager
.WakeLock.acquire(long) requires permissions.
/frameworks/base/services/core/jni/
com_android_server_power_PowerManagerService.h
23
#include <
powermanager
/
PowerManager
.h>
/frameworks/base/core/tests/coretests/src/android/os/
PowerManagerTest.java
25
private
PowerManager
mPm;
33
mPm = (
PowerManager
) mContext.getSystemService(Context.POWER_SERVICE);
53
PowerManager
.WakeLock wl = mPm.newWakeLock(
PowerManager
.FULL_WAKE_LOCK, "FULL_WAKE_LOCK");
56
wl = mPm.newWakeLock(
PowerManager
.SCREEN_BRIGHT_WAKE_LOCK, "SCREEN_BRIGHT_WAKE_LOCK");
59
wl = mPm.newWakeLock(
PowerManager
.SCREEN_DIM_WAKE_LOCK, "SCREEN_DIM_WAKE_LOCK");
62
wl = mPm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, "PARTIAL_WAKE_LOCK");
79
final int badFlags =
PowerManager
.SCREEN_BRIGHT_WAKE_LOCK
80
|
PowerManager
.SCREEN_DIM_WAKE_LOCK;
83
PowerManager
.WakeLock wl = mPm.newWakeLock(badFlags, "foo")
[
all
...]
/frameworks/support/v4/java/android/support/v4/content/
WakefulBroadcastReceiver.java
23
import android.os.
PowerManager
;
62
private static final SparseArray<
PowerManager
.WakeLock> mActiveWakeLocks
63
= new SparseArray<
PowerManager
.WakeLock>();
94
PowerManager
pm = (
PowerManager
)context.getSystemService(Context.POWER_SERVICE);
95
PowerManager
.WakeLock wl = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK,
118
PowerManager
.WakeLock wl = mActiveWakeLocks.get(id);
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
ShadowPowerManager.java
3
import android.os.
PowerManager
;
9
* Shadows the {@code android.os.
PowerManager
} class.
11
@Implements(
PowerManager
.class)
17
public
PowerManager
.WakeLock newWakeLock(int flags, String tag) {
18
return Robolectric.newInstanceOf(
PowerManager
.WakeLock.class);
30
@Implements(
PowerManager
.WakeLock.class)
/frameworks/base/tests/utils/SleepUtils/AlarmService/src/com/android/testing/alarmservice/
WakeUpController.java
20
import android.os.
PowerManager
;
21
import android.os.
PowerManager
.WakeLock;
48
PowerManager
pm =
49
(
PowerManager
) AlarmService.sContext.getSystemService(Context.POWER_SERVICE);
50
mWakeLock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, "testing-alarmservice");
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
WakeLockHoldingProgressListener.java
21
import android.os.
PowerManager
;
28
private
PowerManager
.WakeLock mWakeLock;
36
PowerManager
pm =
37
(
PowerManager
) ((Activity) mActivity).getSystemService(Context.POWER_SERVICE);
38
mWakeLock = pm.newWakeLock(
PowerManager
.SCREEN_DIM_WAKE_LOCK, label);
/frameworks/opt/net/voip/src/java/com/android/server/sip/
SipWakeLock.java
19
import android.os.
PowerManager
;
27
private
PowerManager
mPowerManager;
28
private
PowerManager
.WakeLock mWakeLock;
29
private
PowerManager
.WakeLock mTimerWakeLock;
32
SipWakeLock(
PowerManager
powerManager
) {
33
mPowerManager =
powerManager
;
45
PowerManager
.PARTIAL_WAKE_LOCK, "SipWakeLock.timer");
55
PowerManager
.PARTIAL_WAKE_LOCK, "SipWakeLock");
/packages/services/Telecomm/src/com/android/server/telecom/
ProximitySensorManager.java
20
import android.os.
PowerManager
;
28
private final
PowerManager
.WakeLock mProximityWakeLock;
32
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
34
if (pm.isWakeLockLevelSupported(
PowerManager
.PROXIMITY_SCREEN_OFF_WAKE_LOCK)) {
36
PowerManager
.PROXIMITY_SCREEN_OFF_WAKE_LOCK, TAG);
85
(screenOnImmediately ? 0 :
PowerManager
.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY);
InCallWakeLockController.java
22
import android.os.
PowerManager
;
33
private final
PowerManager
.WakeLock mFullWakeLock;
41
PowerManager
powerManager
= (
PowerManager
) mContext.getSystemService(Context.POWER_SERVICE);
42
mFullWakeLock =
powerManager
.newWakeLock(
PowerManager
.FULL_WAKE_LOCK, TAG);
/packages/apps/Nfc/src/com/android/nfc/
ScreenStateHelper.java
5
import android.os.
PowerManager
;
17
private final
PowerManager
mPowerManager;
23
mPowerManager = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
/frameworks/base/tests/StatusBar/src/com/android/statusbartest/
PowerTest.java
26
import android.os.
PowerManager
;
35
PowerManager
mPm;
36
PowerManager
.WakeLock mProx;
46
mPm = (
PowerManager
)getSystemService("power");
47
mProx = mPm.newWakeLock(
PowerManager
.PROXIMITY_SCREEN_OFF_WAKE_LOCK, "PowerTest-prox");
82
mProx.release(
PowerManager
.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY);
103
mProx.release(
PowerManager
.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY);
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/
WakeLockOperation.java
21
import android.os.
PowerManager
;
22
import android.os.
PowerManager
.WakeLock;
56
this(operation, context,
PowerManager
.PARTIAL_WAKE_LOCK);
64
PowerManager
pm = (
PowerManager
) mContext.getSystemService(Context.POWER_SERVICE);
AlarmOperation.java
26
import android.os.
PowerManager
;
27
import android.os.
PowerManager
.WakeLock;
122
PowerManager
pm = (
PowerManager
) mContext.getSystemService(Context.POWER_SERVICE);
123
mWakeLock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, WAKE_LOCK_TAG);
/cts/tests/tests/os/src/android/os/cts/
PowerManagerTest.java
20
import android.os.
PowerManager
;
22
import android.os.
PowerManager
.WakeLock;
37
PowerManager
pm = (
PowerManager
)getContext().getSystemService(Context.POWER_SERVICE);
39
WakeLock wl = pm.newWakeLock(
PowerManager
.SCREEN_BRIGHT_WAKE_LOCK, TAG);
PowerManager_WakeLockTest.java
20
import android.os.
PowerManager
;
21
import android.os.
PowerManager
.WakeLock;
34
PowerManager
pm = (
PowerManager
) getContext().getSystemService(Context.POWER_SERVICE);
35
WakeLock wl = pm.newWakeLock(
PowerManager
.SCREEN_BRIGHT_WAKE_LOCK, TAG);
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
CalendarReceiver.java
23
import android.os.
PowerManager
;
40
private
PowerManager
.WakeLock mWakeLock;
45
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
46
mWakeLock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, "CalendarReceiver_Provider");
/cts/tests/tests/voicesettings/src/android/voicesettings/cts/
BatterySaverModeTest.java
20
import android.os.
PowerManager
;
72
PowerManager
powerManager
= (
PowerManager
)mContext.getSystemService(Context.POWER_SERVICE);
73
return
powerManager
.isPowerSaveMode();
/frameworks/base/cmds/uiautomator/instrumentation/testrunner-src/com/android/uiautomator/core/
InstrumentationUiAutomatorBridge.java
22
import android.os.
PowerManager
;
52
PowerManager
pm = (
PowerManager
)
/packages/apps/Settings/src/com/android/settings/fuelgauge/
BatterySaverModeVoiceActivity.java
23
import android.os.
PowerManager
;
29
* Activity for modifying the {@link android.os.
PowerManager
} power save mode
38
PowerManager
powerManager
= (
PowerManager
) getSystemService(Context.POWER_SERVICE);
39
if (
powerManager
.setPowerSaveMode(
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
PowerManagerTest.java
14
import android.os.
PowerManager
;
19
PowerManager
powerManager
;
24
powerManager
= (
PowerManager
) Robolectric.application.getSystemService(Context.POWER_SERVICE);
25
shadowPowerManager = Robolectric.shadowOf(
powerManager
);
30
assertTrue(
powerManager
.isScreenOn());
32
assertFalse(
powerManager
.isScreenOn());
37
assertNotNull(
powerManager
.newWakeLock(0, "TAG"));
42
PowerManager
.WakeLock lock = powerManager.newWakeLock(0, "TAG")
[
all
...]
/cts/tests/tests/mediastress/src/android/mediastress/cts/
MediaFrameworkTest.java
25
import android.os.
PowerManager
;
36
private
PowerManager
.WakeLock mWakeLock = null;
51
PowerManager
pm = (
PowerManager
) this.getSystemService(Context.POWER_SERVICE);
52
mWakeLock = pm.newWakeLock(
PowerManager
.FULL_WAKE_LOCK, "MediaFrameworkTest");
Completed in 1004 milliseconds
1
2
3
4
5
6
7
8
9
10