Extract scheduleRegularReboot() into a method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5604 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -59,14 +59,24 @@ public abstract class RebootManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish initialization of the manager.
|
||||
* Finishes initialization of the manager.
|
||||
*/
|
||||
public void init ()
|
||||
{
|
||||
scheduleRegularReboot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules our next regularly scheduled reboot.
|
||||
*
|
||||
* @return true if a reboot was scheduled, false if regularly scheduled reboots are disabled.
|
||||
*/
|
||||
public boolean scheduleRegularReboot ()
|
||||
{
|
||||
// maybe schedule an automatic reboot based on our configuration
|
||||
int freq = getDayFrequency();
|
||||
if (freq == -1) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
@@ -95,6 +105,7 @@ public abstract class RebootManager
|
||||
}
|
||||
|
||||
scheduleReboot(cal.getTimeInMillis(), "automatic");
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user