[Android] Video Player: remove useless code

Geoffrey Métais git at videolan.org
Thu Jul 4 11:32:01 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jul  4 11:02:35 2019 +0200| [938e370179c8e272a9e5630587b489c47c43fee6] | committer: Geoffrey Métais

Video Player: remove useless code

Sleep timer is monitored by playback service

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt    | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 859e7c578..2478bcab5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -244,13 +244,6 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
     private lateinit var playToPause: AnimatedVectorDrawableCompat
     private lateinit var pauseToPlay: AnimatedVectorDrawableCompat
 
-    private val receiver = object : BroadcastReceiver() {
-        override fun onReceive(context: Context, intent: Intent) {
-            val action = intent.action
-            if (SLEEP_INTENT.equals(action!!, ignoreCase = true)) exitOK()
-        }
-    }
-
     internal val isPlaybackSettingActive: Boolean
         get() = playbackSetting != IPlaybackSettingsController.DelayState.OFF
 
@@ -457,10 +450,6 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
         // Paused flag - per session too, like the subs list.
         editor.apply()
 
-        val filter = IntentFilter()
-        filter.addAction(SLEEP_INTENT)
-        registerReceiver(receiver, filter)
-
         this.volumeControlStream = AudioManager.STREAM_MUSIC
 
         // 100 is the value for screen_orientation_start_lock
@@ -783,7 +772,6 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
 
     override fun onDestroy() {
         super.onDestroy()
-        unregisterReceiver(receiver)
         playlistModel?.run {
             dataset.removeObserver(playlistObserver)
             onCleared()



More information about the Android mailing list