diff options
author | Tom Hennen <tom.hennen@gmail.com> | 2015-01-05 21:23:21 -0500 |
---|---|---|
committer | Tom Hennen <tom.hennen@gmail.com> | 2015-01-05 21:23:21 -0500 |
commit | 1b9c96bc7664adeb12ffd0267c76a4667b25311f (patch) | |
tree | 6a105f8ab1a7468f61f7d35d57de45fb3043a4bb /app/src/main/java/de | |
parent | 9ece3a7db4949455cbaf0127e3eea3c4c739f9b1 (diff) | |
download | AntennaPod-1b9c96bc7664adeb12ffd0267c76a4667b25311f.zip |
Add ability to only do autodl when charging.
Defaults to allow autodl on battery to preserve existing behavior.
Might be a good idea to add a receiver for the intent similar to
ConnectivityActionReceiver as this will allow us to start/stop
downloads as needed.
Diffstat (limited to 'app/src/main/java/de')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java index cbd5c0f29..ffac05321 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java @@ -195,6 +195,7 @@ public class PreferenceController { if (newValue instanceof Boolean) { ui.findPreference(UserPreferences.PREF_ENABLE_AUTODL_WIFI_FILTER).setEnabled((Boolean) newValue); setSelectedNetworksEnabled((Boolean) newValue && UserPreferences.isEnableAutodownloadWifiFilter()); + ui.findPreference(UserPreferences.PREF_ENABLE_AUTODL_ON_BATTERY).setEnabled((Boolean) newValue); } return true; } @@ -376,6 +377,8 @@ public class PreferenceController { setSelectedNetworksEnabled(UserPreferences.isEnableAutodownload() && UserPreferences.isEnableAutodownloadWifiFilter()); + ui.findPreference(UserPreferences.PREF_ENABLE_AUTODL_ON_BATTERY) + .setEnabled(UserPreferences.isEnableAutodownload()); } private void setEpisodeCacheSizeText(int cacheSize) { |