History log of /packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b76aa50f9e13e71e81b9d02cc3ebebaa73188d3e 14-Jan-2016 James Lemieux <jplemieux@google.com> Fix alarm not firing in memory-pressure situations

Bug: 25846551

The original form of the code that fires an alarm is:
AlarmManager -> BroadcastReceiver -> Service.

The new form of the code that fires an alarm is:
AlarmManager -> Service.

Evidence exists that the system lowmemorykiller may elect to kill the
clock app after BroadcastReceiver.onReceive(...) completes but before
Service.onStartCommand(...) begins. When this occurs, the results are
disastrous as the clock fails to fire at the appropriate time.

To remove this possibility, all alarm state changes are delivered to the
Service. The methods that manipulate database state within
BroadcastReceiver have been made public and static and are called
directly from the Service to perform the same work as before. If the
alarm state transition is to the FIRING state, the AlarmService also
performs the work of posting the firing notification in the foreground.
All of this occurs during the handling of a single Intent on the same
thread within the service which should no longer provide
lowmemorykiller with any opportunities to prevent the firing of an alarm
by killing the clock app.

Change-Id: I3629a5b725a758f680f41611939a5bbeec23238a
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
cc5cc176779dbe49bab2d3178d6f3f0258f33b74 09-Dec-2015 James Lemieux <jplemieux@google.com> Attempt to avoid early death of AlarmService

Bug: 26058053

Evidence shows that AlarmService is being destroyed a couple 100
milliseconds after starting. This can be catastrophic as it typically
means that the ringtone playback is ended before it even sounds.

This CL balances the binding/unbinding calls in AlarmActivity to
AlarmService to encourage the UI to stay in the foreground and
keep the service alive and the ringtone playing.

This CL also removes unnecessary cancel()ations of notifications.

Change-Id: I59b35dc8404dbd1f8d74285aa34a7cd81ec5545b
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
8c73b644cc471fd432c2ad81541decb909dc57c9 13-Oct-2015 Annie Chin <afchin@google.com> Use startForeground() for firing alarm notification in AlarmService.

Bug: 24584260
Change-Id: I92f5299ca96b9db9fa5de2d82144caae68a7b4f9
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
595e6b8c56a6810d0d3bd09669ae314fe0d5a902 03-Sep-2015 Annie Chin <afchin@google.com> Handle minor Alarm updates properly.

Bug: 23776955

Update AlarmInstance database information after minor updates.
Update any existing notifications in case the label has changed.
Do not delete or set up new AlarmInstances on minor updates.

Change-Id: I95b63ebed104ba3126d329369cdc6fb8d289f23c
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
381f4f17c8b2d4f0aac35eca56a315d129c5fb1e 16-Jul-2015 Annie Chin <afchin@google.com> Implement preemptive dismiss from the alarms tab.

Bug: 20950181
Bug: 21915450

The CursorLoader now reads from a table that is a join of the Alarms
and AlarmInstances databases.
Preemptive dismiss option only appears if alarm is within 2 hours of
firing or snoozed.
Minor layout adjustments in order to accommodate the two additional
Views (one each for expand/collapse states).

Change-Id: Ieb5f70414a87e912fc631459b03788594d3425a0
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
fd8f7c8412ed802088be99d78366ed31e1c69b0e 11-Jun-2015 Annie Chin <afchin@google.com> Add null check in AlarmStateManager for handleIntent SHOW_AND_DISMISS.

Bug: 21756258

Also dismiss the notification for the now-invalid AlarmInstance using
a passed-in notification id.

Change-Id: I7a46d1b5893589cf13012757ddf3388c9e57a815
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
f855d573817c0437b6b84aa6a743e65b9d10f476 08-Jun-2015 Annie Chin <afchin@google.com> Add PREDISMISSED_STATE.

Bug: 21492917

Add state to ClockContract.
Add initial handling for new state in appropriate places: notifications,
voice actions.
Add method to AlarmStateManager to handle transitions to new state.
(For now, fall through to dismiss behavior)

Change-Id: I3619b5181cd9d2517e154cbaad9f64634847fda0
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
50ab55f5778342f83d0fcb2e6b2c3e8cae91ca8a 09-May-2015 James Lemieux <jplemieux@google.com> Add uniform event tracking to DeskClockGoogle

DeskClock has now been littered with calls of the form:
Events.sendEvent(category, action, label);

DeskClockApplication handles these events by logging them with a
uniform log tag.

