This commit is contained in:
Bradlee Speice
2014-11-22 22:15:54 -05:00
7 changed files with 158 additions and 141 deletions

View File

@ -48,9 +48,9 @@ class RefreshManager(val installers: Collection<Installer>,
val fifteenDaysAgo = Calendar.getInstance().getTime().getTime() - 1296000
fun doReload(enabledDownload: Boolean, lastUpdated: Long,
fun doReload(downloadEnabled: Boolean, lastUpdated: Long,
networkState: Int? = ConnectivityManager.TYPE_DUMMY): Boolean =
if (!enabledDownload || networkState != ConnectivityManager.TYPE_WIFI)
if (!downloadEnabled || networkState != ConnectivityManager.TYPE_WIFI)
false
else if (lastUpdated < fifteenDaysAgo)
true