forked from I2P_Developers/i2p.i2p
- Lots of fixes for notifying when updates and checks are complete
- Fixes for NewsHelper stored timestamps - Add getProperty(String, long) to context for sanity - New methods and types - Logging improvements - Add failsafe TaskCleaner
This commit is contained in:
@ -8,11 +8,15 @@ import java.util.List;
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.router.web.ConfigUpdateHelper;
|
||||
import net.i2p.update.*;
|
||||
import static net.i2p.update.UpdateType.*;
|
||||
import static net.i2p.update.UpdateMethod.*;
|
||||
|
||||
/**
|
||||
* Task to periodically look for updates to the news.xml, and to keep
|
||||
* track of whether that has an announcement for a new version.
|
||||
*
|
||||
* Overrides UpdateRunner for convenience, this is not an Updater
|
||||
*
|
||||
* @since 0.9.4 moved from NewsFetcher
|
||||
*/
|
||||
class NewsHandler extends UpdateHandler implements Checker {
|
||||
@ -31,8 +35,8 @@ class NewsHandler extends UpdateHandler implements Checker {
|
||||
*/
|
||||
public UpdateTask check(UpdateType type, UpdateMethod method,
|
||||
String id, String currentVersion, long maxTime) {
|
||||
if ((type != UpdateType.ROUTER_SIGNED && type != UpdateType.ROUTER_SIGNED_PACK200 && type != UpdateType.NEWS) ||
|
||||
method != UpdateMethod.HTTP)
|
||||
if ((type != ROUTER_SIGNED && type != ROUTER_SIGNED_PACK200 && type != NEWS) ||
|
||||
method != HTTP)
|
||||
return null;
|
||||
List<URI> updateSources = new ArrayList(2);
|
||||
try {
|
||||
|
Reference in New Issue
Block a user