Category is one of: Alarm, Clock, Timer, Stopwatch
Action describes what happened: e.g. create, delete, snooze, dismiss, etc.
Label describes where the action originated: DeskClock, Notification,
Wear, Intent, Voice

Bug: 20038553
Change-Id: Ia2485582e9da9e37a6858db3b61a68c9102c778d
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
8ddd5e64eb750c41e8e472a769b96a8fe0b6b2d7 21-Apr-2015 Selim Cinek <cinek@google.com> Fixed a bug where the statusbar would close

When a the alarm notification was shown, we sent a broadcast
to hide all panels, but the notification would become heads
uped and therefore invisible. We now hide all panels when
showing the alarm activity.

Bug: 20322055
Change-Id: Iab836643464d46b57a11ad015bbbbabf9bd1686c
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
7f5209b10f08a3919245552516e60b4f07982a04 27-Feb-2015 Annie Chin <afchin@google.com> Update snooze notification icon (white for pre-L, tint for L+)

Also rename all notification pngs to follow the convention
ic_NAME_COLOR_DP.png and all notification drawables as ic_NAME_DP.xml

Bug: 19458148
Change-Id: I7da333e4715d84f5c59dbc8be2c62ef24b3176d8
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
e3764d106d3ff760270219747ce23b7837ff79ff 27-Feb-2015 Justin Klaassen <justinklaassen@google.com> Fix alarm_activity dismiss icon

Renamed icons according to the convention:
ic_$NAME_$COLOR_$SIZE.png

Change-Id: I409a3a2d28e238ef2ce8ab30abd403073ae6f01d
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
0375d600d259a2270564221030c44d915b28c358 25-Feb-2015 Annie Chin <afchin@google.com> Update icons for pre-L stopwatch/alarm notifications.

white notification icons for pre-L; icons tinted for L+.
Use NotificationCompat in StopwatchService.

Bug: 19458148
Change-Id: I4825462e3192185bca8016179f50e158bb279433
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
86add3e7ce11282d154ced319b5ba1febffd5064 24-Feb-2015 Justin Klaassen <justinklaassen@google.com> Use NotificationCompat for alarm notifications

Bug: 19486309
Change-Id: Iff9e6e45231dc9305759a5b6f1ba23deace38aa7
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
e2ce410438088a3ea251f6e437c0515cb86f0ae4 06-Feb-2015 Annie Chin <afchin@google.com> Remove DeskClockGoogleExtensions.

Change-Id: I848cd636ea16614b0b868509b554dff75a403264
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
24a61f7e5abcb20579233bdaca6945a608b9e8c1 03-Feb-2015 Annie Chin <afchin@google.com> Merge "Refactor a bit of DeskClockGoogleExtension functionality." into ub-deskclock-army
db25685d5bfa66c29e7134a7b85913a5266027b1 02-Feb-2015 Annie Chin <afchin@google.com> Refactor a bit of DeskClockGoogleExtension functionality.

Bug: 19216709

Change-Id: Ib123a0c559e45642954851a5c5956ccbb9e41188
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
d77967b768d6fa7d1c2daa7d40e11a584513c464 31-Jan-2015 Annie Chin <afchin@google.com> Add a broadcast intent so pre-L AppWidgets can see "nextalarm" changes.

Bug: 19200823

Change-Id: I19b53ef240e3a0175fd00c8525def087811f42ab
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
3ae732eb96e2e1becc7ff6591690fefdcb2d62d0 30-Jan-2015 Annie Chin <afchin@google.com> Enable "next alarm" tracking for pre-L.

Bug: 19200823
Change-Id: I216b68221ef6898b09b6733d1c89d2c92529da4f
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
f2ab305768026f2a55eed2992624fb1fcf4d1569 28-Jan-2015 Annie Chin <afchin@google.com> Expand DeskClockExtensions functionality

Change-Id: Ic17ea852caef61d579c5fe3a1a317812c3c09c79
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
b6ab4dc665dbf9003641d828fb8ce7fcaa984174 16-Jan-2015 Annie Chin <afchin@google.com> Wear notifications for companion alarms are now wear responsibility.

Change-Id: Ibb26a0fd6791b0d1b185a902db6f3cd6238940ab
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
7e6864814023f0a35f90cc16042bc3ff96eba86c 06-Jan-2015 Annie Chin <afchin@google.com> Add contentaction to upcoming alarm notifications.

