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
320
) sorted by null
1
2
3
4
5
6
7
8
9
10
11
>>
/packages/apps/DeskClock/src/com/android/deskclock/
AlarmAlertWakeLock.java
20
import android.os.
PowerManager
;
29
private static
PowerManager
.WakeLock sCpuWakeLock;
31
public static
PowerManager
.WakeLock createPartialWakeLock(Context context) {
32
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
33
return pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, TAG);
49
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
50
sCpuWakeLock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK
51
|
PowerManager
.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE, TAG)
[
all
...]
/packages/apps/Settings/src/com/android/settings/display/
PowerManagerWrapper.java
19
import android.os.
PowerManager
;
22
* This class replicates a subset of the android.os.
PowerManager
. The class exists so that we can
23
* use a thin wrapper around the
PowerManager
in production code and a mock in tests. We cannot
24
* directly mock or shadow the
PowerManager
, because some of the methods we rely on are newer than
28
private final
PowerManager
mPowerManager;
30
public PowerManagerWrapper(
PowerManager
powerManager
) {
31
mPowerManager =
powerManager
;
/frameworks/support/wear/tests/src/android/support/wear/widget/util/
WakeLockRule.java
20
import android.os.
PowerManager
;
21
import android.os.
PowerManager
.WakeLock;
34
PowerManager
.FULL_WAKE_LOCK |
PowerManager
.ACQUIRE_CAUSES_WAKEUP;
54
PowerManager
power = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
/cts/hostsidetests/sustainedperf/app/src/android/test/app/
DeviceTestActivity.java
22
import android.os.
PowerManager
;
31
PowerManager
pm = (
PowerManager
) getSystemService(Context.POWER_SERVICE);
/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>
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
CellBroadcastAlertWakeLock.java
20
import android.os.
PowerManager
;
21
import android.os.
PowerManager
.WakeLock;
47
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
48
sPartialWakeLock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, TAG);
73
PowerManager
pm = (
PowerManager
) context.getSystemService(Context.POWER_SERVICE);
75
PowerManager
.SCREEN_BRIGHT_WAKE_LOCK |
PowerManager
.ON_AFTER_RELEASE, TAG);
/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
...]
/cts/tests/tests/os/src/android/os/cts/
PowerManager_WakeLockTest.java
20
import android.os.
PowerManager
;
21
import android.os.
PowerManager
.WakeLock;
35
PowerManager
pm = (
PowerManager
) getContext().getSystemService(Context.POWER_SERVICE);
36
WakeLock wl = pm.newWakeLock(
PowerManager
.SCREEN_BRIGHT_WAKE_LOCK, TAG);
72
final
PowerManager
pm = getContext().getSystemService(
PowerManager
.class);
74
final WakeLock lock = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, TAG);
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);
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/
BatteryStatsWakeLockTests.java
19
import android.os.
PowerManager
;
35
PowerManager
.WakeLock wl = mPowerManager.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK,
44
PowerManager
.WakeLock wl = mPowerManager.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK,
BatteryStatsDeviceTestBase.java
21
import android.os.
PowerManager
;
41
protected
PowerManager
mPowerManager;
46
mPowerManager = mContext.getSystemService(
PowerManager
.class);
/external/robolectric/v1/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/packages/SystemUI/src/com/android/systemui/util/wakelock/
WakeLock.java
20
import android.os.
PowerManager
;
26
/** @see android.os.
PowerManager
.WakeLock#acquire() */
29
/** @see android.os.
PowerManager
.WakeLock#release() */
32
/** @see android.os.
PowerManager
.WakeLock#wrap(Runnable) */
40
static
PowerManager
.WakeLock createPartialInner(Context context, String tag) {
41
return context.getSystemService(
PowerManager
.class)
42
.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK, tag);
56
static WakeLock wrap(final
PowerManager
.WakeLock inner) {
58
/** @see
PowerManager
.WakeLock#acquire() */
63
/** @see
PowerManager
.WakeLock#release() *
[
all
...]
/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");
/frameworks/support/core-utils/java/android/support/v4/content/
WakefulBroadcastReceiver.java
23
import android.os.
PowerManager
;
73
private static final SparseArray<
PowerManager
.WakeLock> sActiveWakeLocks = new SparseArray<>();
104
PowerManager
pm = (
PowerManager
)context.getSystemService(Context.POWER_SERVICE);
105
PowerManager
.WakeLock wl = pm.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK,
128
PowerManager
.WakeLock wl = sActiveWakeLocks.get(id);
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
WakeLockFacade.java
20
import android.os.
PowerManager
;
21
import android.os.
PowerManager
.WakeLock;
31
* A facade exposing some of the functionality of the
PowerManager
, in particular wake locks.
38
private final
PowerManager
mmPowerManager;
47
public WakeLockManager(
PowerManager
mmPowerManager) {
48
addWakeLock(WakeLockType.PARTIAL,
PowerManager
.PARTIAL_WAKE_LOCK);
49
addWakeLock(WakeLockType.FULL,
PowerManager
.FULL_WAKE_LOCK
50
|
PowerManager
.ON_AFTER_RELEASE);
51
addWakeLock(WakeLockType.BRIGHT,
PowerManager
.SCREEN_BRIGHT_WAKE_LOCK
52
|
PowerManager
.ON_AFTER_RELEASE)
[
all
...]
/tools/tradefederation/core/util-apps/DeviceSetupUtil/src/com/android/tradefed/utils/
DeviceSetupService.java
26
import android.os.
PowerManager
;
35
PowerManager
.WakeLock wl;
57
PowerManager
pm = (
PowerManager
) getSystemService(Context.POWER_SERVICE);
59
PowerManager
.SCREEN_DIM_WAKE_LOCK |
PowerManager
.ACQUIRE_CAUSES_WAKEUP,
/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/sensor/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);
/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");
/packages/services/Telecomm/src/com/android/server/telecom/components/
UserCallActivity.java
26
import android.os.
PowerManager
;
56
PowerManager
powerManager
= (
PowerManager
) getSystemService(POWER_SERVICE);
57
PowerManager
.WakeLock wakelock =
powerManager
.newWakeLock(
PowerManager
.PARTIAL_WAKE_LOCK,
Completed in 3936 milliseconds
1
2
3
4
5
6
7
8
9
10
11
>>