Home
last modified time | relevance | path

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

12

/packages/apps/DeskClock/src/com/android/deskclock/alarms/
DAlarmStateManager.java46 import com.android.deskclock.provider.AlarmInstance;
168 final AlarmInstance nextAlarm = getNextFiringAlarm(context); in updateNextAlarm()
183 public static AlarmInstance getNextFiringAlarm(Context context) { in getNextFiringAlarm()
185 final String activeAlarmQuery = AlarmInstance.ALARM_STATE + "<" + AlarmInstance.FIRED_STATE; in getNextFiringAlarm()
186 final List<AlarmInstance> alarmInstances = AlarmInstance.getInstances(cr, activeAlarmQuery); in getNextFiringAlarm()
188 AlarmInstance nextAlarm = null; in getNextFiringAlarm()
189 for (AlarmInstance instance : alarmInstances) { in getNextFiringAlarm()
202 private static void updateNextAlarmInSystemSettings(Context context, AlarmInstance nextAlarm) { in updateNextAlarmInSystemSettings()
227 private static void updateNextAlarmInAlarmManager(Context context, AlarmInstance nextAlarm) { in updateNextAlarmInAlarmManager()
262 private static void updateParentAlarm(Context context, AlarmInstance instance) { in updateParentAlarm()
[all …]
DAlarmStateManager.kt47 import com.android.deskclock.provider.AlarmInstance in <lambda>()
98 instance: AlarmInstance, in <lambda>()
102 fun cancelScheduledInstanceStateChange(context: Context, instance: AlarmInstance) in <lambda>()
112 instance: AlarmInstance, in <lambda>()
135 override fun cancelScheduledInstanceStateChange(context: Context, instance: AlarmInstance) { in <lambda>()
227 fun getNextFiringAlarm(context: Context): AlarmInstance? { in <lambda>()
231 val alarmInstances = AlarmInstance.getInstances(cr, activeAlarmQuery) in <lambda>()
233 var nextAlarm: AlarmInstance? = null in <lambda>()
246 private fun updateNextAlarmInSystemSettings(context: Context, nextAlarm: AlarmInstance?) { in <lambda>()
270 private fun updateNextAlarmInAlarmManager(context: Context, nextAlarm: AlarmInstance?) { in <lambda>()
[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()
115 final List<AlarmInstance> instanceList = in asyncUpdateAlarm()
116 AlarmInstance.getInstancesByAlarmId(cr, alarm.id); in asyncUpdateAlarm()
[all …]
DAlarmUpdateHandler.kt29 import com.android.deskclock.provider.AlarmInstance in <lambda>()
57 val updateTask: AsyncTask<Void, Void, AlarmInstance> = in <lambda>()
58 object : AsyncTask<Void, Void, AlarmInstance>() { in <lambda>()
59 override fun doInBackground(vararg parameters: Void): AlarmInstance? { in <lambda>()
78 override fun onPostExecute(instance: AlarmInstance?) { in <lambda>()
100 val updateTask: AsyncTask<Void, Void, AlarmInstance> = in <lambda>()
101 object : AsyncTask<Void, Void, AlarmInstance>() { in <lambda>()
102 override fun doInBackground(vararg parameters: Void): AlarmInstance? { in <lambda>()
109 val instanceList = AlarmInstance.getInstancesByAlarmId(cr, alarm.id) in <lambda>()
112 val newInstance = AlarmInstance(instance) in <lambda>()
[all …]
DAlarmNotifications.java46 import com.android.deskclock.provider.AlarmInstance;
93 AlarmInstance instance, boolean lowPriority) { in showUpcomingNotification()
122 AlarmInstance.HIDE_NOTIFICATION_STATE); in showUpcomingNotification()
130 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.PREDISMISSED_STATE); in showUpcomingNotification()
271 AlarmInstance instance) { in showSnoozeNotification()
295 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.DISMISSED_STATE); in showSnoozeNotification()
315 AlarmInstance instance) { in showMissedNotification()
342 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.DISMISSED_STATE); in showMissedNotification()
347 Intent showAndDismiss = AlarmInstance.createIntent(context, AlarmStateManager.class, in showMissedNotification()
361 static synchronized void showAlarmNotification(Service service, AlarmInstance instance) { in showAlarmNotification()
[all …]
DAlarmService.java33 import com.android.deskclock.provider.AlarmInstance;
96 public static void stopAlarm(Context context, AlarmInstance instance) { in stopAlarm()
97 final Intent intent = AlarmInstance.createIntent(context, AlarmService.class, instance.mId) in stopAlarm()
105 private AlarmInstance mCurrentAlarm = null;
107 private void startAlarm(AlarmInstance instance) { in startAlarm()
147 if (mCurrentAlarm == null || mCurrentAlarm.mAlarmState != AlarmInstance.FIRED_STATE) {
193 final long instanceId = AlarmInstance.getId(intent.getData()); in onStartCommand()
200 if (alarmState == AlarmInstance.FIRED_STATE) { in onStartCommand()
202 final AlarmInstance instance = AlarmInstance.getInstance(cr, instanceId); in onStartCommand()
263 "AlarmService", mCurrentAlarm, AlarmInstance.MISSED_STATE)); in onCallStateChanged()
DAlarmService.kt34 import com.android.deskclock.provider.AlarmInstance
68 private var mCurrentAlarm: AlarmInstance? = null
70 private fun startAlarm(instance: AlarmInstance) { in startAlarm()
154 val instanceId = AlarmInstance.getId(intent.getData()!!) in onStartCommand()
163 val instance: AlarmInstance? = AlarmInstance.getInstance(cr, instanceId) in onStartCommand()
255 fun stopAlarm(context: Context, instance: AlarmInstance) { in stopAlarm()
257 AlarmInstance.createIntent(context, AlarmService::class.java, instance.mId) in stopAlarm()
DAlarmNotifications.kt39 import com.android.deskclock.provider.AlarmInstance
115 instance: AlarmInstance in showLowPriorityNotification()
177 instance: AlarmInstance in showHighPriorityNotification()
383 instance: AlarmInstance in showSnoozeNotification()
437 instance: AlarmInstance in showMissedNotification()
473 val showAndDismiss: Intent = AlarmInstance.createIntent(context, in showMissedNotification()
494 fun showAlarmNotification(service: Service, instance: AlarmInstance) { in showAlarmNotification()
533 val contentIntent: Intent = AlarmInstance.createIntent(service, AlarmActivity::class.java, in showAlarmNotification()
540 AlarmInstance.createIntent(service, AlarmActivity::class.java, instance.mId) in showAlarmNotification()
556 fun clearNotification(context: Context, instance: AlarmInstance) { in clearNotification()
[all …]
DAlarmActivity.java62 import com.android.deskclock.provider.AlarmInstance;
128 private AlarmInstance mAlarmInstance;
160 final long instanceId = AlarmInstance.getId(getIntent().getData()); in onCreate()
161 mAlarmInstance = AlarmInstance.getInstance(getContentResolver(), instanceId); in onCreate()
167 } else if (mAlarmInstance.mAlarmState != AlarmInstance.FIRED_STATE) { in onCreate()
241 final long instanceId = AlarmInstance.getId(getIntent().getData()); in onResume()
242 mAlarmInstance = AlarmInstance.getInstance(getContentResolver(), instanceId); in onResume()
251 if (mAlarmInstance.mAlarmState != AlarmInstance.FIRED_STATE) { in onResume()
DAlarmKlaxon.java29 import com.android.deskclock.provider.AlarmInstance;
52 public static void start(Context context, AlarmInstance instance) { in start()
57 if (!AlarmInstance.NO_RINGTONE_URI.equals(instance.mRingtone)) { in start()
DAlarmActivity.kt60 import com.android.deskclock.provider.AlarmInstance
102 private var mAlarmInstance: AlarmInstance? = null
133 val instanceId = AlarmInstance.getId(getIntent().getData()!!) in onCreate()
134 mAlarmInstance = AlarmInstance.getInstance(getContentResolver(), instanceId) in onCreate()
214 val instanceId = AlarmInstance.getId(getIntent().getData()!!) in onResume()
215 mAlarmInstance = AlarmInstance.getInstance(getContentResolver(), instanceId) in onResume()
DAlarmTimeClickHandler.java34 import com.android.deskclock.provider.AlarmInstance;
164 public void dismissAlarmInstance(AlarmInstance alarmInstance) { in dismissAlarmInstance()
167 AlarmInstance.PREDISMISSED_STATE); in dismissAlarmInstance()
DAlarmKlaxon.kt29 import com.android.deskclock.provider.AlarmInstance
53 fun start(context: Context, instance: AlarmInstance) { in start()
/packages/apps/DeskClock/src/com/android/deskclock/provider/
DAlarmInstance.java37 public final class AlarmInstance implements ClockContract.InstancesColumns { class
90 public static ContentValues createContentValues(AlarmInstance instance) { in createContentValues()
141 public static AlarmInstance getInstance(ContentResolver cr, long instanceId) { in getInstance()
144 return new AlarmInstance(cursor, false /* joinedTable */); in getInstance()
158 public static AlarmInstance getInstance(ContentResolver cr, Uri contentUri) { in getInstance()
170 public static List<AlarmInstance> getInstancesByAlarmId(ContentResolver contentResolver, in getInstancesByAlarmId()
181 public static AlarmInstance getNextUpcomingInstanceByAlarmId(ContentResolver contentResolver, in getNextUpcomingInstanceByAlarmId()
183 final List<AlarmInstance> alarmInstances = getInstancesByAlarmId(contentResolver, alarmId); in getNextUpcomingInstanceByAlarmId()
187 AlarmInstance nextAlarmInstance = alarmInstances.get(0); in getNextUpcomingInstanceByAlarmId()
188 for (AlarmInstance instance : alarmInstances) { in getNextUpcomingInstanceByAlarmId()
[all …]
DAlarmInstance.kt39 class AlarmInstance : InstancesColumns { class
78 constructor(instance: AlarmInstance) {
217 if (other !is AlarmInstance) return false in equals()
295 fun createContentValues(instance: AlarmInstance): ContentValues { in createContentValues()
349 fun getInstance(cr: ContentResolver, instanceId: Long): AlarmInstance? { in getInstance()
354 return AlarmInstance(cursor, false /* joinedTable */) in getInstance()
367 fun getInstance(cr: ContentResolver, contentUri: Uri): AlarmInstance? { in getInstance()
383 ): List<AlarmInstance> { in getInstancesByAlarmId()
397 ): AlarmInstance? { in getNextUpcomingInstanceByAlarmId()
418 ): List<AlarmInstance> { in getInstancesByInstanceIdAndState()
[all …]
DAlarm.java237 if (alarm.instanceState == AlarmInstance.SNOOZE_STATE) {
358 return instanceState == AlarmInstance.SNOOZE_STATE
359 || instanceState == AlarmInstance.HIGH_NOTIFICATION_STATE
360 || instanceState == AlarmInstance.LOW_NOTIFICATION_STATE
361 || instanceState == AlarmInstance.HIDE_NOTIFICATION_STATE;
380 public AlarmInstance createInstanceAfter(Calendar time) {
382 AlarmInstance result = new AlarmInstance(nextInstanceTime, id);
/packages/apps/DeskClock/src/com/android/deskclock/
DHandleApiCalls.java39 import com.android.deskclock.provider.AlarmInstance;
54 import static com.android.deskclock.provider.AlarmInstance.FIRED_STATE;
55 import static com.android.deskclock.provider.AlarmInstance.SNOOZE_STATE;
128 final AlarmInstance instance = AlarmInstance.getNextUpcomingInstanceByAlarmId( in dismissAlarm()
140 public static void dismissAlarmInstance(AlarmInstance instance, Activity activity) { in dismissAlarmInstance()
193 final AlarmInstance instance = AlarmInstance.getNextUpcomingInstanceByAlarmId( in doInBackground()
268 final List<AlarmInstance> alarmInstances = AlarmInstance.getInstancesByState( in doInBackground()
277 for (AlarmInstance firingAlarmInstance : alarmInstances) { in doInBackground()
284 static void snoozeAlarm(AlarmInstance alarmInstance, Context context, Activity activity) { in snoozeAlarm()
381 final AlarmInstance alarmInstance = alarm.createInstanceAfter(now); in handleSetAlarm()
[all …]
DFetchMatchingAlarmsAction.java29 import com.android.deskclock.provider.AlarmInstance;
108 final AlarmInstance alarmInstance = in run()
109 AlarmInstance.getNextUpcomingInstanceByAlarmId(cr, alarm.id); in run()
111 && alarmInstance.mAlarmState == AlarmInstance.FIRED_STATE) { in run()
120 final AlarmInstance nextAlarm = AlarmStateManager.getNextFiringAlarm(mContext); in run()
DDeskClockBackupAgent.java34 import com.android.deskclock.provider.AlarmInstance;
129 AlarmInstance alarmInstance = alarm.createInstanceAfter(now); in processRestoredData()
132 alarmInstance = AlarmInstance.addInstance(contentResolver, alarmInstance); in processRestoredData()
DAlarmUtils.kt25 import com.android.deskclock.provider.AlarmInstance
53 fun getAlarmText(context: Context, instance: AlarmInstance, includeLabel: Boolean): String { in getAlarmText()
DAlarmUtils.java27 import com.android.deskclock.provider.AlarmInstance;
51 public static String getAlarmText(Context context, AlarmInstance instance, in getAlarmText()
/packages/apps/DeskClock/src/com/android/deskclock/alarms/dataadapter/
DAlarmItemHolder.java24 import com.android.deskclock.provider.AlarmInstance;
29 private final AlarmInstance mAlarmInstance;
33 public AlarmItemHolder(Alarm alarm, AlarmInstance alarmInstance, in AlarmItemHolder()
50 public AlarmInstance getAlarmInstance() { in getAlarmInstance()
DAlarmItemViewHolder.java30 import com.android.deskclock.provider.AlarmInstance;
68 final AlarmInstance alarmInstance = getItemHolder().getAlarmInstance(); in AlarmItemViewHolder()
104 AlarmInstance alarmInstance) { in bindPreemptiveDismissButton()
108 final String dismissText = alarm.instanceState == AlarmInstance.SNOOZE_STATE in bindPreemptiveDismissButton()
DAlarmItemHolder.kt24 import com.android.deskclock.provider.AlarmInstance
28 val alarmInstance: AlarmInstance?,
DAlarmItemViewHolder.kt30 import com.android.deskclock.provider.AlarmInstance in <lambda>()
80 alarmInstance: AlarmInstance? in <lambda>()

12