From 45dfb9653cf5fcfe7ca5e3a20437aeee64b9ecb1 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Mon, 21 Sep 2020 21:02:22 +0200 Subject: Derive subsonic account type descriptor from applicationId --- app/build.gradle | 1 + app/src/main/java/github/daneren2005/dsub/util/Constants.java | 2 +- app/src/main/res/xml/authenticator.xml | 2 +- app/src/main/res/xml/mostrecent_syncadapter.xml | 2 +- app/src/main/res/xml/playlists_syncadapter.xml | 2 +- app/src/main/res/xml/podcasts_syncadapter.xml | 2 +- app/src/main/res/xml/starred_syncadapter.xml | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1edbc5e2..f96f3051 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,6 +12,7 @@ android { setProperty("archivesBaseName", "DSub $versionName") resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" vectorDrawables.useSupportLibrary = true + resValue 'string', 'account_type.subsonic', applicationId + ".subsonic" } buildTypes { release { diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index 744c2469..e62b93f9 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -222,7 +222,7 @@ public final class Constants { // Account prefs public static final String SYNC_ACCOUNT_NAME = "Subsonic Account"; - public static final String SYNC_ACCOUNT_TYPE = "subsonic.org"; + public static final String SYNC_ACCOUNT_TYPE = BuildConfig.APPLICATION_ID + ".subsonic"; public static final String SYNC_ACCOUNT_PLAYLIST_AUTHORITY = "github.daneren2005.dsub.playlists.provider"; public static final String SYNC_ACCOUNT_PODCAST_AUTHORITY = "github.daneren2005.dsub.podcasts.provider"; public static final String SYNC_ACCOUNT_STARRED_AUTHORITY = "github.daneren2005.dsub.starred.provider"; diff --git a/app/src/main/res/xml/authenticator.xml b/app/src/main/res/xml/authenticator.xml index 3055240b..23e4621a 100644 --- a/app/src/main/res/xml/authenticator.xml +++ b/app/src/main/res/xml/authenticator.xml @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/app/src/main/res/xml/mostrecent_syncadapter.xml b/app/src/main/res/xml/mostrecent_syncadapter.xml index 0195edeb..8c6dada2 100644 --- a/app/src/main/res/xml/mostrecent_syncadapter.xml +++ b/app/src/main/res/xml/mostrecent_syncadapter.xml @@ -1,7 +1,7 @@