mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-02-14 17:12:12 -05:00
Merge branch 'update-scheduler-tweaks' into 'master'
Don't require device to be idle for RepoUpdateWorker to run Closes #1794 See merge request fdroid/fdroidclient!1411
This commit is contained in:
@@ -266,7 +266,10 @@ public class PreferencesFragment extends PreferenceFragmentCompat
|
||||
private String getUpdateIntervalSeekbarSummary(int position) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getString(UPDATE_INTERVAL_NAMES[position]));
|
||||
if (nextUpdateCheck < Long.MAX_VALUE) {
|
||||
if (nextUpdateCheck < 0) {
|
||||
sb.append("\n");
|
||||
sb.append(getString(R.string.auto_update_time_past));
|
||||
} else if (nextUpdateCheck < Long.MAX_VALUE) {
|
||||
sb.append("\n");
|
||||
CharSequence nextUpdate = DateUtils.getRelativeTimeSpanString(nextUpdateCheck,
|
||||
System.currentTimeMillis(), DateUtils.MINUTE_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE);
|
||||
|
||||
@@ -87,7 +87,6 @@ class RepoUpdateWorker(
|
||||
NetworkType.UNMETERED
|
||||
}
|
||||
val constraints = Constraints.Builder()
|
||||
.setRequiresDeviceIdle(true)
|
||||
.setRequiresBatteryNotLow(true)
|
||||
.setRequiresStorageNotLow(true)
|
||||
.setRequiredNetworkType(networkType)
|
||||
|
||||
@@ -679,6 +679,7 @@ This often occurs with apps installed via Google Play or other sources, if they
|
||||
<string name="interval_2w">Check for updates every 2 weeks</string>
|
||||
<!-- "updates" as in software updates -->
|
||||
<string name="auto_update_time">Earliest next update: %s</string>
|
||||
<string name="auto_update_time_past">Next update when conditions are fulfilled</string>
|
||||
|
||||
<string name="keep_hour">1 Hour</string>
|
||||
<string name="keep_day">1 Day</string>
|
||||
|
||||
Reference in New Issue
Block a user