Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fe0dcdf authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Add debug logs for checking period

parent f360eff7
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ package foundation.e.blisslauncher.features.weather.worker;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.SystemClock;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.work.ExistingWorkPolicy;
@@ -44,6 +45,7 @@ public class OneShotWeatherRequestWorker extends WeatherRequestWorker {
        long refreshPeriod = Preferences.weatherRefreshIntervalInMs(context);
        long elapsedTime = SystemClock.elapsedRealtime() - Preferences.lastWeatherUpdateTimestamp(context);

        Log.d(TAG, "elapsedTime=" + elapsedTime + " vs refreshPeriod=" + refreshPeriod);
        return refreshPeriod != 0 && elapsedTime >= refreshPeriod;
    }
}