Home
last modified time | relevance | path

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

12

/frameworks/base/core/java/android/os/
DPowerManagerInternal.java59 public static String wakefulnessToString(int wakefulness) { in wakefulnessToString() argument
60 switch (wakefulness) { in wakefulnessToString()
70 return Integer.toString(wakefulness); in wakefulnessToString()
77 public static int wakefulnessToProtoEnum(int wakefulness) { in wakefulnessToProtoEnum() argument
78 switch (wakefulness) { in wakefulnessToProtoEnum()
88 return wakefulness; in wakefulnessToProtoEnum()
96 public static boolean isInteractive(int wakefulness) { in isInteractive() argument
97 return wakefulness == WAKEFULNESS_AWAKE || wakefulness == WAKEFULNESS_DREAMING; in isInteractive()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/domain/interactor/
DPowerInteractorTest.kt194 assertTrue(repository.wakefulness.value.powerButtonLaunchGestureTriggered) in onStartedGoingToSleep_clearsPowerButtonLaunchGestureTriggered()
198 assertTrue(repository.wakefulness.value.powerButtonLaunchGestureTriggered) in onStartedGoingToSleep_clearsPowerButtonLaunchGestureTriggered()
202 assertFalse(repository.wakefulness.value.powerButtonLaunchGestureTriggered) in onStartedGoingToSleep_clearsPowerButtonLaunchGestureTriggered()
214 assertEquals(WakefulnessState.AWAKE, repository.wakefulness.value.internalWakefulnessState) in onCameraLaunchGestureDetected_maintainsAllOtherState()
215 assertEquals(WakeSleepReason.POWER_BUTTON, repository.wakefulness.value.lastWakeReason) in onCameraLaunchGestureDetected_maintainsAllOtherState()
216 assertTrue(repository.wakefulness.value.powerButtonLaunchGestureTriggered) in onCameraLaunchGestureDetected_maintainsAllOtherState()
231 assertEquals(WakefulnessState.AWAKE, repository.wakefulness.value.internalWakefulnessState) in onCameraLaunchGestureDetected_stillTrue_ifGestureNotDetectedOnWakingUp()
232 assertEquals(WakeSleepReason.POWER_BUTTON, repository.wakefulness.value.lastWakeReason) in onCameraLaunchGestureDetected_stillTrue_ifGestureNotDetectedOnWakingUp()
233 assertTrue(repository.wakefulness.value.powerButtonLaunchGestureTriggered) in onCameraLaunchGestureDetected_stillTrue_ifGestureNotDetectedOnWakingUp()
247 assertEquals(WakefulnessState.AWAKE, repository.wakefulness.value.internalWakefulnessState) in cameraLaunchDetectedOnGoingToSleep_stillTrue_ifGestureNotDetectedOnWakingUp()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/data/repository/
DPowerRepository.kt53 val wakefulness: StateFlow<WakefulnessModel> constant
82 rawState: WakefulnessState = wakefulness.value.internalWakefulnessState, in wakeUp()
83 lastWakeReason: WakeSleepReason = wakefulness.value.lastWakeReason, in wakeUp()
84 lastSleepReason: WakeSleepReason = wakefulness.value.lastSleepReason, in wakeUp()
86 wakefulness.value.powerButtonLaunchGestureTriggered, in wakeUp()
128 override val wakefulness = _wakefulness.asStateFlow() in wakeUp() constant
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/domain/interactor/
DPowerInteractor.kt56 val detailedWakefulness = repository.wakefulness in <lambda>()
63 repository.wakefulness in <lambda>()
104 if (repository.wakefulness.value.isAsleep() || statusBarStateController.isDozing) { in <lambda>()
144 repository.wakefulness.value.powerButtonLaunchGestureTriggered in <lambda>()
196 repository.wakefulness.value.powerButtonLaunchGestureTriggered in <lambda>()
/frameworks/base/services/core/java/com/android/server/power/
DPowerGroup.java87 DisplayManagerInternal displayManagerInternal, int wakefulness, boolean ready, in PowerGroup() argument
93 mWakefulness = wakefulness; in PowerGroup()
100 PowerGroup(int wakefulness, PowerGroupListener wakefulnessListener, Notifier notifier, in PowerGroup() argument
106 mWakefulness = wakefulness; in PowerGroup()
400 final int wakefulness = getWakefulnessLocked(); in getDesiredScreenPolicyLocked() local
402 if (wakefulness == WAKEFULNESS_ASLEEP || quiescent) { in getDesiredScreenPolicyLocked()
404 } else if (wakefulness == WAKEFULNESS_DOZING) { in getDesiredScreenPolicyLocked()
491 void onWakefulnessChangedLocked(int groupId, int wakefulness, long eventTime, int reason, in onWakefulnessChangedLocked() argument
DWakefulnessSessionObserver.java197 public void onWakefulnessChangeStarted(int powerGroupId, int wakefulness, int changeReason, in onWakefulnessChangeStarted() argument
202 mPowerGroups.get(powerGroupId).onWakefulnessChangeStarted(wakefulness, changeReason, in onWakefulnessChangeStarted()
323 public void onWakefulnessChangeStarted(int wakefulness, int changeReason, long eventTime) { in onWakefulnessChangeStarted() argument
324 mCurrentWakefulness = wakefulness; in onWakefulnessChangeStarted()
325 if (mIsInteractive == isInteractive(wakefulness)) { in onWakefulnessChangeStarted()
329 mIsInteractive = isInteractive(wakefulness); in onWakefulnessChangeStarted()
DAttentionDetector.java281 public void onWakefulnessChangeStarted(int wakefulness) { in onWakefulnessChangeStarted() argument
282 mWakefulness = wakefulness; in onWakefulnessChangeStarted()
283 if (wakefulness != PowerManagerInternal.WAKEFULNESS_AWAKE) { in onWakefulnessChangeStarted()
DNotifier.java478 public void onGlobalWakefulnessChangeStarted(final int wakefulness, int reason, in onGlobalWakefulnessChangeStarted() argument
480 final boolean interactive = PowerManagerInternal.isInteractive(wakefulness); in onGlobalWakefulnessChangeStarted()
482 Slog.d(TAG, "onWakefulnessChangeStarted: wakefulness=" + wakefulness in onGlobalWakefulnessChangeStarted()
491 mActivityManagerInternal.onWakefulnessChanged(wakefulness); in onGlobalWakefulnessChangeStarted()
674 public void onGroupWakefulnessChangeStarted(int groupId, int wakefulness, int changeReason, in onGroupWakefulnessChangeStarted() argument
676 final boolean isInteractive = PowerManagerInternal.isInteractive(wakefulness); in onGroupWakefulnessChangeStarted()
697 mWakefulnessSessionObserver.onWakefulnessChangeStarted(groupId, wakefulness, in onGroupWakefulnessChangeStarted()
DPowerManagerService.java735 public void onWakefulnessChangedLocked(int groupId, int wakefulness, long eventTime, in onWakefulnessChangedLocked() argument
739 if (wakefulness == WAKEFULNESS_AWAKE) { in onWakefulnessChangedLocked()
751 mScreenTimeoutOverridePolicy.onWakefulnessChange(mWakeLockSummary, wakefulness); in onWakefulnessChangedLocked()
755 mNotifier.onGroupWakefulnessChangeStarted(groupId, wakefulness, reason, eventTime); in onWakefulnessChangedLocked()
2153 final int wakefulness = powerGroup.getWakefulnessLocked();
2154 if (wakefulness == WAKEFULNESS_ASLEEP
2155 || wakefulness == WAKEFULNESS_DOZING
2258 void setWakefulnessLocked(int groupId, int wakefulness, long eventTime, int uid, int reason,
2260 mPowerGroups.get(groupId).setWakefulnessLocked(wakefulness, eventTime, uid, reason, opUid,
2406 final int wakefulness = mPowerGroups.valueAt(i).getWakefulnessLocked();
[all …]
/frameworks/base/tests/JankBench/scripts/
Dadbutil.py34 wakefulness = re.search('mWakefulness=([a-zA-Z]+)', output)
35 if wakefulness.group(1) != "Awake":
/frameworks/base/packages/SystemUI/src/com/android/systemui/scene/domain/startable/
DSceneContainerStartable.kt390 powerInteractor.detailedWakefulness.collect { wakefulness -> in <lambda>() method
393 if (wakefulness.isAsleep()) return@collect in <lambda>()
394 if (!wakefulness.powerButtonLaunchGestureTriggered) return@collect in <lambda>()
395 if (wakefulness.lastSleepReason != WakeSleepReason.POWER_BUTTON) return@collect in <lambda>()
550 .collect { wakefulness -> in <lambda>() method
552 wakefulness.isAwakeFromTouch() -> falsingCollector.onScreenOnFromTouch() in <lambda>()
553 wakefulness.isAwake() -> falsingCollector.onScreenTurningOn() in <lambda>()
554 wakefulness.isAsleep() -> falsingCollector.onScreenOff() in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/
DShadeViewController.kt112 fun getFalsingThresholdFactor(wakefulness: WakefulnessModel): Float { in startExpandLatencyTracking()
113 return if (wakefulness.isAwakeFromTapOrGesture()) 1.5f else 1.0f in startExpandLatencyTracking()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DWakefulnessLifecycle.java197 private void setWakefulness(@Wakefulness int wakefulness) { in setWakefulness() argument
198 mWakefulness = wakefulness; in setWakefulness()
199 Trace.traceCounter(Trace.TRACE_TAG_APP, "wakefulness", wakefulness); in setWakefulness()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/domain/interactor/
DStatusBarKeyguardViewManagerInteractor.kt60 .map { (startedStep, wakefulness) -> in <lambda>() method
64 wakefulness.powerButtonLaunchGestureTriggered in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/
DKeyguardOcclusionInteractor.kt97 .map { (wakefulness, currentKeyguardState) -> in <lambda>() method
98 wakefulness.powerButtonLaunchGestureTriggered && in <lambda>()
DFromAodTransitionInteractor.kt92 .filterRelevantKeyguardStateAnd { wakefulness -> wakefulness.isAwake() } in <lambda>() method
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeMachine.java429 @Wakefulness int wakefulness = mWakefulnessLifecycle.getWakefulness(); in resolveIntermediateState() local
430 if (state != State.INITIALIZED && (wakefulness == WAKEFULNESS_AWAKE in resolveIntermediateState()
431 || wakefulness == WAKEFULNESS_WAKING)) { in resolveIntermediateState()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/power/data/repository/
DFakePowerRepository.kt39 override val wakefulness = _wakefulness.asStateFlow() constant in com.android.systemui.power.data.repository.FakePowerRepository
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/
DLightRevealScrimRepository.kt119 powerRepository.wakefulness.flatMapLatest { wakefulnessModel -> in wakefulnessModel()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/repository/
DLightRevealScrimRepositoryTest.kt82 powerRepository.wakefulness.value.powerButtonLaunchGestureTriggered, in <lambda>()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/
DLegacyActivityStarterInternalImplTest.kt257 whenever(wakefulnessLifecycle.wakefulness) in dismissKeyguardThenExecute_startWakeAndUnlock()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DVolumeDialogControllerImpl.java505 int wakefulness = mWakefulnessLifecycle.getWakefulness(); in shouldShowUI() local
506 return wakefulness != WakefulnessLifecycle.WAKEFULNESS_ASLEEP in shouldShowUI()
507 && wakefulness != WakefulnessLifecycle.WAKEFULNESS_GOING_TO_SLEEP in shouldShowUI()
/frameworks/base/services/core/java/com/android/server/wm/
DActivityTaskManagerInternal.java534 int wakefulness); in dumpForProcesses() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DLegacyActivityStarterInternalImpl.kt420 wakefulnessLifecycle.wakefulness == WakefulnessLifecycle.WAKEFULNESS_ASLEEP && in <lambda>()
/frameworks/base/core/java/android/app/
DActivityManagerInternal.java133 public abstract void onWakefulnessChanged(int wakefulness); in onWakefulnessChanged() argument

12