diff options
Diffstat (limited to 'app')
5 files changed, 32 insertions, 18 deletions
diff --git a/app/build.gradle b/app/build.gradle index 1e8d0c8f5..6c8abbdff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -83,7 +83,14 @@ android { applicationIdSuffix ".debug" resValue "string", "provider_authority", "de.danoeh.antennapod.debug.provider" buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey - buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret + buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret + dexcount { + if (project.hasProperty("enableDexcountInDebug")) { + runOnEachPackage enableDexcountInDebug.toBoolean() + } else { // default to not running dexcount + runOnEachPackage false + } + } } release { resValue "string", "provider_authority", "de.danoeh.antennapod.provider" @@ -173,7 +180,7 @@ dependencies { implementation "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" implementation 'com.github.mfietz:fyydlin:v0.3' - implementation 'com.github.ByteHamster:SearchPreference:v1.0.3' + implementation 'com.github.ByteHamster:SearchPreference:v1.0.8' androidTestImplementation "com.jayway.android.robotium:robotium-solo:$robotiumSoloVersion" } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index 85abdd281..bae77d58b 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -534,14 +534,15 @@ public class QueueFragment extends Fragment { private void refreshInfoBar() { String info = queue.size() + getString(R.string.episodes_suffix); if(queue.size() > 0) { - long duration = 0; + long timeLeft = 0; for(FeedItem item : queue) { if(item.getMedia() != null) { - duration += item.getMedia().getDuration(); + timeLeft += item.getMedia().getDuration() - item.getMedia().getPosition(); } } info += " \u2022 "; - info += Converter.getDurationStringLocalized(getActivity(), duration); + info += getString(R.string.time_left_label); + info += Converter.getDurationStringLocalized(getActivity(), timeLeft); } infoBar.setText(info); } 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 31a31adb4..9bb0edeb2 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java @@ -37,6 +37,7 @@ import android.widget.Toast; import com.afollestad.materialdialogs.MaterialDialog; +import com.bytehamster.lib.preferencesearch.SearchConfiguration; import com.bytehamster.lib.preferencesearch.SearchPreference; import de.danoeh.antennapod.activity.AboutActivity; import de.danoeh.antennapod.activity.ImportExportActivity; @@ -561,32 +562,33 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc final AppCompatActivity activity = ui.getActivity(); SearchPreference searchPreference = (SearchPreference) ui.findPreference("searchPreference"); - searchPreference.setActivity(activity); - searchPreference.setFragmentContainerViewId(R.id.content); - searchPreference.setBreadcrumbsEnabled(true); + SearchConfiguration config = searchPreference.getSearchConfiguration(); + config.setActivity(activity); + config.setFragmentContainerViewId(R.id.content); + config.setBreadcrumbsEnabled(true); - searchPreference.index() + config.index() .addBreadcrumb(getTitleOfPage(R.xml.preferences_user_interface)) .addFile(R.xml.preferences_user_interface); - searchPreference.index() + config.index() .addBreadcrumb(getTitleOfPage(R.xml.preferences_playback)) .addFile(R.xml.preferences_playback); - searchPreference.index() + config.index() .addBreadcrumb(getTitleOfPage(R.xml.preferences_network)) .addFile(R.xml.preferences_network); - searchPreference.index() + config.index() .addBreadcrumb(getTitleOfPage(R.xml.preferences_storage)) .addFile(R.xml.preferences_storage); - searchPreference.index() + config.index() .addBreadcrumb(getTitleOfPage(R.xml.preferences_network)) .addBreadcrumb(R.string.automation) .addBreadcrumb(getTitleOfPage(R.xml.preferences_autodownload)) .addFile(R.xml.preferences_autodownload); - searchPreference.index() + config.index() .addBreadcrumb(getTitleOfPage(R.xml.preferences_integrations)) .addBreadcrumb(getTitleOfPage(R.xml.preferences_gpodder)) .addFile(R.xml.preferences_gpodder); - searchPreference.index() + config.index() .addBreadcrumb(getTitleOfPage(R.xml.preferences_integrations)) .addBreadcrumb(getTitleOfPage(R.xml.preferences_flattr)) .addFile(R.xml.preferences_flattr); diff --git a/app/src/main/res/xml/preferences_autodownload.xml b/app/src/main/res/xml/preferences_autodownload.xml index 037e92d75..b5e3182f0 100644 --- a/app/src/main/res/xml/preferences_autodownload.xml +++ b/app/src/main/res/xml/preferences_autodownload.xml @@ -1,11 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto"> + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:search="http://schemas.android.com/apk/com.bytehamster.lib.preferencesearch"> <de.danoeh.antennapod.preferences.MasterSwitchPreference android:key="prefEnableAutoDl" android:title="@string/pref_automatic_download_title" + search:summary="@string/pref_automatic_download_sum" android:defaultValue="false"/> <ListPreference android:defaultValue="25" diff --git a/app/src/main/res/xml/preferences_network.xml b/app/src/main/res/xml/preferences_network.xml index 05f960219..0ab8e5866 100644 --- a/app/src/main/res/xml/preferences_network.xml +++ b/app/src/main/res/xml/preferences_network.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto"> + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:search="http://schemas.android.com/apk/com.bytehamster.lib.preferencesearch"> <PreferenceCategory android:title="@string/automation"> <Preference android:key="prefAutoUpdateIntervall" @@ -16,7 +17,8 @@ <Preference android:summary="@string/pref_automatic_download_sum" android:key="prefAutoDownloadSettings" - android:title="@string/pref_automatic_download_title" /> + android:title="@string/pref_automatic_download_title" + search:ignore="true" /> </PreferenceCategory> <PreferenceCategory android:title="@string/download_pref_details"> |