Lines Matching defs:alarm
74 Alarm alarm = findAlarm(callback);
75 if (alarm == null) {
76 alarm = new Alarm();
78 alarm.mCallback = callback;
82 alarm.mAlaramSender = PendingIntent.getBroadcast(mContext, 0, i, 0);
87 mAlarms.append(id, alarm);
89 setAlarm(alarm, triggerTime);
93 Alarm alarm = findAlarm(callback);
94 if (alarm != null) {
95 cancelAlarm(alarm);
101 Alarm alarm = mAlarms.valueAt(i);
102 cancelAlarm(alarm);
109 Alarm alarm = mAlarms.get(id);
110 if (alarm == null) {
113 sExecutor.execute(new Worker(alarm));
119 public Worker(Alarm alarm) {
120 mAlarm = alarm;
141 Alarm alarm = mAlarms.valueAt(i);
142 if (alarm.mCallback == callback) {
143 return alarm;
149 /*package*/ synchronized void setAlarm(Alarm alarm, long offset) {
152 alarm.mAlaramSender);
155 /*package*/ synchronized void cancelAlarm(Alarm alarm) {
156 mAlarmManager.cancel(alarm.mAlaramSender);
157 int index = mAlarms.indexOfValue(alarm);
162 // Unregister the BroadcastReceiver if there isn't a alarm anymore.