From eb827e57d292e10bf1593c4ff6f79e37fdf99f16 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Mon, 21 Sep 2020 22:04:51 +0200 Subject: Derive provider descriptors from applicationId --- app/build.gradle | 5 +++++ app/src/main/AndroidManifest.xml | 10 +++++----- app/src/main/java/github/daneren2005/dsub/util/Constants.java | 8 ++++---- 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/searchable.xml | 2 +- app/src/main/res/xml/starred_syncadapter.xml | 2 +- 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f96f3051..38401e63 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,6 +13,11 @@ android { resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" vectorDrawables.useSupportLibrary = true resValue 'string', 'account_type.subsonic', applicationId + ".subsonic" + resValue 'string', 'provider.search', applicationId + ".provider.DSubSearchProvider" + resValue 'string', 'provider.playlist', applicationId + ".playlists.provider" + resValue 'string', 'provider.podcast', applicationId + ".podcasts.provider" + resValue 'string', 'provider.starred', applicationId + ".starred.provider" + resValue 'string', 'provider.recently_added', applicationId + ".mostrecent.provider" } buildTypes { release { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 52756534..ffefe19e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -214,24 +214,24 @@ + android:authorities="@string/provider.search"/> 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 e62b93f9..0ce58d73 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -223,10 +223,10 @@ public final class Constants { // Account prefs public static final String SYNC_ACCOUNT_NAME = "Subsonic Account"; 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"; - public static final String SYNC_ACCOUNT_MOST_RECENT_AUTHORITY = "github.daneren2005.dsub.mostrecent.provider"; + public static final String SYNC_ACCOUNT_PLAYLIST_AUTHORITY = BuildConfig.APPLICATION_ID + ".playlists.provider"; + public static final String SYNC_ACCOUNT_PODCAST_AUTHORITY = BuildConfig.APPLICATION_ID + ".podcasts.provider"; + public static final String SYNC_ACCOUNT_STARRED_AUTHORITY = BuildConfig.APPLICATION_ID + ".starred.provider"; + public static final String SYNC_ACCOUNT_MOST_RECENT_AUTHORITY = BuildConfig.APPLICATION_ID + ".mostrecent.provider"; public static final String TASKER_EXTRA_BUNDLE = "com.twofortyfouram.locale.intent.extra.BUNDLE"; diff --git a/app/src/main/res/xml/mostrecent_syncadapter.xml b/app/src/main/res/xml/mostrecent_syncadapter.xml index 8c6dada2..a0172501 100644 --- a/app/src/main/res/xml/mostrecent_syncadapter.xml +++ b/app/src/main/res/xml/mostrecent_syncadapter.xml @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/app/src/main/res/xml/starred_syncadapter.xml b/app/src/main/res/xml/starred_syncadapter.xml index f325da26..1d855057 100644 --- a/app/src/main/res/xml/starred_syncadapter.xml +++ b/app/src/main/res/xml/starred_syncadapter.xml @@ -1,6 +1,6 @@