LeebeeDev / kraigsandroid

Automatically exported from code.google.com/p/kraigsandroid
0 stars 0 forks source link

Patch attached - Coloured alarm icons if snoozing or alarm due in 15 mins #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Depends on patches in issue 70

This patch will colour the alarm icons on the alarms screen:

Yellow, if the alarm is due in the next 15 minutes inclusive

Red if the alarm is firing and has been snoozed.

The logic for the red needs verifying - it basically checks if the next firing 
time is NOT the same as the next scheduled time. For some reason, these times 
even if nominally the same can differ by some milliseconds, so the comparison 
is done at the seconds level. I am not too happy with this, but as a start, it 
superficially seems to work. I wonder if there might be edge cases that break???

Original issue reported on code.google.com by tjwatts...@gmail.com on 18 Mar 2012 at 1:46

Attachments:

GoogleCodeExporter commented 9 years ago
OK - not happy with the above.

This is a supplementary patch which says:

"If the abs() time difference in millisecs between firing and scheduled is >= 
60000 (a minute) then we have an active alarm."

Original comment by tjwatts...@gmail.com on 19 Mar 2012 at 8:35

Attachments:

GoogleCodeExporter commented 9 years ago
I'll just add - if anyone wants to see these features in action, you are 
welcome to try my build:

http://android.dionic.net/packages/AlarmKlock-07tw.apk

1) You'll need to allow non market apps to install

2) You'll need to remove the market installed version before you can install 
this. I advise backing up your alarm settings with Titanium Backup or similar 
as removal WILL LOSE your alarm settings.

This is a preview - it is not a fork of Craig's code. It is just my development 
branch as as such the app will have the same package name internally, but will 
show as "Alarm Klock (TJW)".

It is data compatible with Craig's official build so switching back should not 
be a problem :)

Cheers,

Tim

Original comment by tjwatts...@gmail.com on 19 Mar 2012 at 12:40