Home
last modified time | relevance | path

Searched refs:Alarm (Results 1 – 25 of 49) sorted by relevance

12

/packages/apps/DeskClock/src/com/android/deskclock/provider/
DAlarm.java39 public final class Alarm implements Parcelable, ClockContract.AlarmsColumns { class
113 public static ContentValues createContentValues(Alarm alarm) { in createContentValues()
190 public static Alarm getAlarm(ContentResolver cr, long alarmId) {
193 return new Alarm(cursor);
206 public static Alarm getAlarm(ContentResolver cr, Uri contentUri) {
222 public static List<Alarm> getAlarms(ContentResolver cr, String selection,
224 final List<Alarm> result = new LinkedList<>();
228 result.add(new Alarm(cursor));
236 public static boolean isTomorrow(Alarm alarm, Calendar now) {
246 public static Alarm addAlarm(ContentResolver contentResolver, Alarm alarm) {
[all …]
DAlarm.kt43 class Alarm : Parcelable, AlarmsColumns { class
225 if (other !is Alarm) return false in equals()
321 fun createContentValues(alarm: Alarm): ContentValues { in createContentValues()
398 fun getAlarm(cr: ContentResolver, alarmId: Long): Alarm? { in getAlarm()
402 return Alarm(cursor) in getAlarm()
426 ): List<Alarm> { in getAlarms()
427 val result: MutableList<Alarm> = LinkedList() in getAlarms()
434 result.add(Alarm(cursor)) in getAlarms()
443 fun isTomorrow(alarm: Alarm, now: Calendar): Boolean { in isTomorrow()
454 fun addAlarm(contentResolver: ContentResolver, alarm: Alarm): Alarm { in addAlarm()
[all …]
DAlarmInstance.java329 mId = c.getLong(Alarm.INSTANCE_ID_INDEX); in AlarmInstance()
330 mYear = c.getInt(Alarm.INSTANCE_YEAR_INDEX); in AlarmInstance()
331 mMonth = c.getInt(Alarm.INSTANCE_MONTH_INDEX); in AlarmInstance()
332 mDay = c.getInt(Alarm.INSTANCE_DAY_INDEX); in AlarmInstance()
333 mHour = c.getInt(Alarm.INSTANCE_HOUR_INDEX); in AlarmInstance()
334 mMinute = c.getInt(Alarm.INSTANCE_MINUTE_INDEX); in AlarmInstance()
335 mLabel = c.getString(Alarm.INSTANCE_LABEL_INDEX); in AlarmInstance()
336 mVibrate = c.getInt(Alarm.INSTANCE_VIBRATE_INDEX) == 1; in AlarmInstance()
DAlarmInstance.kt94 mId = c.getLong(Alarm.INSTANCE_ID_INDEX)
95 mYear = c.getInt(Alarm.INSTANCE_YEAR_INDEX)
96 mMonth = c.getInt(Alarm.INSTANCE_MONTH_INDEX)
97 mDay = c.getInt(Alarm.INSTANCE_DAY_INDEX)
98 mHour = c.getInt(Alarm.INSTANCE_HOUR_INDEX)
99 mMinute = c.getInt(Alarm.INSTANCE_MINUTE_INDEX)
100 mLabel = c.getString(Alarm.INSTANCE_LABEL_INDEX)
101 mVibrate = c.getInt(Alarm.INSTANCE_VIBRATE_INDEX) == 1
/packages/apps/DeskClock/src/com/android/deskclock/
DFetchMatchingAlarmsAction.java28 import com.android.deskclock.provider.Alarm;
45 private final List<Alarm> mAlarms;
47 private final List<Alarm> mMatchingAlarms = new ArrayList<>();
50 public FetchMatchingAlarmsAction(Context context, List<Alarm> alarms, Intent intent, in FetchMatchingAlarmsAction()
94 for (Alarm alarm : mAlarms) { in run()
107 for (Alarm alarm : mAlarms) { in run()
129 final List<Alarm> alarmsFiringAtSameTime = getAlarmsByHourMinutes( in run()
147 for (Alarm alarm : mAlarms) { in run()
162 private List<Alarm> getAlarmsByHourMinutes(int hour24, int minutes, ContentResolver cr) {
165 Alarm.HOUR, Alarm.MINUTES, Alarm.ENABLED);
[all …]
DHandleApiCalls.java38 import com.android.deskclock.provider.Alarm;
126 public static void dismissAlarm(Alarm alarm, Activity activity) { in dismissAlarm()
183 final List<Alarm> alarms = getEnabledAlarms(mContext); in doInBackground()
192 for (Iterator<Alarm> i = alarms.iterator(); i.hasNext();) { in doInBackground()
218 final List<Alarm> matchingAlarms = fmaa.getMatchingAlarms(); in doInBackground()
235 for (Alarm alarm : matchingAlarms) { in doInBackground()
242 private static List<Alarm> getEnabledAlarms(Context context) { in getEnabledAlarms()
243 final String selection = String.format("%s=?", Alarm.ENABLED); in getEnabledAlarms()
245 return Alarm.getAlarms(context.getContentResolver(), selection, args); in getEnabledAlarms()
334 final Intent createAlarm = Alarm.createIntent(this, DeskClock.class, Alarm.INVALID_ID) in handleSetAlarm()
[all …]
DAlarmClockFragment.java45 import com.android.deskclock.provider.Alarm;
84 private long mScrollToAlarmId = Alarm.INVALID_ID;
85 private long mExpandedAlarmId = Alarm.INVALID_ID;
107 mExpandedAlarmId = savedState.getLong(KEY_EXPANDED_ID, Alarm.INVALID_ID); in onCreate()
164 mExpandedAlarmId = Alarm.INVALID_ID; in onCreateView()
219 long alarmId = intent.getLongExtra(SCROLL_TO_ALARM_INTENT_EXTRA, Alarm.INVALID_ID); in onResume()
220 if (alarmId != Alarm.INVALID_ID) { in onResume()
264 public void setLabel(Alarm alarm, String label) { in setLabel()
271 return Alarm.getAlarmsCursorLoader(getActivity()); in onCreateLoader()
278 final Alarm alarm = new Alarm(data); in onLoadFinished()
[all …]
DAlarmClockFragment.kt45 import com.android.deskclock.provider.Alarm
70 private var mScrollToAlarmId = Alarm.INVALID_ID
71 private var mExpandedAlarmId = Alarm.INVALID_ID
85 mExpandedAlarmId = it.getLong(KEY_EXPANDED_ID, Alarm.INVALID_ID) in onCreate()
139 mExpandedAlarmId = Alarm.INVALID_ID in onCreateView()
188 val alarmId = intent.getLongExtra(SCROLL_TO_ALARM_INTENT_EXTRA, Alarm.INVALID_ID) in onResume()
189 if (alarmId != Alarm.INVALID_ID) { in onResume()
229 fun setLabel(alarm: Alarm, label: String?) { in setLabel()
235 return Alarm.getAlarmsCursorLoader(activity) in onCreateLoader()
242 val alarm = Alarm(data) in onLoadFinished()
[all …]
DAlarmSelectionActivity.java28 import com.android.deskclock.provider.Alarm;
80 final Alarm alarm = (Alarm) parcelable; in onCreate()
95 final Alarm alarm = selection.getAlarm(); in onListItemClick()
104 private final Alarm mAlarm;
108 public ProcessAlarmActionAsync(Alarm alarm, Activity activity, int action) { in ProcessAlarmActionAsync()
DAlarmSelectionActivity.kt26 import com.android.deskclock.provider.Alarm
58 val alarm = parcelable as Alarm in onCreate()
72 val alarm: Alarm? = selection.alarm in onListItemClick()
80 private val mAlarm: Alarm,
DDeskClockBackupAgent.java33 import com.android.deskclock.provider.Alarm;
119 final List<Alarm> alarms = Alarm.getAlarms(contentResolver, null); in processRestoredData()
122 for (Alarm alarm : alarms) { in processRestoredData()
/packages/apps/DeskClock/src/com/android/deskclock/alarms/
DAlarmTimeClickHandler.java33 import com.android.deskclock.provider.Alarm;
53 private Alarm mSelectedAlarm;
70 public void setSelectedAlarm(Alarm selectedAlarm) { in setSelectedAlarm()
78 public void setAlarmEnabled(Alarm alarm, boolean newState) { in setAlarmEnabled()
88 public void setAlarmVibrationEnabled(Alarm alarm, boolean newState) { in setAlarmVibrationEnabled()
105 public void setAlarmRepeatEnabled(Alarm alarm, boolean isEnabled) { in setAlarmRepeatEnabled()
135 public void setDayOfWeekEnabled(Alarm alarm, boolean checked, int index) { in setDayOfWeekEnabled()
152 final Alarm alarm = itemHolder.item; in onDeleteClicked()
158 public void onClockClicked(Alarm alarm) { in onClockClicked()
172 public void onRingtoneClicked(Context context, Alarm alarm) { in onRingtoneClicked()
[all …]
DAlarmUpdateHandler.java30 import com.android.deskclock.provider.Alarm;
47 private Alarm mDeletedAlarm;
61 public void asyncAddAlarm(final Alarm alarm) { in asyncAddAlarm()
71 Alarm newAlarm = Alarm.addAlarm(cr, alarm); in asyncAddAlarm()
102 public void asyncUpdateAlarm(final Alarm alarm, final boolean popToast, in asyncUpdateAlarm()
111 Alarm.updateAlarm(cr, alarm); in asyncUpdateAlarm()
156 public void asyncDeleteAlarm(final Alarm alarm) { in asyncDeleteAlarm()
166 return Alarm.deleteAlarm(mAppContext.getContentResolver(), alarm.id); in asyncDeleteAlarm()
201 final Alarm deletedAlarm = mDeletedAlarm; in showUndoBar()
214 private AlarmInstance setupAlarmInstance(Alarm alarm) { in setupAlarmInstance()
DAlarmTimeClickHandler.kt33 import com.android.deskclock.provider.Alarm
52 private var mSelectedAlarm: Alarm? = null
64 fun setSelectedAlarm(selectedAlarm: Alarm?) { in setSelectedAlarm()
72 fun setAlarmEnabled(alarm: Alarm, newState: Boolean) { in setAlarmEnabled()
82 fun setAlarmVibrationEnabled(alarm: Alarm, newState: Boolean) { in setAlarmVibrationEnabled()
99 fun setAlarmRepeatEnabled(alarm: Alarm, isEnabled: Boolean) { in setAlarmRepeatEnabled()
128 fun setDayOfWeekEnabled(alarm: Alarm, checked: Boolean, index: Int) { in setDayOfWeekEnabled()
151 fun onClockClicked(alarm: Alarm) { in onClockClicked()
165 fun onRingtoneClicked(context: Context, alarm: Alarm) { in onRingtoneClicked()
173 fun onEditLabelClicked(alarm: Alarm) { in onEditLabelClicked()
[all …]
DAlarmUpdateHandler.kt28 import com.android.deskclock.provider.Alarm in <lambda>()
49 private var mDeletedAlarm: Alarm? = null in <lambda>()
56 fun asyncAddAlarm(alarm: Alarm?) { in <lambda>()
65 val newAlarm = Alarm.addAlarm(cr, alarm) in <lambda>()
96 alarm: Alarm, in <lambda>()
106 Alarm.updateAlarm(cr, alarm) in <lambda>()
148 fun asyncDeleteAlarm(alarm: Alarm?) { in <lambda>()
157 return Alarm.deleteAlarm(mAppContext.getContentResolver(), alarm.id) in <lambda>()
200 private fun setupAlarmInstance(alarm: Alarm): AlarmInstance { in <lambda>()
DAlarmStateManager.java45 import com.android.deskclock.provider.Alarm;
264 Alarm alarm = Alarm.getAlarm(cr, instance.mAlarmId); in updateParentAlarm()
273 Alarm.deleteAlarm(cr, alarm.id); in updateParentAlarm()
277 Alarm.updateAlarm(cr, alarm); in updateParentAlarm()
657 final Alarm alarm = Alarm.getAlarm(cr, instance.mAlarmId); in registerInstance()
695 Alarm.updateAlarm(cr, alarm); in registerInstance()
808 final Alarm alarm = Alarm.getAlarm(contentResolver, instance.mAlarmId); in fixAlarmInstances()
954 long alarmId = instance.mAlarmId == null ? Alarm.INVALID_ID : instance.mAlarmId; in handleIntent()
955 final Intent viewAlarmIntent = Alarm.createIntent(context, DeskClock.class, alarmId) in handleIntent()
DAlarmStateManager.kt46 import com.android.deskclock.provider.Alarm in <lambda>()
308 val alarm = Alarm.getAlarm(cr, instance.mAlarmId!!) in <lambda>()
317 Alarm.deleteAlarm(cr, alarm.id) in <lambda>()
321 Alarm.updateAlarm(cr, alarm) in <lambda>()
721 val alarm = Alarm.getAlarm(cr, instance.mAlarmId!!) in <lambda>()
759 Alarm.updateAlarm(cr, alarm) in <lambda>()
869 val alarm = Alarm.getAlarm(contentResolver, instance.mAlarmId!!) in <lambda>()
991 val alarmId = instance.mAlarmId ?: Alarm.INVALID_ID in <lambda>()
993 Alarm.createIntent(context, DeskClock::class.java, alarmId) in <lambda>()
/packages/apps/DeskClock/src/com/android/deskclock/ringtone/
DRingtonePickerActivity.java56 import com.android.deskclock.provider.Alarm;
133 public static Intent createAlarmRingtonePickerIntent(Context context, Alarm alarm) { in createAlarmRingtonePickerIntent()
234 new AsyncTask<Void, Void, Alarm>() { in onPause()
236 protected Alarm doInBackground(Void... parameters) { in onPause()
237 final Alarm alarm = Alarm.getAlarm(cr, mAlarmId); in onPause()
245 protected void onPostExecute(Alarm alarm) { in onPause()
615 final List<Alarm> alarms = Alarm.getAlarms(cr, null); in doInBackground()
616 for (Alarm alarm : alarms) { in doInBackground()
DRingtonePickerActivity.kt59 import com.android.deskclock.provider.Alarm in <lambda>()
180 object : AsyncTask<Void?, Void?, Alarm>() { in <lambda>()
181 override fun doInBackground(vararg parameters: Void?): Alarm? { in <lambda>()
182 val alarm = Alarm.getAlarm(cr, mAlarmId) in <lambda>()
189 override fun onPostExecute(alarm: Alarm) { in <lambda>()
528 val alarms = Alarm.getAlarms(cr, null) in <lambda>()
611 fun createAlarmRingtonePickerIntent(context: Context, alarm: Alarm): Intent { in <lambda>()
/packages/apps/DeskClock/src/com/android/deskclock/widget/selector/
DAlarmSelection.java18 import com.android.deskclock.provider.Alarm;
22 private final Alarm mAlarm;
28 public AlarmSelection(String label, Alarm alarm) { in AlarmSelection()
37 public Alarm getAlarm() { in getAlarm()
/packages/apps/DeskClock/src/com/android/deskclock/alarms/dataadapter/
DAlarmItemViewHolder.java29 import com.android.deskclock.provider.Alarm;
85 final Alarm alarm = itemHolder.item; in onBindItemView()
92 protected void bindOnOffSwitch(Alarm alarm) { in bindOnOffSwitch()
98 protected void bindClock(Alarm alarm) { in bindClock()
103 protected boolean bindPreemptiveDismissButton(Context context, Alarm alarm, in bindPreemptiveDismissButton()
DAlarmItemViewHolder.kt29 import com.android.deskclock.provider.Alarm in <lambda>()
66 protected fun bindOnOffSwitch(alarm: Alarm) { in <lambda>()
72 protected fun bindClock(alarm: Alarm) { in <lambda>()
79 alarm: Alarm, in <lambda>()
DCollapsedAlarmViewHolder.java37 import com.android.deskclock.provider.Alarm;
101 final Alarm alarm = itemHolder.item; in onBindItemView()
110 private void bindReadOnlyLabel(Context context, Alarm alarm) { in bindReadOnlyLabel()
121 private void bindRepeatText(Context context, Alarm alarm) { in bindRepeatText()
136 private void bindUpcomingInstance(Context context, Alarm alarm) { in bindUpcomingInstance()
141 final String labelText = Alarm.isTomorrow(alarm, Calendar.getInstance()) ? in bindUpcomingInstance()
DAlarmItemHolder.kt23 import com.android.deskclock.provider.Alarm
27 alarm: Alarm,
30 ) : ItemHolder<Alarm>(alarm, alarm.id) {
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/
DSpringLoadedDragController.java19 import com.android.launcher3.Alarm;
30 Alarm mAlarm;
38 mAlarm = new Alarm(); in SpringLoadedDragController()
55 public void onAlarm(Alarm alarm) { in onAlarm()

12