and more fixes
* fix content length reading * use float overflow. Expensive, double is used instead * fix invalid cast after click the mission body * use a list for maximum attemps (downloads) * minor clean up (DownloadManager.java) * dont pass SharedPreferences instace to DownloadManager * use a switch instead of checkbox for cross_network_downloads * notify media scanner after deleting a finished download
This commit is contained in:
parent
d647555e3a
commit
f3d4d4747a
12 changed files with 111 additions and 52 deletions
|
|
@ -306,7 +306,12 @@ public class DownloadManagerService extends Service {
|
|||
|
||||
private void handlePreferenceChange(SharedPreferences prefs, String key) {
|
||||
if (key.equals(getString(R.string.downloads_max_retry))) {
|
||||
mManager.updateMaximumAttempts(prefs.getInt(key, 3));
|
||||
mManager.mPrefMaxRetry = Integer.parseInt(
|
||||
prefs.getString(key, getString(R.string.default_max_retry))
|
||||
);
|
||||
mManager.updateMaximumAttempts();
|
||||
} else if (key.equals(getString(R.string.cross_network_downloads))) {
|
||||
mManager.mPrefCrossNetwork = prefs.getBoolean(key, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue