Home
last modified time | relevance | path

Searched refs:alarm (Results 1 – 25 of 72) sorted by relevance

123

/frameworks/base/apex/jobscheduler/service/java/com/android/server/alarm/
DAlarmManagerService.java17 package com.android.server.alarm;
49 import static com.android.server.alarm.Alarm.APP_STANDBY_POLICY_INDEX;
50 import static com.android.server.alarm.Alarm.BATTERY_SAVER_POLICY_INDEX;
51 import static com.android.server.alarm.Alarm.DEVICE_IDLE_POLICY_INDEX;
52 import static com.android.server.alarm.Alarm.EXACT_ALLOW_REASON_ALLOW_LIST;
53 import static com.android.server.alarm.Alarm.EXACT_ALLOW_REASON_COMPAT;
54 import static com.android.server.alarm.Alarm.EXACT_ALLOW_REASON_LISTENER;
55 import static com.android.server.alarm.Alarm.EXACT_ALLOW_REASON_NOT_APPLICABLE;
56 import static com.android.server.alarm.Alarm.EXACT_ALLOW_REASON_PERMISSION;
57 import static com.android.server.alarm.Alarm.EXACT_ALLOW_REASON_POLICY_PERMISSION;
[all …]
DLazyAlarmStore.java17 package com.android.server.alarm;
19 import static com.android.server.alarm.AlarmManagerService.dumpAlarmList;
20 import static com.android.server.alarm.AlarmManagerService.isTimeTickAlarm;
110 final Alarm alarm = mAlarms.get(i); in getNextWakeFromIdleAlarm() local
111 if ((alarm.flags & AlarmManager.FLAG_WAKE_FROM_IDLE) != 0) { in getNextWakeFromIdleAlarm()
112 return alarm; in getNextWakeFromIdleAlarm()
178 final Alarm alarm = mAlarms.get(i); in removePendingAlarms() local
179 if (alarm.getWhenElapsed() > nowElapsed) { in removePendingAlarms()
183 pending.add(alarm); in removePendingAlarms()
184 if (alarm.wakeup && alarm.getMaxWhenElapsed() <= nowElapsed + ALARM_DEADLINE_SLOP) { in removePendingAlarms()
[all …]
DTEST_MAPPING7 "include-filter": "com.android.server.alarm"
/frameworks/base/tests/utils/testutils/java/android/app/test/
DTestAlarmManager.java69 PendingAlarm alarm = mPendingAlarms.get(i); in dispatch() local
70 if (Objects.equals(tag, alarm.getTag())) { in dispatch()
72 alarm.dispatch(); in dispatch()
84 PendingAlarm alarm = mPendingAlarms.get(i); in isPending() local
85 if (Objects.equals(tag, alarm.getTag())) { in isPending()
98 PendingAlarm alarm = mPendingAlarms.get(i); in getTriggerTimeMillis() local
99 if (Objects.equals(tag, alarm.getTag())) { in getTriggerTimeMillis()
100 return alarm.getTriggerTimeMillis(); in getTriggerTimeMillis()
150 PendingAlarm alarm = alarmItr.next(); in answer() local
151 if (alarm.getCallback() instanceof AlarmListenerRunnable) { in answer()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/
DFakeAlarmHelper.java47 mAlarms.removeIf(alarm -> alarm.listener == listener); in cancel()
53 Alarm alarm = it.next(); in incrementAlarmTime() local
54 alarm.delayMs -= incrementMs; in incrementAlarmTime()
55 if (alarm.delayMs <= 0) { in incrementAlarmTime()
57 alarm.listener.onAlarm(); in incrementAlarmTime()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DLockSettingsStrongAuthTest.java100 NonStrongBiometricIdleTimeoutAlarmListener alarm = mStrongAuth in testScheduleNonStrongBiometricIdleTimeout() local
103 assertNotNull(alarm); in testScheduleNonStrongBiometricIdleTimeout()
105 verifyAlarm(nextAlarmTime, NON_STRONG_BIOMETRIC_IDLE_TIMEOUT_ALARM_TAG, alarm); in testScheduleNonStrongBiometricIdleTimeout()
126 NonStrongBiometricTimeoutAlarmListener alarm = in testReportSuccessfulBiometricUnlock_nonStrongBiometric_fallbackTimeout() local
129 assertNotNull(alarm); in testReportSuccessfulBiometricUnlock_nonStrongBiometric_fallbackTimeout()
131 verifyAlarm(nextAlarmTime, NON_STRONG_BIOMETRIC_TIMEOUT_ALARM_TAG, alarm); in testReportSuccessfulBiometricUnlock_nonStrongBiometric_fallbackTimeout()
180 StrongAuthTimeoutAlarmListener alarm = in testReportSuccessfulStrongAuthUnlock_schedulePrimaryAuthTimeout() local
183 assertNotNull(alarm); in testReportSuccessfulStrongAuthUnlock_schedulePrimaryAuthTimeout()
185 verifyAlarm(nextAlarmTime, STRONG_AUTH_TIMEOUT_ALARM_TAG, alarm); in testReportSuccessfulStrongAuthUnlock_schedulePrimaryAuthTimeout()
198 StrongAuthTimeoutAlarmListener alarm = in testReportSuccessfulStrongAuthUnlock_testRefreshStrongAuthTimeout() local
[all …]
/frameworks/base/services/core/java/com/android/server/locksettings/
DLockSettingsStrongAuth.java255 StrongAuthTimeoutAlarmListener alarm = mStrongAuthTimeoutAlarmListenerForUser.get(userId); in rescheduleStrongAuthTimeoutAlarm() local
256 if (alarm != null) { in rescheduleStrongAuthTimeoutAlarm()
257 mAlarmManager.cancel(alarm); in rescheduleStrongAuthTimeoutAlarm()
258 alarm.setLatestStrongAuthTime(strongAuthTime); in rescheduleStrongAuthTimeoutAlarm()
260 alarm = new StrongAuthTimeoutAlarmListener(strongAuthTime, userId); in rescheduleStrongAuthTimeoutAlarm()
261 mStrongAuthTimeoutAlarmListenerForUser.put(userId, alarm); in rescheduleStrongAuthTimeoutAlarm()
269 STRONG_AUTH_TIMEOUT_ALARM_TAG, alarm, mHandler); in rescheduleStrongAuthTimeoutAlarm()
285 StrongAuthTimeoutAlarmListener alarm = mStrongAuthTimeoutAlarmListenerForUser.get(userId); in handleRefreshStrongAuthTimeout() local
286 if (alarm != null) { in handleRefreshStrongAuthTimeout()
287 rescheduleStrongAuthTimeoutAlarm(alarm.getLatestStrongAuthTime(), userId); in handleRefreshStrongAuthTimeout()
[all …]
/frameworks/base/core/proto/android/server/alarm/
Dalarmmanagerservice.proto26 package com.android.server.alarm;
54 // Can be negative if the non-wakeup alarm time is in the past (non-wakeup
83 // This is a special alarm that will put the system into idle until it goes
123 // alarm, used to determine the earliest we can dispatch the next such alarm.
151 // This is a soft wrapper for alarm clock information. It is not representative
169 // How long until the alarm goes off, in the 'elapsed' timebase. Can be
214 // Minimum futurity of a new alarm.
216 // Minimum alarm recurrence interval.
218 // Direct alarm listener callback timeout.
226 // Maximum alarm recurrence interval.
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/alarm/
DAlarmTest.java17 package com.android.server.alarm;
27 import static com.android.server.alarm.Alarm.APP_STANDBY_POLICY_INDEX;
28 import static com.android.server.alarm.Alarm.NUM_POLICIES;
29 import static com.android.server.alarm.Alarm.REQUESTER_POLICY_INDEX;
30 import static com.android.server.alarm.AlarmManagerService.isExemptFromAppStandby;
31 import static com.android.server.alarm.Constants.TEST_CALLING_PACKAGE;
32 import static com.android.server.alarm.Constants.TEST_CALLING_UID;
DBackgroundRestrictedAlarmsTest.java16 package com.android.server.alarm;
86 alarmsToDeliver, alarm -> alarm.type == RTC_WAKEUP); in runCheckAllPendingAlarms()
DConstants.java17 package com.android.server.alarm;
/frameworks/base/apex/jobscheduler/service/aconfig/
DAndroid.bp36 package: "com.android.server.alarm",
38 srcs: ["alarm.aconfig"],
42 name: "service-jobscheduler-alarm.flags-aconfig-java",
/frameworks/base/services/core/java/com/android/server/utils/
DAlarmQueue.java314 final Pair<K, Long> alarm = mAlarmPriorityQueue.peek(); in setNextAlarmLocked() local
315 final long nextTriggerTimeElapsed = Math.max(earliestTriggerElapsed, alarm.second); in setNextAlarmLocked()
329 + " for key " + alarm.first); in setNextAlarmLocked()
343 final Pair<K, Long> alarm = mAlarmPriorityQueue.peek(); in onAlarm() local
344 if (alarm.second <= nowElapsed) { in onAlarm()
345 expired.add(alarm.first); in onAlarm()
346 mAlarmPriorityQueue.remove(alarm); in onAlarm()
/frameworks/base/core/java/android/service/notification/
DScheduleCalendar.java143 public boolean isAlarmInSchedule(long alarm, long now) { in isAlarmInSchedule() argument
145 final long start = getClosestActualTime(alarm, mSchedule.startHour, mSchedule.startMinute); in isAlarmInSchedule()
146 long end = getTime(alarm, mSchedule.endHour, mSchedule.endMinute); in isAlarmInSchedule()
150 return (isInSchedule(-1, alarm, start, end) in isAlarmInSchedule()
152 || (isInSchedule(0, alarm, start, end) in isAlarmInSchedule()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DScheduleCalendarTest.java776 Calendar alarm = getDaylightSavingsForwardDay(); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings() local
777 alarm.set(Calendar.HOUR_OF_DAY, 23); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
778 alarm.set(Calendar.MINUTE, 15); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
779 alarm.set(Calendar.SECOND, 0); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
780 alarm.set(Calendar.MILLISECOND, 0); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
801 assertTrue(mScheduleCalendar.isInSchedule(alarm.getTimeInMillis())); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
803 assertTrue(mScheduleCalendar.isAlarmInSchedule(alarm.getTimeInMillis(), in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
809 Calendar alarm = new GregorianCalendar(); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger() local
810 alarm.set(Calendar.HOUR_OF_DAY, 23); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger()
811 alarm.set(Calendar.MINUTE, 15); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger()
[all …]
/frameworks/base/services/core/java/com/android/server/trust/
DTrustManagerService.java435 TrustedTimeoutAlarmListener alarm = mTrustTimeoutAlarmListenerForUser.get(userId); in handleScheduleTrustedTimeout() local
438 if (alarm != null) { in handleScheduleTrustedTimeout()
439 if (!shouldOverride && alarm.isQueued()) { in handleScheduleTrustedTimeout()
443 mAlarmManager.cancel(alarm); in handleScheduleTrustedTimeout()
445 alarm = new TrustedTimeoutAlarmListener(userId); in handleScheduleTrustedTimeout()
446 mTrustTimeoutAlarmListenerForUser.put(userId, alarm); in handleScheduleTrustedTimeout()
452 alarm.setQueued(true /* isQueued */); in handleScheduleTrustedTimeout()
454 AlarmManager.ELAPSED_REALTIME_WAKEUP, when, TRUST_TIMEOUT_ALARM_TAG, alarm, in handleScheduleTrustedTimeout()
473 TrustableTimeoutAlarmListener alarm = mIdleTrustableTimeoutAlarmListenerForUser.get(userId); in setUpIdleTimeout() local
477 if (alarm != null) { in setUpIdleTimeout()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DCountdownConditionProvider.java159 final boolean alarm = ZenModeConfig.isValidCountdownToAlarmConditionId(conditionId); in onReceive()
163 notifyCondition(newCondition(time, alarm, Condition.STATE_FALSE)); in onReceive()
169 private static final Condition newCondition(long time, boolean alarm, int state) { in newCondition() argument
170 return new Condition(ZenModeConfig.toCountdownConditionId(time, alarm), in newCondition()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/alarm/domain/interactor/
DAlarmTileUserActionInteractor.kt17 package com.android.systemui.qs.tiles.impl.alarm.domain.interactor
24 import com.android.systemui.qs.tiles.impl.alarm.domain.model.AlarmTileModel
DAlarmTileDataInteractor.kt17 package com.android.systemui.qs.tiles.impl.alarm.domain.interactor
23 import com.android.systemui.qs.tiles.impl.alarm.domain.model.AlarmTileModel
/frameworks/base/packages/SystemUI/src/com/android/systemui/ambient/statusbar/ui/
DAmbientStatusBarViewController.java262 final AlarmManager.AlarmClockInfo alarm = in updateAlarmStatusIcon() local
264 final boolean hasAlarm = alarm != null && alarm.getTriggerTime() > 0; in updateAlarmStatusIcon()
268 hasAlarm ? buildAlarmContentDescription(alarm) : null); in updateAlarmStatusIcon()
288 private String buildAlarmContentDescription(AlarmManager.AlarmClockInfo alarm) { in buildAlarmContentDescription() argument
291 final String dateString = DateFormat.format(pattern, alarm.getTriggerTime()).toString(); in buildAlarmContentDescription()
/frameworks/av/services/audiopolicy/engineconfigurable/parameter-framework/examples/Settings/
Dvolumes.pfw8 /Policy/policy/streams/alarm/applicable_volume_profile/volume_profile = alarm
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/alarm/domain/interactor/
DAlarmTileUserActionInteractorTest.kt17 package com.android.systemui.qs.tiles.impl.alarm.domain.interactor
28 import com.android.systemui.qs.tiles.impl.alarm.domain.model.AlarmTileModel
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/alarm/domain/
DAlarmTileMapper.kt17 package com.android.systemui.qs.tiles.impl.alarm.domain
24 import com.android.systemui.qs.tiles.impl.alarm.domain.model.AlarmTileModel
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/alarm/domain/model/
DAlarmTileModel.kt17 package com.android.systemui.qs.tiles.impl.alarm.domain.model
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/alarm/domain/
DAlarmTileMapperTest.kt17 package com.android.systemui.qs.tiles.impl.alarm.domain
27 import com.android.systemui.qs.tiles.impl.alarm.domain.model.AlarmTileModel
28 import com.android.systemui.qs.tiles.impl.alarm.qsAlarmTileConfig

123