/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
D | AlarmStateManager.java | 46 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 …]
|
D | AlarmUpdateHandler.java | 31 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 …]
|
D | AlarmNotifications.java | 39 import com.android.deskclock.provider.AlarmInstance; 86 AlarmInstance instance) { in showLowPriorityNotification() 110 AlarmInstance.HIDE_NOTIFICATION_STATE); in showLowPriorityNotification() 117 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.PREDISMISSED_STATE); in showLowPriorityNotification() 135 AlarmInstance instance) { in showHighPriorityNotification() 157 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.PREDISMISSED_STATE); in showHighPriorityNotification() 297 AlarmInstance instance) { in showSnoozeNotification() 320 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.DISMISSED_STATE); in showSnoozeNotification() 339 AlarmInstance instance) { in showMissedNotification() 365 AlarmStateManager.ALARM_DISMISS_TAG, instance, AlarmInstance.DISMISSED_STATE); in showMissedNotification() [all …]
|
D | AlarmService.java | 33 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()
|
D | AlarmActivity.java | 62 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()
|
D | AlarmKlaxon.java | 29 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()
|
D | AlarmTimeClickHandler.java | 34 import com.android.deskclock.provider.AlarmInstance; 164 public void dismissAlarmInstance(AlarmInstance alarmInstance) { in dismissAlarmInstance() 167 AlarmInstance.PREDISMISSED_STATE); in dismissAlarmInstance()
|
/packages/apps/DeskClock/src/com/android/deskclock/provider/ |
D | AlarmInstance.java | 37 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 …]
|
D | Alarm.java | 237 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);
|
D | ClockDatabaseHelper.java | 183 AlarmInstance newInstance = alarm.createInstanceAfter(currentTime); in onUpgrade() 185 AlarmInstance.createContentValues(newInstance)); in onUpgrade()
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | HandleApiCalls.java | 39 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 …]
|
D | FetchMatchingAlarmsAction.java | 29 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()
|
D | DeskClockBackupAgent.java | 34 import com.android.deskclock.provider.AlarmInstance; 129 AlarmInstance alarmInstance = alarm.createInstanceAfter(now); in processRestoredData() 132 alarmInstance = AlarmInstance.addInstance(contentResolver, alarmInstance); in processRestoredData()
|
D | AlarmUtils.java | 27 import com.android.deskclock.provider.AlarmInstance; 51 public static String getAlarmText(Context context, AlarmInstance instance, in getAlarmText()
|
D | AlarmClockFragment.java | 46 import com.android.deskclock.provider.AlarmInstance; 279 final AlarmInstance alarmInstance = alarm.canPreemptivelyDismiss() in onLoadFinished() 280 ? new AlarmInstance(data, true /* joinedTable */) : null; in onLoadFinished()
|
D | Utils.java | 62 import com.android.deskclock.provider.AlarmInstance; 321 public static boolean isAlarmWithin24Hours(AlarmInstance alarmInstance) { in isAlarmWithin24Hours()
|
/packages/apps/DeskClock/src/com/android/deskclock/alarms/dataadapter/ |
D | AlarmItemHolder.java | 24 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()
|
D | AlarmItemViewHolder.java | 30 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()
|
D | CollapsedAlarmViewHolder.java | 38 import com.android.deskclock.provider.AlarmInstance; 102 final AlarmInstance alarmInstance = itemHolder.getAlarmInstance(); in onBindItemView()
|
D | ExpandedAlarmViewHolder.java | 49 import com.android.deskclock.provider.AlarmInstance; 196 final AlarmInstance alarmInstance = itemHolder.getAlarmInstance(); in onBindItemView()
|