diff options
author | DvTonder <david.vantonder@gmail.com> | 2013-01-08 16:25:09 -0500 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2013-01-18 09:27:54 +0100 |
commit | 1dc51e521b868dcda27fad1d93a041913b0efa38 (patch) | |
tree | 84a66c94e1f372990be3de05af2d831f0db2a3f9 /src/com/cyanogenmod/lockclock/misc/Constants.java | |
parent | f9c9c2850954bca9023993bf22a1355a40779835 (diff) | |
download | android_packages_apps_LockClock-1dc51e521b868dcda27fad1d93a041913b0efa38.tar.gz android_packages_apps_LockClock-1dc51e521b868dcda27fad1d93a041913b0efa38.tar.bz2 android_packages_apps_LockClock-1dc51e521b868dcda27fad1d93a041913b0efa38.zip |
Chronus: Optimize widget loading/display
Completely refactors the Calendar handling and changes the refresh
interval from every minute to the minimum of either the next weather
refresh or the next event start/end.
It also now detects more events (new calendar entry, deleted calendar
entry, location change, timezone change etc)
Patch set 7 : Change the startup of the provider to only update the
required panels on enabling the appwigdet and updates
This further reduces the number of times the widget
refreshes itself, now limited only to actual events
Patch set 8 : Change the weather refresh time to be absolute, not
relative to current time
Patch set 9 : Refactor the calendar to use a CalendarInfo class that
maintains a static list of events. This allows the
refreshing of the lock screen widget without querying
the calendar provider every time the screen turns on
Patch set 10: Simplified onReceive loading/updating of widget with
additional tweaks to handling deleted widgets and
a fix to the refresh timer calculations including a
check of the lookahead window.
Patch set 11: Change the alarmservice to wake the CPU and do the
update if the device is sleeping. This way, since the
updates are so infrequent now, it makes sense to ensure
things are updated (if needed) when the user turns the
screen on after a while.
Patch set 12: Change application ID to an ID registered for Chronus
Patch set 13: Store the returned WOEID in sharedPreferences it if its
valid and retrieve the previously stored one if not. This
allows for the querying of weather data even though the
Yahoo Placefinder service API limit has been exceeded and
it returns an invalid XML result on geocode query.
Patch set 14: Add a flag to determine when we want the real placefinder
result or the cached result is also OK
Patch set 15: Final comments and code formatting cleanup
Patch set 16: Factor out weather fetching to separate service to
decouple weather fetching from widget update. Also
optimize a lot of code.
Patch set 17: Fix alarms refresh and optimize calendar query and weather
refresh behaviour.
Patch set 18: Unify debug flags
Change-Id: I0496dad356c92fb26ad7289268327b27b365b6cd
Diffstat (limited to 'src/com/cyanogenmod/lockclock/misc/Constants.java')
-rw-r--r-- | src/com/cyanogenmod/lockclock/misc/Constants.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/cyanogenmod/lockclock/misc/Constants.java b/src/com/cyanogenmod/lockclock/misc/Constants.java index 4834d07..e7a2c0a 100644 --- a/src/com/cyanogenmod/lockclock/misc/Constants.java +++ b/src/com/cyanogenmod/lockclock/misc/Constants.java @@ -17,11 +17,9 @@ package com.cyanogenmod.lockclock.misc; public class Constants { - public static final String PREF_NAME = "LockClock"; - public static final String PREFERENCES_CHANGED = "preferences_changed"; + public static final boolean DEBUG = false; - // Activity start commands - public static final String FORCE_REFRESH = "force_refresh"; + public static final String PREF_NAME = "LockClock"; // Widget Settings public static final String CLOCK_DIGITAL = "clock_digital"; @@ -39,6 +37,7 @@ public class Constants { public static final String WEATHER_INVERT_LOWHIGH = "weather_invert_lowhigh"; public static final String WEATHER_REFRESH_INTERVAL = "weather_refresh_interval"; public static final String WEATHER_USE_ALTERNATE_ICONS = "weather_use_alternate_icons"; + public static final String WEATHER_WOEID = "weather_woeid"; public static final String SHOW_CALENDAR = "show_calendar"; public static final String CALENDAR_LIST = "calendar_list"; @@ -48,5 +47,9 @@ public class Constants { public static final String CALENDAR_SHOW_LOCATION = "calendar_show_location"; public static final String CALENDAR_SHOW_DESCRIPTION = "calendar_show_description"; + // other shared pref entries + public static final String WEATHER_LAST_UPDATE = "last_weather_update"; + public static final String WEATHER_DATA = "weather_data"; + public static final int MAX_CALENDAR_ITEMS = 3; } |