Home
last modified time | relevance | path

Searched refs:AlarmInstance (Results 1 – 19 of 19) sorted by relevance

/packages/apps/DeskClock/src/com/android/deskclock/alarms/
DAlarmStateManager.java46 import com.android.deskclock.provider.AlarmInstance;
178 final AlarmInstance nextAlarm = getNextFiringAlarm(context); in updateNextAlarm()
192 public static AlarmInstance getNextFiringAlarm(Context context) { in getNextFiringAlarm()
194 final String activeAlarmQuery = AlarmInstance.ALARM_STATE + "<" + AlarmInstance.FIRED_STATE; in getNextFiringAlarm()
195 final List<AlarmInstance> alarmInstances = AlarmInstance.getInstances(cr, activeAlarmQuery); in getNextFiringAlarm()
197 AlarmInstance nextAlarm = null; in getNextFiringAlarm()
198 for (AlarmInstance instance : alarmInstances) { in getNextFiringAlarm()
209 private static void updateNextAlarmInSystemSettings(Context context, AlarmInstance nextAlarm) { in updateNextAlarmInSystemSettings()
233 private static void updateNextAlarmInAlarmManager(Context context, AlarmInstance nextAlarm){ in updateNextAlarmInAlarmManager()
268 private static void updateParentAlarm(Context context, AlarmInstance instance) { in updateParentAlarm()
[all …]
DAlarmUpdateHandler.java31 import com.android.deskclock.provider.AlarmInstance;
62 final AsyncTask<Void, Void, AlarmInstance> updateTask = in asyncAddAlarm()
63 new AsyncTask<Void, Void, AlarmInstance>() { in asyncAddAlarm()
65 protected AlarmInstance doInBackground(Void... parameters) { in asyncAddAlarm()
85 protected void onPostExecute(AlarmInstance instance) { in asyncAddAlarm()
104 final AsyncTask<Void, Void, AlarmInstance> updateTask = in asyncUpdateAlarm()
105 new AsyncTask<Void, Void, AlarmInstance>() { in asyncUpdateAlarm()
107 protected AlarmInstance doInBackground(Void... parameters) { in asyncUpdateAlarm()
116 final List<AlarmInstance> instanceList = in asyncUpdateAlarm()
117 AlarmInstance.getInstancesByAlarmId(cr, alarm.id); in asyncUpdateAlarm()
[all …]
DAlarmNotifications.java32 import com.android.deskclock.provider.AlarmInstance;
37 public static void showLowPriorityNotification(Context context, AlarmInstance instance) { in showLowPriorityNotification()
55 AlarmInstance.HIDE_NOTIFICATION_STATE); in showLowPriorityNotification()
61 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.PREDISMISSED_STATE); in showLowPriorityNotification()
76 public static void showHighPriorityNotification(Context context, AlarmInstance instance) { in showHighPriorityNotification()
95 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.PREDISMISSED_STATE); in showHighPriorityNotification()
110 public static void showSnoozeNotification(Context context, AlarmInstance instance) { in showSnoozeNotification()
127 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.DISMISSED_STATE); in showSnoozeNotification()
142 public static void showMissedNotification(Context context, AlarmInstance instance) { in showMissedNotification()
161 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.DISMISSED_STATE); in showMissedNotification()
[all …]
DAlarmService.java33 import com.android.deskclock.provider.AlarmInstance;
93 public static void stopAlarm(Context context, AlarmInstance instance) { in stopAlarm()
94 final Intent intent = AlarmInstance.createIntent(context, AlarmService.class, instance.mId) in stopAlarm()
103 private AlarmInstance mCurrentAlarm = null;
114 "AlarmService", mCurrentAlarm, AlarmInstance.MISSED_STATE));
119 private void startAlarm(AlarmInstance instance) { in startAlarm()
154 mCurrentAlarm = AlarmInstance.getInstance(getContentResolver(), instanceId); in stopCurrentAlarm()
168 if (mCurrentAlarm == null || mCurrentAlarm.mAlarmState != AlarmInstance.FIRED_STATE) {
211 final long instanceId = AlarmInstance.getId(intent.getData()); in onStartCommand()
218 if (alarmState == AlarmInstance.FIRED_STATE) { in onStartCommand()
[all …]
DAlarmKlaxon.java28 import com.android.deskclock.provider.AlarmInstance;
51 public static void start(Context context, AlarmInstance instance) { in start()
56 if (!AlarmInstance.NO_RINGTONE_URI.equals(instance.mRingtone)) { in start()
DAlarmActivity.java58 import com.android.deskclock.provider.AlarmInstance;
121 private AlarmInstance mAlarmInstance;
150 final long instanceId = AlarmInstance.getId(getIntent().getData()); in onCreate()
151 mAlarmInstance = AlarmInstance.getInstance(getContentResolver(), instanceId); in onCreate()
157 } else if (mAlarmInstance.mAlarmState != AlarmInstance.FIRED_STATE) { in onCreate()
238 final long instanceId = AlarmInstance.getId(getIntent().getData()); in onResume()
239 mAlarmInstance = AlarmInstance.getInstance(getContentResolver(), instanceId); in onResume()
248 if (mAlarmInstance.mAlarmState != AlarmInstance.FIRED_STATE) { in onResume()
DAlarmTimeClickHandler.java34 import com.android.deskclock.provider.AlarmInstance;
155 public void dismissAlarmInstance(AlarmInstance alarmInstance) { in dismissAlarmInstance()
159 AlarmInstance.PREDISMISSED_STATE); in dismissAlarmInstance()
/packages/apps/DeskClock/src/com/android/deskclock/provider/
DAlarmInstance.java39 public final class AlarmInstance implements ClockContract.InstancesColumns { class
97 public static ContentValues createContentValues(AlarmInstance instance) { in createContentValues()
145 public static AlarmInstance getInstance(ContentResolver cr, long instanceId) { in getInstance()
148 return new AlarmInstance(cursor, false /* joinedTable */); in getInstance()
162 public static List<AlarmInstance> getInstancesByAlarmId(ContentResolver contentResolver, in getInstancesByAlarmId()
173 public static AlarmInstance getNextUpcomingInstanceByAlarmId(ContentResolver contentResolver, in getNextUpcomingInstanceByAlarmId()
175 final List<AlarmInstance> alarmInstances = getInstancesByAlarmId(contentResolver, alarmId); in getNextUpcomingInstanceByAlarmId()
179 AlarmInstance nextAlarmInstance = alarmInstances.get(0); in getNextUpcomingInstanceByAlarmId()
180 for (AlarmInstance instance : alarmInstances) { in getNextUpcomingInstanceByAlarmId()
191 public static List<AlarmInstance> getInstancesByInstanceIdAndState( in getInstancesByInstanceIdAndState()
[all …]
DAlarm.java209 return alarm.instanceState != AlarmInstance.SNOOZE_STATE in isTomorrow()
319 return instanceState == AlarmInstance.SNOOZE_STATE in canPreemptivelyDismiss()
320 || instanceState == AlarmInstance.HIGH_NOTIFICATION_STATE in canPreemptivelyDismiss()
321 || instanceState == AlarmInstance.LOW_NOTIFICATION_STATE in canPreemptivelyDismiss()
322 || instanceState == AlarmInstance.HIDE_NOTIFICATION_STATE; in canPreemptivelyDismiss()
341 public AlarmInstance createInstanceAfter(Calendar time) { in createInstanceAfter()
343 AlarmInstance result = new AlarmInstance(nextInstanceTime, id); in createInstanceAfter()
DClockDatabaseHelper.java182 AlarmInstance newInstance = alarm.createInstanceAfter(currentTime); in onUpgrade()
184 AlarmInstance.createContentValues(newInstance)); in onUpgrade()
/packages/apps/DeskClock/src/com/android/deskclock/
DHandleApiCalls.java38 import com.android.deskclock.provider.AlarmInstance;
109 final AlarmInstance alarmInstance = AlarmInstance.getNextUpcomingInstanceByAlarmId( in dismissAlarm()
158 final AlarmInstance alarmInstance = AlarmInstance.getNextUpcomingInstanceByAlarmId( in doInBackground()
161 alarmInstance.mAlarmState > AlarmInstance.FIRED_STATE) { in doInBackground()
228 final List<AlarmInstance> alarmInstances = AlarmInstance.getInstancesByState( in doInBackground()
229 mContext.getContentResolver(), AlarmInstance.FIRED_STATE); in doInBackground()
237 for (AlarmInstance firingAlarmInstance : alarmInstances) { in doInBackground()
244 static void snoozeAlarm(AlarmInstance alarmInstance, Context context, Activity activity) { in snoozeAlarm()
316 final AlarmInstance alarmInstance = alarm.createInstanceAfter(Calendar.getInstance()); in handleSetAlarm()
380 private void setupInstance(AlarmInstance instance, boolean skipUi) { in setupInstance()
[all …]
DFetchMatchingAlarmsAction.java28 import com.android.deskclock.provider.AlarmInstance;
110 final AlarmInstance alarmInstance = in run()
111 AlarmInstance.getNextUpcomingInstanceByAlarmId(cr, alarm.id); in run()
113 && alarmInstance.mAlarmState == AlarmInstance.FIRED_STATE) { in run()
122 final AlarmInstance nextAlarm = AlarmStateManager.getNextFiringAlarm(mContext); in run()
DDeskClockBackupAgent.java36 import com.android.deskclock.provider.AlarmInstance;
135 AlarmInstance alarmInstance = alarm.createInstanceAfter(now); in processRestoredData()
138 alarmInstance = AlarmInstance.addInstance(contentResolver, alarmInstance); in processRestoredData()
DAlarmUtils.java27 import com.android.deskclock.provider.AlarmInstance;
45 public static String getAlarmText(Context context, AlarmInstance instance, in getAlarmText()
DUtils.java59 import com.android.deskclock.provider.AlarmInstance;
466 public static boolean isAlarmWithin24Hours(AlarmInstance alarmInstance) { in isAlarmWithin24Hours()
/packages/apps/DeskClock/src/com/android/deskclock/alarms/dataadapter/
DAlarmTimeViewHolder.java30 import com.android.deskclock.provider.AlarmInstance;
48 protected AlarmInstance mAlarmInstance;
75 public void setData(Alarm alarm, AlarmInstance alarmInstance) { in setData()
88 public abstract void bindAlarm(Context context, Alarm alarm, AlarmInstance alarmInstance); in bindAlarm()
103 AlarmInstance alarmInstance) { in bindPreemptiveDismissButton()
107 final String dismissText = alarm.instanceState == AlarmInstance.SNOOZE_STATE in bindPreemptiveDismissButton()
DAlarmTimeAdapter.java33 import com.android.deskclock.provider.AlarmInstance;
93 final AlarmInstance alarmInstance = alarm.canPreemptivelyDismiss() in onBindViewHolder()
94 ? new AlarmInstance(mCursor, true /* joinedTable */) : null; in onBindViewHolder()
DCollapsedAlarmViewHolder.java28 import com.android.deskclock.provider.AlarmInstance;
81 public void bindAlarm(Context context, Alarm alarm, AlarmInstance alarmInstance) { in bindAlarm()
DExpandedAlarmViewHolder.java38 import com.android.deskclock.provider.AlarmInstance;
175 public void bindAlarm(Context context, Alarm alarm, AlarmInstance alarmInstance) { in bindAlarm()