diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d7038444f..8bbe4cdb9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -309,7 +309,7 @@ diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java index de76c4066..72c200231 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java @@ -32,7 +32,7 @@ import de.danoeh.antennapod.R; import de.danoeh.antennapod.adapter.FeedItemlistDescriptionAdapter; import de.danoeh.antennapod.ui.common.ThemeSwitcher; import de.danoeh.antennapod.core.service.download.DownloadRequestCreator; -import de.danoeh.antennapod.core.feed.FeedUrlNotFoundException; +import de.danoeh.antennapod.net.discovery.FeedUrlNotFoundException; import de.danoeh.antennapod.core.storage.FeedDatabaseWriter; import de.danoeh.antennapod.core.service.playback.PlaybackServiceInterface; import de.danoeh.antennapod.core.util.DownloadErrorLabel; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/SelectSubscriptionActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/SelectSubscriptionActivity.java index eeae20899..45a72117d 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/SelectSubscriptionActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/SelectSubscriptionActivity.java @@ -100,7 +100,7 @@ public class SelectSubscriptionActivity extends AppCompatActivity { if (bitmap != null) { icon = IconCompat.createWithAdaptiveBitmap(bitmap); } else { - icon = IconCompat.createWithResource(this, R.drawable.ic_subscriptions_shortcut); + icon = IconCompat.createWithResource(this, R.drawable.ic_shortcut_subscriptions); } ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(this, id) diff --git a/app/src/main/res/layout/nav_listitem.xml b/app/src/main/res/layout/nav_listitem.xml index 47d6e6c00..eb8fa3c1d 100644 --- a/app/src/main/res/layout/nav_listitem.xml +++ b/app/src/main/res/layout/nav_listitem.xml @@ -7,7 +7,7 @@ android:layout_height="@dimen/listitem_iconwithtext_height" android:orientation="vertical" android:layout_marginHorizontal="8dp" - android:background="@drawable/drawer_item_background"> + android:background="@drawable/bg_drawer_item"> >) subscriber -> { try { GpodnetService service = new GpodnetService(AntennapodHttpClient.getHttpClient(), - SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceID(), + SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceId(), SynchronizationCredentials.getUsername(), SynchronizationCredentials.getPassword()); List gpodnetPodcasts = service.searchPodcasts(query, 0); List results = new ArrayList<>(); diff --git a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java index b9df9d185..a50a33452 100644 --- a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java +++ b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java @@ -1,6 +1,5 @@ package de.danoeh.antennapod.net.discovery; -import de.danoeh.antennapod.core.feed.FeedUrlNotFoundException; import de.danoeh.antennapod.net.common.AntennapodHttpClient; import io.reactivex.Single; import io.reactivex.SingleOnSubscribe; diff --git a/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/SynchronizationCredentials.java b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/SynchronizationCredentials.java new file mode 100644 index 000000000..a5613b4ec --- /dev/null +++ b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/SynchronizationCredentials.java @@ -0,0 +1,60 @@ +package de.danoeh.antennapod.storage.preferences; + +import android.content.Context; +import android.content.SharedPreferences; + +/** + * Manages preferences for accessing gpodder.net service and other sync providers + */ +public abstract class SynchronizationCredentials { + private static final String PREF_NAME = "gpodder.net"; + private static final String PREF_USERNAME = "de.danoeh.antennapod.preferences.gpoddernet.username"; + private static final String PREF_PASSWORD = "de.danoeh.antennapod.preferences.gpoddernet.password"; + private static final String PREF_DEVICEID = "de.danoeh.antennapod.preferences.gpoddernet.deviceID"; + private static final String PREF_HOSTNAME = "prefGpodnetHostname"; + + private static SharedPreferences prefs; + + public static void init(Context context) { + prefs = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); + } + + public static String getUsername() { + return prefs.getString(PREF_USERNAME, null); + } + + public static void setUsername(String username) { + prefs.edit().putString(PREF_USERNAME, username).apply(); + } + + public static String getPassword() { + return prefs.getString(PREF_PASSWORD, null); + } + + public static void setPassword(String password) { + prefs.edit().putString(PREF_PASSWORD, password).apply(); + } + + public static String getDeviceId() { + return prefs.getString(PREF_DEVICEID, null); + } + + public static void setDeviceId(String deviceId) { + prefs.edit().putString(PREF_DEVICEID, deviceId).apply(); + } + + public static String getHosturl() { + return prefs.getString(PREF_HOSTNAME, null); + } + + public static void setHosturl(String value) { + prefs.edit().putString(PREF_HOSTNAME, value).apply(); + } + + public static synchronized void clear() { + setUsername(null); + setPassword(null); + setDeviceId(null); + UserPreferences.setGpodnetNotificationsEnabled(); + } +} diff --git a/core/src/main/res/drawable/ic_add.xml b/ui/common/src/main/res/drawable/ic_add.xml similarity index 100% rename from core/src/main/res/drawable/ic_add.xml rename to ui/common/src/main/res/drawable/ic_add.xml diff --git a/core/src/main/res/drawable/ic_appearance.xml b/ui/common/src/main/res/drawable/ic_appearance.xml similarity index 100% rename from core/src/main/res/drawable/ic_appearance.xml rename to ui/common/src/main/res/drawable/ic_appearance.xml diff --git a/core/src/main/res/drawable/ic_arrow_down.xml b/ui/common/src/main/res/drawable/ic_arrow_down.xml similarity index 100% rename from core/src/main/res/drawable/ic_arrow_down.xml rename to ui/common/src/main/res/drawable/ic_arrow_down.xml diff --git a/core/src/main/res/drawable/ic_arrow_right_white.xml b/ui/common/src/main/res/drawable/ic_arrow_right_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_arrow_right_white.xml rename to ui/common/src/main/res/drawable/ic_arrow_right_white.xml diff --git a/core/src/main/res/drawable/ic_bug.xml b/ui/common/src/main/res/drawable/ic_bug.xml similarity index 100% rename from core/src/main/res/drawable/ic_bug.xml rename to ui/common/src/main/res/drawable/ic_bug.xml diff --git a/core/src/main/res/drawable/ic_cancel.xml b/ui/common/src/main/res/drawable/ic_cancel.xml similarity index 100% rename from core/src/main/res/drawable/ic_cancel.xml rename to ui/common/src/main/res/drawable/ic_cancel.xml diff --git a/core/src/main/res/drawable/ic_chapter_next.xml b/ui/common/src/main/res/drawable/ic_chapter_next.xml similarity index 100% rename from core/src/main/res/drawable/ic_chapter_next.xml rename to ui/common/src/main/res/drawable/ic_chapter_next.xml diff --git a/core/src/main/res/drawable/ic_chapter_prev.xml b/ui/common/src/main/res/drawable/ic_chapter_prev.xml similarity index 100% rename from core/src/main/res/drawable/ic_chapter_prev.xml rename to ui/common/src/main/res/drawable/ic_chapter_prev.xml diff --git a/core/src/main/res/drawable/ic_chart_box.xml b/ui/common/src/main/res/drawable/ic_chart_box.xml similarity index 100% rename from core/src/main/res/drawable/ic_chart_box.xml rename to ui/common/src/main/res/drawable/ic_chart_box.xml diff --git a/core/src/main/res/drawable/ic_chat.xml b/ui/common/src/main/res/drawable/ic_chat.xml similarity index 100% rename from core/src/main/res/drawable/ic_chat.xml rename to ui/common/src/main/res/drawable/ic_chat.xml diff --git a/core/src/main/res/drawable/ic_check.xml b/ui/common/src/main/res/drawable/ic_check.xml similarity index 100% rename from core/src/main/res/drawable/ic_check.xml rename to ui/common/src/main/res/drawable/ic_check.xml diff --git a/core/src/main/res/drawable/ic_checkbox_background.xml b/ui/common/src/main/res/drawable/ic_checkbox_background.xml similarity index 100% rename from core/src/main/res/drawable/ic_checkbox_background.xml rename to ui/common/src/main/res/drawable/ic_checkbox_background.xml diff --git a/core/src/main/res/drawable/ic_close_white.xml b/ui/common/src/main/res/drawable/ic_close_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_close_white.xml rename to ui/common/src/main/res/drawable/ic_close_white.xml diff --git a/core/src/main/res/drawable/ic_cloud.xml b/ui/common/src/main/res/drawable/ic_cloud.xml similarity index 100% rename from core/src/main/res/drawable/ic_cloud.xml rename to ui/common/src/main/res/drawable/ic_cloud.xml diff --git a/core/src/main/res/drawable/ic_contribute.xml b/ui/common/src/main/res/drawable/ic_contribute.xml similarity index 100% rename from core/src/main/res/drawable/ic_contribute.xml rename to ui/common/src/main/res/drawable/ic_contribute.xml diff --git a/core/src/main/res/drawable/ic_curved_arrow.xml b/ui/common/src/main/res/drawable/ic_curved_arrow.xml similarity index 100% rename from core/src/main/res/drawable/ic_curved_arrow.xml rename to ui/common/src/main/res/drawable/ic_curved_arrow.xml diff --git a/core/src/main/res/drawable/ic_delete.xml b/ui/common/src/main/res/drawable/ic_delete.xml similarity index 100% rename from core/src/main/res/drawable/ic_delete.xml rename to ui/common/src/main/res/drawable/ic_delete.xml diff --git a/core/src/main/res/drawable/ic_delete_auto.xml b/ui/common/src/main/res/drawable/ic_delete_auto.xml similarity index 100% rename from core/src/main/res/drawable/ic_delete_auto.xml rename to ui/common/src/main/res/drawable/ic_delete_auto.xml diff --git a/core/src/main/res/drawable/ic_disc_alert.xml b/ui/common/src/main/res/drawable/ic_disc_alert.xml similarity index 100% rename from core/src/main/res/drawable/ic_disc_alert.xml rename to ui/common/src/main/res/drawable/ic_disc_alert.xml diff --git a/core/src/main/res/drawable/ic_download.xml b/ui/common/src/main/res/drawable/ic_download.xml similarity index 100% rename from core/src/main/res/drawable/ic_download.xml rename to ui/common/src/main/res/drawable/ic_download.xml diff --git a/core/src/main/res/drawable/ic_download_black.xml b/ui/common/src/main/res/drawable/ic_download_black.xml similarity index 100% rename from core/src/main/res/drawable/ic_download_black.xml rename to ui/common/src/main/res/drawable/ic_download_black.xml diff --git a/core/src/main/res/drawable/ic_error.xml b/ui/common/src/main/res/drawable/ic_error.xml similarity index 100% rename from core/src/main/res/drawable/ic_error.xml rename to ui/common/src/main/res/drawable/ic_error.xml diff --git a/core/src/main/res/drawable/ic_eye.xml b/ui/common/src/main/res/drawable/ic_eye.xml similarity index 100% rename from core/src/main/res/drawable/ic_eye.xml rename to ui/common/src/main/res/drawable/ic_eye.xml diff --git a/core/src/main/res/drawable/ic_fab_edit.xml b/ui/common/src/main/res/drawable/ic_fab_edit.xml similarity index 100% rename from core/src/main/res/drawable/ic_fab_edit.xml rename to ui/common/src/main/res/drawable/ic_fab_edit.xml diff --git a/core/src/main/res/drawable/ic_fast_forward.xml b/ui/common/src/main/res/drawable/ic_fast_forward.xml similarity index 100% rename from core/src/main/res/drawable/ic_fast_forward.xml rename to ui/common/src/main/res/drawable/ic_fast_forward.xml diff --git a/core/src/main/res/drawable/ic_fast_forward_video_white.xml b/ui/common/src/main/res/drawable/ic_fast_forward_video_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_fast_forward_video_white.xml rename to ui/common/src/main/res/drawable/ic_fast_forward_video_white.xml diff --git a/core/src/main/res/drawable/ic_fast_rewind.xml b/ui/common/src/main/res/drawable/ic_fast_rewind.xml similarity index 100% rename from core/src/main/res/drawable/ic_fast_rewind.xml rename to ui/common/src/main/res/drawable/ic_fast_rewind.xml diff --git a/core/src/main/res/drawable/ic_fast_rewind_video_white.xml b/ui/common/src/main/res/drawable/ic_fast_rewind_video_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_fast_rewind_video_white.xml rename to ui/common/src/main/res/drawable/ic_fast_rewind_video_white.xml diff --git a/core/src/main/res/drawable/ic_feed.xml b/ui/common/src/main/res/drawable/ic_feed.xml similarity index 100% rename from core/src/main/res/drawable/ic_feed.xml rename to ui/common/src/main/res/drawable/ic_feed.xml diff --git a/core/src/main/res/drawable/ic_feed_black.xml b/ui/common/src/main/res/drawable/ic_feed_black.xml similarity index 100% rename from core/src/main/res/drawable/ic_feed_black.xml rename to ui/common/src/main/res/drawable/ic_feed_black.xml diff --git a/core/src/main/res/drawable/ic_filter.xml b/ui/common/src/main/res/drawable/ic_filter.xml similarity index 100% rename from core/src/main/res/drawable/ic_filter.xml rename to ui/common/src/main/res/drawable/ic_filter.xml diff --git a/core/src/main/res/drawable/ic_filter_white.xml b/ui/common/src/main/res/drawable/ic_filter_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_filter_white.xml rename to ui/common/src/main/res/drawable/ic_filter_white.xml diff --git a/core/src/main/res/drawable/ic_folder.xml b/ui/common/src/main/res/drawable/ic_folder.xml similarity index 100% rename from core/src/main/res/drawable/ic_folder.xml rename to ui/common/src/main/res/drawable/ic_folder.xml diff --git a/core/src/main/res/drawable/ic_history.xml b/ui/common/src/main/res/drawable/ic_history.xml similarity index 100% rename from core/src/main/res/drawable/ic_history.xml rename to ui/common/src/main/res/drawable/ic_history.xml diff --git a/core/src/main/res/drawable/ic_history_remove.xml b/ui/common/src/main/res/drawable/ic_history_remove.xml similarity index 100% rename from core/src/main/res/drawable/ic_history_remove.xml rename to ui/common/src/main/res/drawable/ic_history_remove.xml diff --git a/core/src/main/res/drawable/ic_home.xml b/ui/common/src/main/res/drawable/ic_home.xml similarity index 100% rename from core/src/main/res/drawable/ic_home.xml rename to ui/common/src/main/res/drawable/ic_home.xml diff --git a/core/src/main/res/drawable/ic_inbox.xml b/ui/common/src/main/res/drawable/ic_inbox.xml similarity index 100% rename from core/src/main/res/drawable/ic_inbox.xml rename to ui/common/src/main/res/drawable/ic_inbox.xml diff --git a/core/src/main/res/drawable/ic_info.xml b/ui/common/src/main/res/drawable/ic_info.xml similarity index 100% rename from core/src/main/res/drawable/ic_info.xml rename to ui/common/src/main/res/drawable/ic_info.xml diff --git a/core/src/main/res/drawable/ic_info_white.xml b/ui/common/src/main/res/drawable/ic_info_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_info_white.xml rename to ui/common/src/main/res/drawable/ic_info_white.xml diff --git a/core/src/main/res/drawable/ic_key.xml b/ui/common/src/main/res/drawable/ic_key.xml similarity index 100% rename from core/src/main/res/drawable/ic_key.xml rename to ui/common/src/main/res/drawable/ic_key.xml diff --git a/core/src/main/res/drawable/ic_load_more.xml b/ui/common/src/main/res/drawable/ic_load_more.xml similarity index 100% rename from core/src/main/res/drawable/ic_load_more.xml rename to ui/common/src/main/res/drawable/ic_load_more.xml diff --git a/core/src/main/res/drawable/ic_mark_played.xml b/ui/common/src/main/res/drawable/ic_mark_played.xml similarity index 100% rename from core/src/main/res/drawable/ic_mark_played.xml rename to ui/common/src/main/res/drawable/ic_mark_played.xml diff --git a/core/src/main/res/drawable/ic_mark_unplayed.xml b/ui/common/src/main/res/drawable/ic_mark_unplayed.xml similarity index 100% rename from core/src/main/res/drawable/ic_mark_unplayed.xml rename to ui/common/src/main/res/drawable/ic_mark_unplayed.xml diff --git a/core/src/main/res/drawable/ic_notifications.xml b/ui/common/src/main/res/drawable/ic_notifications.xml similarity index 100% rename from core/src/main/res/drawable/ic_notifications.xml rename to ui/common/src/main/res/drawable/ic_notifications.xml diff --git a/core/src/main/res/drawable/ic_paperclip.xml b/ui/common/src/main/res/drawable/ic_paperclip.xml similarity index 100% rename from core/src/main/res/drawable/ic_paperclip.xml rename to ui/common/src/main/res/drawable/ic_paperclip.xml diff --git a/core/src/main/res/drawable/ic_pause.xml b/ui/common/src/main/res/drawable/ic_pause.xml similarity index 100% rename from core/src/main/res/drawable/ic_pause.xml rename to ui/common/src/main/res/drawable/ic_pause.xml diff --git a/core/src/main/res/drawable/ic_pause_video_white.xml b/ui/common/src/main/res/drawable/ic_pause_video_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_pause_video_white.xml rename to ui/common/src/main/res/drawable/ic_pause_video_white.xml diff --git a/core/src/main/res/drawable/ic_play_24dp.xml b/ui/common/src/main/res/drawable/ic_play_24dp.xml similarity index 100% rename from core/src/main/res/drawable/ic_play_24dp.xml rename to ui/common/src/main/res/drawable/ic_play_24dp.xml diff --git a/core/src/main/res/drawable/ic_play_48dp.xml b/ui/common/src/main/res/drawable/ic_play_48dp.xml similarity index 100% rename from core/src/main/res/drawable/ic_play_48dp.xml rename to ui/common/src/main/res/drawable/ic_play_48dp.xml diff --git a/core/src/main/res/drawable/ic_play_video_white.xml b/ui/common/src/main/res/drawable/ic_play_video_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_play_video_white.xml rename to ui/common/src/main/res/drawable/ic_play_video_white.xml diff --git a/core/src/main/res/drawable/ic_playback_speed.xml b/ui/common/src/main/res/drawable/ic_playback_speed.xml similarity index 100% rename from core/src/main/res/drawable/ic_playback_speed.xml rename to ui/common/src/main/res/drawable/ic_playback_speed.xml diff --git a/core/src/main/res/drawable/ic_playlist_play.xml b/ui/common/src/main/res/drawable/ic_playlist_play.xml similarity index 100% rename from core/src/main/res/drawable/ic_playlist_play.xml rename to ui/common/src/main/res/drawable/ic_playlist_play.xml diff --git a/core/src/main/res/drawable/ic_playlist_play_black.xml b/ui/common/src/main/res/drawable/ic_playlist_play_black.xml similarity index 100% rename from core/src/main/res/drawable/ic_playlist_play_black.xml rename to ui/common/src/main/res/drawable/ic_playlist_play_black.xml diff --git a/core/src/main/res/drawable/ic_playlist_remove.xml b/ui/common/src/main/res/drawable/ic_playlist_remove.xml similarity index 100% rename from core/src/main/res/drawable/ic_playlist_remove.xml rename to ui/common/src/main/res/drawable/ic_playlist_remove.xml diff --git a/core/src/main/res/drawable/ic_questionmark.xml b/ui/common/src/main/res/drawable/ic_questionmark.xml similarity index 100% rename from core/src/main/res/drawable/ic_questionmark.xml rename to ui/common/src/main/res/drawable/ic_questionmark.xml diff --git a/core/src/main/res/drawable/ic_refresh.xml b/ui/common/src/main/res/drawable/ic_refresh.xml similarity index 100% rename from core/src/main/res/drawable/ic_refresh.xml rename to ui/common/src/main/res/drawable/ic_refresh.xml diff --git a/core/src/main/res/drawable/ic_refresh_black.xml b/ui/common/src/main/res/drawable/ic_refresh_black.xml similarity index 100% rename from core/src/main/res/drawable/ic_refresh_black.xml rename to ui/common/src/main/res/drawable/ic_refresh_black.xml diff --git a/core/src/main/res/drawable/ic_replay.xml b/ui/common/src/main/res/drawable/ic_replay.xml similarity index 100% rename from core/src/main/res/drawable/ic_replay.xml rename to ui/common/src/main/res/drawable/ic_replay.xml diff --git a/core/src/main/res/drawable/ic_rounded_corner_left.xml b/ui/common/src/main/res/drawable/ic_rounded_corner_left.xml similarity index 100% rename from core/src/main/res/drawable/ic_rounded_corner_left.xml rename to ui/common/src/main/res/drawable/ic_rounded_corner_left.xml diff --git a/core/src/main/res/drawable/ic_rounded_corner_right.xml b/ui/common/src/main/res/drawable/ic_rounded_corner_right.xml similarity index 100% rename from core/src/main/res/drawable/ic_rounded_corner_right.xml rename to ui/common/src/main/res/drawable/ic_rounded_corner_right.xml diff --git a/core/src/main/res/drawable/ic_search.xml b/ui/common/src/main/res/drawable/ic_search.xml similarity index 100% rename from core/src/main/res/drawable/ic_search.xml rename to ui/common/src/main/res/drawable/ic_search.xml diff --git a/core/src/main/res/drawable/ic_select_all.xml b/ui/common/src/main/res/drawable/ic_select_all.xml similarity index 100% rename from core/src/main/res/drawable/ic_select_all.xml rename to ui/common/src/main/res/drawable/ic_select_all.xml diff --git a/core/src/main/res/drawable/ic_select_none.xml b/ui/common/src/main/res/drawable/ic_select_none.xml similarity index 100% rename from core/src/main/res/drawable/ic_select_none.xml rename to ui/common/src/main/res/drawable/ic_select_none.xml diff --git a/core/src/main/res/drawable/ic_settings.xml b/ui/common/src/main/res/drawable/ic_settings.xml similarity index 100% rename from core/src/main/res/drawable/ic_settings.xml rename to ui/common/src/main/res/drawable/ic_settings.xml diff --git a/core/src/main/res/drawable/ic_settings_white.xml b/ui/common/src/main/res/drawable/ic_settings_white.xml similarity index 100% rename from core/src/main/res/drawable/ic_settings_white.xml rename to ui/common/src/main/res/drawable/ic_settings_white.xml diff --git a/core/src/main/res/drawable/ic_share.xml b/ui/common/src/main/res/drawable/ic_share.xml similarity index 100% rename from core/src/main/res/drawable/ic_share.xml rename to ui/common/src/main/res/drawable/ic_share.xml diff --git a/core/src/main/res/drawable/ic_shortcut_background.xml b/ui/common/src/main/res/drawable/ic_shortcut_background.xml similarity index 100% rename from core/src/main/res/drawable/ic_shortcut_background.xml rename to ui/common/src/main/res/drawable/ic_shortcut_background.xml diff --git a/core/src/main/res/drawable/ic_shuffle.xml b/ui/common/src/main/res/drawable/ic_shuffle.xml similarity index 100% rename from core/src/main/res/drawable/ic_shuffle.xml rename to ui/common/src/main/res/drawable/ic_shuffle.xml diff --git a/core/src/main/res/drawable/ic_skip_24dp.xml b/ui/common/src/main/res/drawable/ic_skip_24dp.xml similarity index 100% rename from core/src/main/res/drawable/ic_skip_24dp.xml rename to ui/common/src/main/res/drawable/ic_skip_24dp.xml diff --git a/core/src/main/res/drawable/ic_skip_48dp.xml b/ui/common/src/main/res/drawable/ic_skip_48dp.xml similarity index 100% rename from core/src/main/res/drawable/ic_skip_48dp.xml rename to ui/common/src/main/res/drawable/ic_skip_48dp.xml diff --git a/core/src/main/res/drawable/ic_sleep.xml b/ui/common/src/main/res/drawable/ic_sleep.xml similarity index 100% rename from core/src/main/res/drawable/ic_sleep.xml rename to ui/common/src/main/res/drawable/ic_sleep.xml diff --git a/core/src/main/res/drawable/ic_sleep_off.xml b/ui/common/src/main/res/drawable/ic_sleep_off.xml similarity index 100% rename from core/src/main/res/drawable/ic_sleep_off.xml rename to ui/common/src/main/res/drawable/ic_sleep_off.xml diff --git a/core/src/main/res/drawable/ic_star.xml b/ui/common/src/main/res/drawable/ic_star.xml similarity index 100% rename from core/src/main/res/drawable/ic_star.xml rename to ui/common/src/main/res/drawable/ic_star.xml diff --git a/core/src/main/res/drawable/ic_star_border.xml b/ui/common/src/main/res/drawable/ic_star_border.xml similarity index 100% rename from core/src/main/res/drawable/ic_star_border.xml rename to ui/common/src/main/res/drawable/ic_star_border.xml diff --git a/core/src/main/res/drawable/ic_storage.xml b/ui/common/src/main/res/drawable/ic_storage.xml similarity index 100% rename from core/src/main/res/drawable/ic_storage.xml rename to ui/common/src/main/res/drawable/ic_storage.xml diff --git a/core/src/main/res/drawable/ic_stream.xml b/ui/common/src/main/res/drawable/ic_stream.xml similarity index 100% rename from core/src/main/res/drawable/ic_stream.xml rename to ui/common/src/main/res/drawable/ic_stream.xml diff --git a/core/src/main/res/drawable/ic_subscriptions.xml b/ui/common/src/main/res/drawable/ic_subscriptions.xml similarity index 100% rename from core/src/main/res/drawable/ic_subscriptions.xml rename to ui/common/src/main/res/drawable/ic_subscriptions.xml diff --git a/core/src/main/res/drawable/ic_subscriptions_black.xml b/ui/common/src/main/res/drawable/ic_subscriptions_black.xml similarity index 100% rename from core/src/main/res/drawable/ic_subscriptions_black.xml rename to ui/common/src/main/res/drawable/ic_subscriptions_black.xml diff --git a/core/src/main/res/drawable/ic_tag.xml b/ui/common/src/main/res/drawable/ic_tag.xml similarity index 100% rename from core/src/main/res/drawable/ic_tag.xml rename to ui/common/src/main/res/drawable/ic_tag.xml diff --git a/core/src/main/res/drawable/ic_videocam.xml b/ui/common/src/main/res/drawable/ic_videocam.xml similarity index 100% rename from core/src/main/res/drawable/ic_videocam.xml rename to ui/common/src/main/res/drawable/ic_videocam.xml diff --git a/core/src/main/res/drawable/ic_volume_adaption.xml b/ui/common/src/main/res/drawable/ic_volume_adaption.xml similarity index 100% rename from core/src/main/res/drawable/ic_volume_adaption.xml rename to ui/common/src/main/res/drawable/ic_volume_adaption.xml diff --git a/core/src/main/res/drawable/ic_web.xml b/ui/common/src/main/res/drawable/ic_web.xml similarity index 100% rename from core/src/main/res/drawable/ic_web.xml rename to ui/common/src/main/res/drawable/ic_web.xml diff --git a/ui/echo/build.gradle b/ui/echo/build.gradle index 820ccb208..7f3351d13 100644 --- a/ui/echo/build.gradle +++ b/ui/echo/build.gradle @@ -13,7 +13,6 @@ android { } dependencies { - implementation project(":core") implementation project(":model") implementation project(':storage:database') implementation project(":storage:preferences") diff --git a/core/src/main/res/drawable-hdpi/ic_notification.png b/ui/notifications/src/main/res/drawable-hdpi/ic_notification.png similarity index 100% rename from core/src/main/res/drawable-hdpi/ic_notification.png rename to ui/notifications/src/main/res/drawable-hdpi/ic_notification.png diff --git a/core/src/main/res/drawable-hdpi/ic_notification_new.png b/ui/notifications/src/main/res/drawable-hdpi/ic_notification_new.png similarity index 100% rename from core/src/main/res/drawable-hdpi/ic_notification_new.png rename to ui/notifications/src/main/res/drawable-hdpi/ic_notification_new.png diff --git a/core/src/main/res/drawable-mdpi/ic_notification.png b/ui/notifications/src/main/res/drawable-mdpi/ic_notification.png similarity index 100% rename from core/src/main/res/drawable-mdpi/ic_notification.png rename to ui/notifications/src/main/res/drawable-mdpi/ic_notification.png diff --git a/core/src/main/res/drawable-mdpi/ic_notification_new.png b/ui/notifications/src/main/res/drawable-mdpi/ic_notification_new.png similarity index 100% rename from core/src/main/res/drawable-mdpi/ic_notification_new.png rename to ui/notifications/src/main/res/drawable-mdpi/ic_notification_new.png diff --git a/core/src/main/res/drawable-xhdpi/ic_notification.png b/ui/notifications/src/main/res/drawable-xhdpi/ic_notification.png similarity index 100% rename from core/src/main/res/drawable-xhdpi/ic_notification.png rename to ui/notifications/src/main/res/drawable-xhdpi/ic_notification.png diff --git a/core/src/main/res/drawable-xhdpi/ic_notification_new.png b/ui/notifications/src/main/res/drawable-xhdpi/ic_notification_new.png similarity index 100% rename from core/src/main/res/drawable-xhdpi/ic_notification_new.png rename to ui/notifications/src/main/res/drawable-xhdpi/ic_notification_new.png diff --git a/core/src/main/res/drawable-xxhdpi/ic_notification.png b/ui/notifications/src/main/res/drawable-xxhdpi/ic_notification.png similarity index 100% rename from core/src/main/res/drawable-xxhdpi/ic_notification.png rename to ui/notifications/src/main/res/drawable-xxhdpi/ic_notification.png diff --git a/core/src/main/res/drawable-xxhdpi/ic_notification_new.png b/ui/notifications/src/main/res/drawable-xxhdpi/ic_notification_new.png similarity index 100% rename from core/src/main/res/drawable-xxhdpi/ic_notification_new.png rename to ui/notifications/src/main/res/drawable-xxhdpi/ic_notification_new.png diff --git a/core/src/main/res/drawable-xxxhdpi/ic_notification.png b/ui/notifications/src/main/res/drawable-xxxhdpi/ic_notification.png similarity index 100% rename from core/src/main/res/drawable-xxxhdpi/ic_notification.png rename to ui/notifications/src/main/res/drawable-xxxhdpi/ic_notification.png diff --git a/core/src/main/res/drawable-xxxhdpi/ic_notification_new.png b/ui/notifications/src/main/res/drawable-xxxhdpi/ic_notification_new.png similarity index 100% rename from core/src/main/res/drawable-xxxhdpi/ic_notification_new.png rename to ui/notifications/src/main/res/drawable-xxxhdpi/ic_notification_new.png diff --git a/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/GpodderAuthenticationFragment.java b/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/GpodderAuthenticationFragment.java index d28355dad..388359e3d 100644 --- a/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/GpodderAuthenticationFragment.java +++ b/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/GpodderAuthenticationFragment.java @@ -18,9 +18,10 @@ import androidx.annotation.Nullable; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import androidx.fragment.app.DialogFragment; import com.google.android.material.button.MaterialButton; +import de.danoeh.antennapod.core.sync.queue.SynchronizationQueueSink; import de.danoeh.antennapod.net.common.AntennapodHttpClient; import de.danoeh.antennapod.core.sync.SyncService; -import de.danoeh.antennapod.core.sync.SynchronizationCredentials; +import de.danoeh.antennapod.storage.preferences.SynchronizationCredentials; import de.danoeh.antennapod.core.sync.SynchronizationProviderViewData; import de.danoeh.antennapod.core.sync.SynchronizationSettings; import de.danoeh.antennapod.core.util.FileNameGenerator; @@ -83,10 +84,11 @@ public class GpodderAuthenticationFragment extends DialogFragment { if (serverUrlText.getText().length() == 0) { return; } - SynchronizationCredentials.clear(getContext()); + SynchronizationCredentials.clear(); + SynchronizationQueueSink.clearQueue(getContext()); SynchronizationCredentials.setHosturl(serverUrlText.getText().toString()); service = new GpodnetService(AntennapodHttpClient.getHttpClient(), - SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceID(), + SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceId(), SynchronizationCredentials.getUsername(), SynchronizationCredentials.getPassword()); getDialog().setTitle(SynchronizationCredentials.getHosturl()); advance(); @@ -258,7 +260,7 @@ public class GpodderAuthenticationFragment extends DialogFragment { SynchronizationSettings.setSelectedSyncProvider(SynchronizationProviderViewData.GPODDER_NET); SynchronizationCredentials.setUsername(username); SynchronizationCredentials.setPassword(password); - SynchronizationCredentials.setDeviceID(selectedDevice.getId()); + SynchronizationCredentials.setDeviceId(selectedDevice.getId()); setupFinishView(view); } } diff --git a/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/NextcloudAuthenticationFragment.java b/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/NextcloudAuthenticationFragment.java index b73ee2453..5c0f22d88 100644 --- a/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/NextcloudAuthenticationFragment.java +++ b/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/NextcloudAuthenticationFragment.java @@ -8,9 +8,10 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import androidx.fragment.app.DialogFragment; +import de.danoeh.antennapod.core.sync.queue.SynchronizationQueueSink; import de.danoeh.antennapod.net.common.AntennapodHttpClient; import de.danoeh.antennapod.core.sync.SyncService; -import de.danoeh.antennapod.core.sync.SynchronizationCredentials; +import de.danoeh.antennapod.storage.preferences.SynchronizationCredentials; import de.danoeh.antennapod.core.sync.SynchronizationProviderViewData; import de.danoeh.antennapod.core.sync.SynchronizationSettings; import de.danoeh.antennapod.net.sync.nextcloud.NextcloudLoginFlow; @@ -88,7 +89,8 @@ public class NextcloudAuthenticationFragment extends DialogFragment @Override public void onNextcloudAuthenticated(String server, String username, String password) { SynchronizationSettings.setSelectedSyncProvider(SynchronizationProviderViewData.NEXTCLOUD_GPODDER); - SynchronizationCredentials.clear(getContext()); + SynchronizationCredentials.clear(); + SynchronizationQueueSink.clearQueue(getContext()); SynchronizationCredentials.setPassword(password); SynchronizationCredentials.setHosturl(server); SynchronizationCredentials.setUsername(username); diff --git a/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/SynchronizationPreferencesFragment.java b/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/SynchronizationPreferencesFragment.java index 3c6461272..e8428dd5c 100644 --- a/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/SynchronizationPreferencesFragment.java +++ b/ui/preferences/src/main/java/de/danoeh/antennapod/ui/preferences/screen/synchronization/SynchronizationPreferencesFragment.java @@ -21,13 +21,14 @@ import androidx.preference.PreferenceFragmentCompat; import com.google.android.material.snackbar.Snackbar; +import de.danoeh.antennapod.core.sync.queue.SynchronizationQueueSink; import de.danoeh.antennapod.ui.preferences.R; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import de.danoeh.antennapod.event.SyncServiceEvent; -import de.danoeh.antennapod.core.sync.SynchronizationCredentials; +import de.danoeh.antennapod.storage.preferences.SynchronizationCredentials; import de.danoeh.antennapod.core.sync.SyncService; import de.danoeh.antennapod.core.sync.SynchronizationProviderViewData; import de.danoeh.antennapod.core.sync.SynchronizationSettings; @@ -100,7 +101,8 @@ public class SynchronizationPreferencesFragment extends PreferenceFragmentCompat return true; }); findPreference(PREFERENCE_LOGOUT).setOnPreferenceClickListener(preference -> { - SynchronizationCredentials.clear(getContext()); + SynchronizationCredentials.clear(); + SynchronizationQueueSink.clearQueue(getContext()); Snackbar.make(getView(), R.string.pref_synchronization_logout_toast, Snackbar.LENGTH_LONG).show(); SynchronizationSettings.setSelectedSyncProvider(null); updateScreen();