/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
D | AlarmTimeClickHandler.java | 78 public void setAlarmEnabled(Alarm alarm, boolean newState) { in setAlarmEnabled() argument 79 if (newState != alarm.enabled) { in setAlarmEnabled() 80 alarm.enabled = newState; in setAlarmEnabled() 83 mAlarmUpdateHandler.asyncUpdateAlarm(alarm, alarm.enabled, false); in setAlarmEnabled() 88 public void setAlarmVibrationEnabled(Alarm alarm, boolean newState) { in setAlarmVibrationEnabled() argument 89 if (newState != alarm.vibrate) { in setAlarmVibrationEnabled() 90 alarm.vibrate = newState; in setAlarmVibrationEnabled() 92 mAlarmUpdateHandler.asyncUpdateAlarm(alarm, false, true); in setAlarmVibrationEnabled() 105 public void setAlarmRepeatEnabled(Alarm alarm, boolean isEnabled) { in setAlarmRepeatEnabled() argument 107 final Calendar oldNextAlarmTime = alarm.getNextAlarmTime(now); in setAlarmRepeatEnabled() [all …]
|
D | AlarmUpdateHandler.java | 61 public void asyncAddAlarm(final Alarm alarm) { in asyncAddAlarm() argument 66 if (alarm != null) { in asyncAddAlarm() 71 Alarm newAlarm = Alarm.addAlarm(cr, alarm); in asyncAddAlarm() 102 public void asyncUpdateAlarm(final Alarm alarm, final boolean popToast, in asyncUpdateAlarm() argument 111 Alarm.updateAlarm(cr, alarm); in asyncUpdateAlarm() 116 AlarmInstance.getInstancesByAlarmId(cr, alarm.id); in asyncUpdateAlarm() 122 newInstance.mVibrate = alarm.vibrate; in asyncUpdateAlarm() 123 newInstance.mRingtone = alarm.alert; in asyncUpdateAlarm() 124 newInstance.mLabel = alarm.label; in asyncUpdateAlarm() 135 AlarmStateManager.deleteAllInstances(mAppContext, alarm.id); in asyncUpdateAlarm() [all …]
|
D | AlarmStateManager.java | 264 Alarm alarm = Alarm.getAlarm(cr, instance.mAlarmId); in updateParentAlarm() local 265 if (alarm == null) { in updateParentAlarm() 270 if (!alarm.daysOfWeek.isRepeating()) { in updateParentAlarm() 271 if (alarm.deleteAfterUse) { in updateParentAlarm() 272 LogUtils.i("Deleting parent alarm: " + alarm.id); in updateParentAlarm() 273 Alarm.deleteAlarm(cr, alarm.id); in updateParentAlarm() 275 LogUtils.i("Disabling parent alarm: " + alarm.id); in updateParentAlarm() 276 alarm.enabled = false; in updateParentAlarm() 277 Alarm.updateAlarm(cr, alarm); in updateParentAlarm() 283 AlarmInstance nextRepeatedInstance = alarm.createInstanceAfter(getCurrentTime()); in updateParentAlarm() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | HandleApiCalls.java | 123 public static void dismissAlarm(Alarm alarm, Activity activity) { in dismissAlarm() argument 126 context.getContentResolver(), alarm.id); in dismissAlarm() 232 for (Alarm alarm : matchingAlarms) { in doInBackground() 233 dismissAlarm(alarm, mActivity); in doInBackground() 234 LOGGER.i("Alarm dismissed: " + alarm); in doInBackground() 351 final Alarm alarm; in handleSetAlarm() local 354 alarm = alarms.get(0); in handleSetAlarm() 355 alarm.enabled = true; in handleSetAlarm() 356 Alarm.updateAlarm(cr, alarm); in handleSetAlarm() 359 AlarmStateManager.deleteAllInstances(this, alarm.id); in handleSetAlarm() [all …]
|
D | AlarmSelectionActivity.java | 80 final Alarm alarm = (Alarm) parcelable; in onCreate() local 83 final String label = String.format(Locale.US, "%d %02d", alarm.hour, alarm.minutes); in onCreate() 84 mSelections.add(new AlarmSelection(label, alarm)); in onCreate() 95 final Alarm alarm = selection.getAlarm(); in onListItemClick() local 96 if (alarm != null) { in onListItemClick() 97 new ProcessAlarmActionAsync(alarm, this, mAction).execute(); in onListItemClick() 108 public ProcessAlarmActionAsync(Alarm alarm, Activity activity, int action) { in ProcessAlarmActionAsync() argument 109 mAlarm = alarm; in ProcessAlarmActionAsync()
|
D | FetchMatchingAlarmsAction.java | 94 for (Alarm alarm : mAlarms) { in run() 95 if (alarm.hour == hour24 && alarm.minutes == minutes) { in run() 96 mMatchingAlarms.add(alarm); in run() 107 for (Alarm alarm : mAlarms) { in run() 109 AlarmInstance.getNextUpcomingInstanceByAlarmId(cr, alarm.id); in run() 112 mMatchingAlarms.add(alarm); in run() 147 for (Alarm alarm : mAlarms) { in run() 148 if (alarm.label.contains(label)) { in run() 149 mMatchingAlarms.add(alarm); in run()
|
D | AlarmClockFragment.java | 264 public void setLabel(Alarm alarm, String label) { in setLabel() argument 265 alarm.label = label; in setLabel() 266 mAlarmUpdateHandler.asyncUpdateAlarm(alarm, false, true); in setLabel() 278 final Alarm alarm = new Alarm(data); in onLoadFinished() local 279 final AlarmInstance alarmInstance = alarm.canPreemptivelyDismiss() in onLoadFinished() 282 new AlarmItemHolder(alarm, alarmInstance, mAlarmTimeClickHandler); in onLoadFinished()
|
D | DeskClockBackupAgent.java | 122 for (Alarm alarm : alarms) { in processRestoredData() 125 AlarmStateManager.deleteAllInstances(context, alarm.id); in processRestoredData() 127 if (alarm.enabled) { in processRestoredData() 129 AlarmInstance alarmInstance = alarm.createInstanceAfter(now); in processRestoredData()
|
D | LabelDialogFragment.java | 67 public static LabelDialogFragment newInstance(Alarm alarm, String label, String tag) { in newInstance() argument 70 args.putParcelable(ARG_ALARM, alarm); in newInstance() 197 void onDialogLabelSet(Alarm alarm, String label, String tag); in onDialogLabelSet() argument
|
D | Utils.java | 337 final String alarm = getNextAlarm(context); in refreshAlarm() local 338 if (!TextUtils.isEmpty(alarm)) { in refreshAlarm() 339 final String description = context.getString(R.string.next_alarm_description, alarm); in refreshAlarm() 340 nextAlarmView.setText(alarm); in refreshAlarm()
|
/packages/apps/DeskClock/src/com/android/deskclock/provider/ |
D | Alarm.java | 113 public static ContentValues createContentValues(Alarm alarm) { in createContentValues() argument 115 if (alarm.id != INVALID_ID) { in createContentValues() 116 values.put(ClockContract.AlarmsColumns._ID, alarm.id); in createContentValues() 119 values.put(ENABLED, alarm.enabled ? 1 : 0); in createContentValues() 120 values.put(HOUR, alarm.hour); in createContentValues() 121 values.put(MINUTES, alarm.minutes); in createContentValues() 122 values.put(DAYS_OF_WEEK, alarm.daysOfWeek.getBits()); in createContentValues() 123 values.put(VIBRATE, alarm.vibrate ? 1 : 0); in createContentValues() 124 values.put(LABEL, alarm.label); in createContentValues() 125 values.put(DELETE_AFTER_USE, alarm.deleteAfterUse); in createContentValues() [all …]
|
D | ClockDatabaseHelper.java | 163 final Alarm alarm = new Alarm(); in onUpgrade() local 164 alarm.id = cursor.getLong(0); in onUpgrade() 165 alarm.hour = cursor.getInt(1); in onUpgrade() 166 alarm.minutes = cursor.getInt(2); in onUpgrade() 167 alarm.daysOfWeek = Weekdays.fromBits(cursor.getInt(3)); in onUpgrade() 168 alarm.enabled = cursor.getInt(4) == 1; in onUpgrade() 169 alarm.vibrate = cursor.getInt(5) == 1; in onUpgrade() 170 alarm.label = cursor.getString(6); in onUpgrade() 174 alarm.alert = Alarm.NO_RINGTONE_URI; in onUpgrade() 176 alarm.alert = in onUpgrade() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/alarms/dataadapter/ |
D | AlarmItemViewHolder.java | 85 final Alarm alarm = itemHolder.item; in onBindItemView() local 86 bindOnOffSwitch(alarm); in onBindItemView() 87 bindClock(alarm); in onBindItemView() 89 itemView.setContentDescription(clock.getText() + " " + alarm.getLabelOrDefault(context)); in onBindItemView() 92 protected void bindOnOffSwitch(Alarm alarm) { in bindOnOffSwitch() argument 93 if (onOff.isChecked() != alarm.enabled) { in bindOnOffSwitch() 94 onOff.setChecked(alarm.enabled); in bindOnOffSwitch() 98 protected void bindClock(Alarm alarm) { in bindClock() argument 99 clock.setTime(alarm.hour, alarm.minutes); in bindClock() 100 clock.setAlpha(alarm.enabled ? CLOCK_ENABLED_ALPHA : CLOCK_DISABLED_ALPHA); in bindClock() [all …]
|
D | CollapsedAlarmViewHolder.java | 101 final Alarm alarm = itemHolder.item; in onBindItemView() local 104 bindRepeatText(context, alarm); in onBindItemView() 105 bindReadOnlyLabel(context, alarm); in onBindItemView() 106 bindUpcomingInstance(context, alarm); in onBindItemView() 107 bindPreemptiveDismissButton(context, alarm, alarmInstance); in onBindItemView() 110 private void bindReadOnlyLabel(Context context, Alarm alarm) { in bindReadOnlyLabel() argument 111 if (alarm.label != null && alarm.label.length() != 0) { in bindReadOnlyLabel() 112 alarmLabel.setText(alarm.label); in bindReadOnlyLabel() 115 + " " + alarm.label); in bindReadOnlyLabel() 121 private void bindRepeatText(Context context, Alarm alarm) { in bindRepeatText() argument [all …]
|
D | ExpandedAlarmViewHolder.java | 195 final Alarm alarm = itemHolder.item; in onBindItemView() local 198 bindEditLabel(context, alarm); in onBindItemView() 199 bindDaysOfWeekButtons(alarm, context); in onBindItemView() 200 bindVibrator(alarm); in onBindItemView() 201 bindRingtone(context, alarm); in onBindItemView() 202 bindPreemptiveDismissButton(context, alarm, alarmInstance); in onBindItemView() 205 private void bindRingtone(Context context, Alarm alarm) { in bindRingtone() argument 206 final String title = DataModel.getDataModel().getRingtoneTitle(alarm.alert); in bindRingtone() 212 final boolean silent = Utils.RINGTONE_SILENT.equals(alarm.alert); in bindRingtone() 218 private void bindDaysOfWeekButtons(Alarm alarm, Context context) { in bindDaysOfWeekButtons() argument [all …]
|
D | AlarmItemHolder.java | 33 public AlarmItemHolder(Alarm alarm, AlarmInstance alarmInstance, in AlarmItemHolder() argument 35 super(alarm, alarm.id); in AlarmItemHolder()
|
/packages/apps/DeskClock/src/com/android/deskclock/ringtone/ |
D | RingtonePickerActivity.java | 133 public static Intent createAlarmRingtonePickerIntent(Context context, Alarm alarm) { in createAlarmRingtonePickerIntent() argument 136 .putExtra(EXTRA_ALARM_ID, alarm.id) in createAlarmRingtonePickerIntent() 137 .putExtra(EXTRA_RINGTONE_URI, alarm.alert) in createAlarmRingtonePickerIntent() 237 final Alarm alarm = Alarm.getAlarm(cr, mAlarmId); in onPause() local 238 if (alarm != null) { in onPause() 239 alarm.alert = mSelectedRingtoneUri; in onPause() 241 return alarm; in onPause() 245 protected void onPostExecute(Alarm alarm) { in onPause() argument 247 DataModel.getDataModel().setDefaultAlarmRingtoneUri(alarm.alert); in onPause() 251 .asyncUpdateAlarm(alarm, false, true); in onPause() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/widget/selector/ |
D | AlarmSelectionAdapter.java | 53 final Alarm alarm = selection.getAlarm(); in getView() local 56 alarmTime.setTime(alarm.hour, alarm.minutes); in getView() 59 alarmLabel.setText(alarm.label); in getView() 63 if (!alarm.daysOfWeek.isRepeating()) { in getView() 64 daysOfWeek = Alarm.isTomorrow(alarm, Calendar.getInstance()) ? in getView() 69 daysOfWeek = alarm.daysOfWeek.toString(context, weekdayOrder); in getView()
|
D | AlarmSelection.java | 28 public AlarmSelection(String label, Alarm alarm) { in AlarmSelection() argument 30 mAlarm = alarm; in AlarmSelection()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ZenModeSettingsTest.java | 61 String alarm = mContext.getString(R.string.zen_mode_alarms); in testAppend_conditionTrue_shouldAppend() local 65 assertThat(result).contains(alarm); in testAppend_conditionTrue_shouldAppend() 67 assertTrue(result.indexOf(original) < result.indexOf(alarm)); in testAppend_conditionTrue_shouldAppend()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/checker/ |
D | WakeupAlarmAnomalyDetector.java | 129 for (Map.Entry<String, ? extends BatteryStats.Counter> alarm : alarms.entrySet()) { in getWakeupAlarmCountFromUid() 131 && mWakeupBlacklistedTags.contains(alarm.getKey())) { in getWakeupAlarmCountFromUid() 134 int count = alarm.getValue().getCountLocked(BatteryStats.STATS_SINCE_CHARGED); in getWakeupAlarmCountFromUid()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/ |
D | TimeZoneFragment.java | 95 final AlarmManager alarm = (AlarmManager) in onPreferenceTreeClick() local 97 alarm.setTimeZone(preference.getKey()); in onPreferenceTreeClick()
|
/packages/apps/Settings/src/com/android/settings/datetime/ |
D | ZonePicker.java | 247 final AlarmManager alarm = (AlarmManager) activity.getSystemService(Context.ALARM_SERVICE); in onListItemClick() local 248 alarm.setTimeZone(tzId); in onListItemClick()
|
/packages/apps/DeskClock/src/com/android/deskclock/controller/ |
D | ShortcutController.java | 72 final ShortcutInfo alarm = createNewAlarmShortcut(); in updateShortcuts() local 77 Arrays.asList(alarm, timer, stopwatch, screensaver)); in updateShortcuts()
|
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/ |
D | A2dpReceiver.java | 177 boolean alarm = intent.hasExtra(A2DP_ALARM); in onReceive() 178 if (alarm) { in onReceive()
|