[Android] Update AndroidX libraries

Geoffrey Métais git at videolan.org
Fri Jan 24 12:07:07 CET 2020


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 24 11:44:01 2020 +0100| [06a979593cde1c36829e1619e9a4aae656b3dd22] | committer: Geoffrey Métais

Update AndroidX libraries

> https://code.videolan.org/videolan/vlc-android/commit/06a979593cde1c36829e1619e9a4aae656b3dd22
---

 application/vlc-android/build.gradle                              | 4 ++--
 .../vlc-android/src/org/videolan/vlc/MediaParsingService.kt       | 6 +++++-
 build.gradle                                                      | 8 ++++----
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/application/vlc-android/build.gradle b/application/vlc-android/build.gradle
index b012ec45f..fd614f5d2 100644
--- a/application/vlc-android/build.gradle
+++ b/application/vlc-android/build.gradle
@@ -171,7 +171,7 @@ dependencies {
     api "androidx.annotation:annotation:$rootProject.ext.androidxAnnotationVersion"
     api "androidx.constraintlayout:constraintlayout:$rootProject.ext.constraintLayoutVersion"
     api 'androidx.multidex:multidex:2.0.1'
-    api "androidx.lifecycle:lifecycle-extensions:$rootProject.ext.archVersion"
+    api "androidx.lifecycle:lifecycle-extensions:$rootProject.ext.lifecycleVersion"
     api "androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.ext.lifecycleVersion"
     api "androidx.lifecycle:lifecycle-runtime-ktx:$rootProject.ext.lifecycleVersion"
     api "androidx.lifecycle:lifecycle-livedata-ktx:$rootProject.ext.lifecycleVersion"
@@ -214,7 +214,7 @@ dependencies {
     testApi "org.powermock:powermock-module-junit4:$rootProject.ext.powerMock"
     testApi "com.jraska.livedata:testing-ktx:$rootProject.ext.livedataTest"
     testApi "org.robolectric:robolectric:$rootProject.ext.robolectric"
-    androidTestApi 'androidx.test:rules:1.3.0-alpha01'
+    androidTestApi 'androidx.test:rules:1.3.0-alpha03'
 }
 
 
diff --git a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index c3fa0c4db..162491772 100644
--- a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -153,13 +153,17 @@ class MediaParsingService : LifecycleService(), DevicesDiscoveryCb, LifecycleOwn
         return binder
     }
 
-    override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
+    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
         // Set 1s delay before displaying scan icon
         // Except for Android 8+ which expects startForeground immediately
         if (AndroidUtil.isOOrLater) forceForeground()
         if (lastNotificationTime <= 0L) lastNotificationTime = if (AndroidUtil.isOOrLater) 0L else System.currentTimeMillis()
         super.onStartCommand(intent, flags, startId)
         dispatcher.onServicePreSuperOnStart()
+        if (intent == null) {
+            exitCommand()
+            return START_NOT_STICKY
+        }
         when (intent.action) {
             ACTION_INIT -> {
                 val upgrade = intent.getBooleanExtra(EXTRA_UPGRADE, false)
diff --git a/build.gradle b/build.gradle
index 138e36bf0..5fdb9defe 100644
--- a/build.gradle
+++ b/build.gradle
@@ -37,17 +37,17 @@ ext {
     compileSdkVersion = 29
     androidxLegacyVersion = '1.0.0'
     androidxCoreVersion = '1.1.0'
-    lifecycleVersion = '2.2.0-rc03'
+    lifecycleVersion = '2.2.0'
     androidxPreferencesVersion = '1.1.0'
     androidxVersion = '1.1.0'
-    androidxActivityVersion = '1.1.0-rc03'
-    androidxFragmentVersion = '1.2.0-rc05'
+    androidxActivityVersion = '1.1.0'
+    androidxFragmentVersion = '1.2.0'
     androidxAnnotationVersion = '1.1.0'
     androidxAppcompatVersion = '1.1.0'
     androidxRecyclerviewVersion = '1.1.0'
     androidxMediaVersion = '1.1.0'
     androidxLeanbackVersion = '1.0.0'
-    androidxMaterialVersion = '1.1.0-rc01'
+    androidxMaterialVersion = '1.1.0-rc02'
     constraintLayoutVersion = '1.1.3'
     archVersion = '2.1.0'
     roomVersion = '2.2.3'



More information about the Android mailing list