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:
kapodamy 2018-11-24 00:14:37 -03:00
parent 3357fc0f17
commit 6d4e97a877
12 changed files with 111 additions and 52 deletions

View file

@ -176,6 +176,17 @@
<string name="default_file_charset_value" translatable="false">@string/charset_most_special_characters_value</string>
<string name="downloads_max_retry" translatable="false">downloads_max_retry</string>
<string-array name="downloads_max_retry_list" translatable="false">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>7</item>
<item>10</item>
<item>15</item>
</string-array>
<string name="default_max_retry" translatable="false">3</string>
<string name="cross_network_downloads" translatable="false">cross_network_downloads</string>

View file

@ -29,14 +29,15 @@
android:summary="@string/settings_file_replacement_character_summary"
android:title="@string/settings_file_replacement_character_title"/>
<SeekBarPreference
<ListPreference
android:defaultValue="@string/default_max_retry"
android:entries="@array/downloads_max_retry_list"
android:entryValues="@array/downloads_max_retry_list"
android:key="@string/downloads_max_retry"
android:max="15"
android:summary="@string/max_retry_desc"
android:title="@string/max_retry_msg" />
<CheckBoxPreference
<SwitchPreference
android:defaultValue="false"
android:key="@string/cross_network_downloads"
android:summary="@string/pause_downloads_on_mobile_desc"