[Android] Remove calls to BuildConfig.APPLICATION_ID

Nicolas Pomepuy git at videolan.org
Wed Mar 4 11:04:02 CET 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Mar  4 09:30:14 2020 +0100| [3a46326151c2928398286d65ef225ff239b7c482] | committer: Nicolas Pomepuy

Remove calls to BuildConfig.APPLICATION_ID

> https://code.videolan.org/videolan/vlc-android/commit/3a46326151c2928398286d65ef225ff239b7c482
---

 .../src/main/java/org/videolan/television/util/TVSearchProvider.kt | 4 ++--
 .../vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.kt      | 7 +++----
 application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt    | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/application/television/src/main/java/org/videolan/television/util/TVSearchProvider.kt b/application/television/src/main/java/org/videolan/television/util/TVSearchProvider.kt
index 62e0d9ffc..f556bce0b 100644
--- a/application/television/src/main/java/org/videolan/television/util/TVSearchProvider.kt
+++ b/application/television/src/main/java/org/videolan/television/util/TVSearchProvider.kt
@@ -160,10 +160,10 @@ private fun MediaWrapper.getThumb(): Uri {
         ThumbnailsProvider.getVideoThumbnail(this at getThumb, 512)
     }
     val mrl = artworkMrl
-            ?: return Uri.parse("android.resource://${BuildConfig.APPLICATION_ID}/${R.drawable.ic_browser_video_big_normal}")
+            ?: return Uri.parse("android.resource://${BuildConfig.APP_ID}/${R.drawable.ic_browser_video_big_normal}")
     return try {
         getFileUri(mrl)
     } catch (ex: IllegalArgumentException) {
-        Uri.parse("android.resource://${BuildConfig.APPLICATION_ID}/${R.drawable.ic_browser_video_big_normal}")
+        Uri.parse("android.resource://${BuildConfig.APP_ID}/${R.drawable.ic_browser_video_big_normal}")
     }
 }
\ No newline at end of file
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.kt
index 1c23676c4..05e6b91ee 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.kt
@@ -43,7 +43,6 @@ import org.videolan.tools.*
 import org.videolan.vlc.BuildConfig
 import org.videolan.vlc.R
 import org.videolan.vlc.media.MediaUtils
-import org.videolan.tools.MurmurHash
 import org.videolan.vlc.util.Permissions
 import java.io.*
 import java.math.BigInteger
@@ -139,11 +138,11 @@ object AudioUtil {
             if (AndroidDevices.hasExternalStorage() && context.externalCacheDir != null)
                 CACHE_DIR = context.externalCacheDir!!.path
             else
-                CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APPLICATION_ID + "/cache"
+                CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APP_ID + "/cache"
         } catch (e: Exception) { // catch NPE thrown by getExternalCacheDir()
-            CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APPLICATION_ID + "/cache"
+            CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APP_ID + "/cache"
         } catch (e: ExceptionInInitializerError) {
-            CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APPLICATION_ID + "/cache"
+            CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APP_ID + "/cache"
         }
 
         ART_DIR.set(CACHE_DIR!! + "/art/")
diff --git a/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt b/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt
index 8e1a925f6..eb30506f4 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/TvChannels.kt
@@ -51,7 +51,7 @@ fun setChannel(context: Context) = GlobalScope.launch(start = CoroutineStart.UND
     val channelId = withContext(Dispatchers.IO) {
         val prefs = Settings.getInstance(context)
         val name = context.getString(R.string.tv_my_new_videos)
-        createOrUpdateChannel(prefs, context, name, R.drawable.ic_channel_icon, BuildConfig.APPLICATION_ID)
+        createOrUpdateChannel(prefs, context, name, R.drawable.ic_channel_icon, BuildConfig.APP_ID)
     }
     if (Permissions.canReadStorage(context)) updatePrograms(context, channelId)
 }



More information about the Android mailing list