The contentaction will send a "SHOW_ALL_ALARMS" message to the wear.

Refactor DeskClockExtensions.

Change-Id: Ia7b5914fc22ab04f457861704c6dfb3b2a5dcda6
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
96fd82995fecb612d7651efd1e7c361d1f14fafe 27-Nov-2014 Annie Chin <afchin@google.com> Enable corresponding notifications on the watch for phone alarms.

All phone alarm notifications are now dismissable.

Change-Id: I95a2bdd6bbf7bbd4fbe712e6f0d3a2bbbbc029ed
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
86097d8e86ef480d0aeb7475e22d27d33e1a1e87 14-Oct-2014 Budi Kusmiantoro <budi@google.com> Set deskclock notifications to local only

Bug: 14683075
Change-Id: Ie3d8843223196e672e5324ef51b9bafdf1727a82
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
b4aacfb276d66f2bf02691e56d0d20fe6bab31a4 14-Oct-2014 Budi Kusmiantoro <budi@google.com> Allow snooze/dismiss to always go through

Bug: 17847960
Change-Id: I88413feaccaec10b8c049f9ae5d894c181a1dfd6
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
49e5e2526ea6ba3ec56247d04bd8158f560a6074 02-Oct-2014 Budi Kusmiantoro <budi@google.com> Show alarm/timer notifications on lockscreen

Bug: 17509785
Change-Id: Ic9a0755e629012b5a5b04d2e0728a5ad664b6e72
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
cdbb71b08c13c84af850f4036febc0b90dcfcc7d 12-Sep-2014 Justin Klaassen <justinklaassen@google.com> Improve AlarmActivity logging

Bug: 17481822

- In order to better debug alarm firing issues, improve the log utility to
log verbosely on engineering builds and to respect the current logging level.
- Add more verbose logs to AlarmActivity.

Change-Id: I8355a335c4ada84baa2e6aa6d368f3a69e7b4b98
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
75691afe7bd7aa1bbe3286708d2305e6871d15aa 28-Aug-2014 Justin Klaassen <justinklaassen@google.com> Update alarm notification icons

Bug: 17300374

- Also removed all unused drawable resources.

Change-Id: Ie6eb573ca6bf17798cd4dd045b570cddfcbe0aac
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
b157a2dd7a189aa30fd6d79ee5a2b0fad952e31e 13-Aug-2014 Jose Lima <joselima@google.com> Made AlarmClockInfo a nested class in AlarmManager

Bug: 16959028

Change-Id: I7a56627306e05489bbe042789320717934a5b213
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
692718499fc480f29a9aabcc3cb38ba6bb7847ce 21-Jul-2014 Budi Kusmiantoro <budi@google.com> Alarms and Timers should use Notification.CATEGORY_ALARM

Bug: 16457077
Change-Id: I71b133fd94fca00967a46279fe98bf10c6962607
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
c0743272ad924bc97d335d695be3e6b32a83dd7d 09-Jul-2014 Adrian Roos <roosa@google.com> Migrate DeskClock to AlarmManager.setAlarmClock

Updates AlarmNotifications to set alarm info via
the new AlarmManager API.

Bug: 14589952
Change-Id: I50099a8b6241b32afedbd32c034c4c7ac19373b0
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
6806f6761dd6c10df03ad0c564a4c741a70244e0 12-Sep-2013 Paul Sliwowski <psliwowski@google.com> Fixed scroll to view.

Bug: 10681753

Change-Id: Idcf79eb4297cf7cdf05c299e8c0aad9d7bb858a0
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
20dccf1991285ab46670521cea5adbc795b5be5e 11-Sep-2013 Paul Sliwowski <psliwowski@google.com> Fix a few alarm state manager issues.

- Prevent missed notification from starting app.
- Fix alarmId issues on notifications.
- Fix issue with missed alarms being re-enabled after timezone change.
- Fix issue with missed alarm notification not dismissing properly.
- Remove alarm noise on missed notification
- Added safe guard to prevent duplicate alarm instances.

Change-Id: Id9dd65e6ec59df1e6952c8a892022d20a09eb5a5
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java
ab0d28c68a77bea2a4a2ee50378da3670a1dd939 27-Aug-2013 Paul Sliwowski <psliwowski@google.com> Refactor alarm manager code to use new Instance table.

Change-Id: If0ef94f68383ebfcb4a0af697671c7854f33383d
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmNotifications.java