History log of /packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0f5bb7f76c3e77a62e43cefce0444d447ae40f03 10-Jan-2017 Sean Stout <sstout@google.com> Change method of getting initial phone state for listener.

Bug: 34147269
Test: manual - call phone while alarm is going off
Change-Id: Idbec14c57220abcdf9e7c7de9f19b3c862d5bafd
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
a468e79551f292f0bfb217852659c794ee08d663 01-Dec-2016 Sean Stout <sstout@google.com> Add static id for firing alarm notification.

Bug: 32167374
Test: manual - Check snooze and dismiss repeatedly
Change-Id: I237a6a363335359e5fc0619b7bb22e5313aeea34
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
c6b3bbd21c721682bdc07cf44550dcc2b6dc021d 21-Oct-2016 Christine Franks <christyfranks@google.com> Properly handle null intents in AlarmService

Bug: 32272166
Test: looked at code and verified no typos (extremely difficult to repro)
Change-Id: I64e1cd61d6310f3269508bdf05ba76d4cd451134
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
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/AlarmService.java
fd45ba59e248b29d9738bd51b6a4c26d821e44f7 28-Oct-2015 Justin Klaassen <justinklaassen@google.com> Re-post notifs removed when AlarmService is destroyed
am: 460a4e020d

* commit '460a4e020d35ac21b90d2a88c56558d9144991fb':
Re-post notifs removed when AlarmService is destroyed
460a4e020d35ac21b90d2a88c56558d9144991fb 28-Oct-2015 Justin Klaassen <justinklaassen@google.com> Re-post notifs removed when AlarmService is destroyed

Bug: 25319162
Change-Id: Ie9183986e5aab3067ac44f7582323c239aa42063
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
9db86c49abf69c4dc5457973bdfa5288251d058e 22-Oct-2015 Annie Chin <afchin@google.com> Set AlarmInstance to DISMISSED_STATE before instance deletion.

Bug: 24636103
Bug: 25026017

In combination with ag/795890, may help solve the stale notification
issue.

Change-Id: I7f5f9da8cedd102544f7f34efd24b0dc7b8f38e0
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
9da3a43bd894f9a5c3fa1bca6e157cc33648fc4f 17-Jul-2015 James Lemieux <jplemieux@google.com> Fix logging call to correctly substitute

Change-Id: If27f3fa26c9c8b41ce76ae26456c17c1067f0c8d
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
95559b2952cb1f1492355f0ab572d40b8a2d000e 26-Jun-2015 James Lemieux <jplemieux@google.com> Fix remaining dangerous M permissions

android.permission.WRITE_SETTINGS was required to adjust the Setting
that stored the last selected alarm ringtone as the new default. The
value is now stored in SharedPreferences and no longer written to the
Setting. The permission has been removed.

android.permission.READ_EXTERNAL_STORAGE was required to play custom
ringtones located at /sdcard/Alarms via MediaPlayer. MediaPlayer is
no longer used to play those ringtones so the permission has been
removed. Ringtone, which is designed to play custom ringtones without
requiring the permission to read from external storage is now the
playback method. The caveat to this approach is: Ringtone does not
offer control over the volume at which the ringtone is played. Old
MediaPlayer code used to detect when we were in a phone call and
reduce the volume defensively to avoid playing a loud ringtone
directly into a user's ear. In practice, it appears that lower layers
of the audio stack are already handling this behavior and the app
need not request a lower volume itself.

Bug: 20273223
Change-Id: I328d168ff7677506aeae3fdf78c915f82e6cc1c7
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
e66675d8f6bb902f7da39b9486442aa3bf08e1e8 10-Jun-2015 James Lemieux <jplemieux@google.com> Restore audible alarm sounds

A trivial mistake in a recent CL occurred when AlarmService changed
from if statements to a switch statement but neglected an important
break; Consequently, an Alarm would start to make sound and then
immediately be silenced.

Bug: 21741155
Change-Id: I0ff30718157c4d8547618768a0e84c088093fb42
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
51ae3cb1945a99a5c161990a56637c58ac63d22e 10-Jun-2015 James Lemieux <jplemieux@google.com> miscellaneous cleanup in anticipation of permissions work

Change-Id: I7d8be7694365b2d79ca6b423553727063e63c5b6
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.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/AlarmService.java
e43a8d7e1d5f466a1d17b6182c435eba37a3e273 18-Apr-2015 Annie Chin <afchin@google.com> Ensure AlarmActivity destruction in AlarmService.

Change-Id: Iceb66453229c16718dc7ad5a1cec30bd708e3fad
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.java
1ea4674a33c30b4ae977db03c82942bbd5fe900d 03-Apr-2015 Annie Chin <afchin@google.com> Add broadcast receiver in AlarmService to handle snooze/dismiss.

Bug: 18354828
Change-Id: I886d07ce77deb7f29a198886f6f05270ad934b1b
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.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/AlarmService.java
1ded8d5b5236faf0c012f3006009c2829dc56482 04-Oct-2013 Paul Sliwowski <psliwowski@google.com> Stop service when it is not needed.

Bug: 11068604
Change-Id: Ic077d607b329fe34373c347de3234c30e7856306
/packages/apps/DeskClock/src/com/android/deskclock/alarms/AlarmService.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/AlarmService.java