[Android] Code cleaning

Geoffrey Métais git at videolan.org
Fri Jun 7 10:35:34 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun  7 10:34:52 2019 +0200| [bbb8e5c4ae521da04d7670d73e58f38f1f670958] | committer: Geoffrey Métais

Code cleaning

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

 vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt | 2 +-
 vlc-android/src/org/videolan/vlc/gui/MainActivity.kt                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
index 9dbe1aed2..dc5f920b1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
@@ -248,7 +248,7 @@ open class AudioPlayerContainerActivity : BaseActivity() {
      * @return true on success else false.
      */
     fun slideDownAudioPlayer(): Boolean {
-        if (isAudioPlayerReady && bottomSheetBehavior!!.state == STATE_EXPANDED) {
+        if (isAudioPlayerReady && bottomSheetBehavior?.state == STATE_EXPANDED) {
             bottomSheetBehavior?.state = STATE_COLLAPSED
             return true
         }
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt b/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
index 52a5ac812..9d6d8362c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
@@ -251,7 +251,7 @@ class MainActivity : ContentActivity(), ExtensionManagerService.ExtensionManager
         }
 
         /* Close playlist search if open or Slide down the audio player if it is shown entirely. */
-        if (isAudioPlayerReady && (audioPlayer!!.backPressed() || slideDownAudioPlayer()))
+        if (isAudioPlayerReady && (audioPlayer?.backPressed() == true || slideDownAudioPlayer()))
             return
 
         // If it's the directory view, a "backpressed" action shows a parent.



More information about the Android mailing list