diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 32530819..417e6656 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -138,7 +138,6 @@
-
diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt
index 3d0990cc..66bbc002 100644
--- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt
@@ -6,7 +6,6 @@ import android.content.Intent
import android.graphics.drawable.ColorDrawable
import android.media.AudioManager
import android.os.Bundle
-import android.os.Handler
import android.view.Menu
import android.view.MenuItem
import android.widget.RelativeLayout
@@ -30,7 +29,6 @@ import com.simplemobiletools.musicplayer.dialogs.NewPlaylistDialog
import com.simplemobiletools.musicplayer.dialogs.SleepTimerCustomDialog
import com.simplemobiletools.musicplayer.extensions.*
import com.simplemobiletools.musicplayer.fragments.MyViewPagerFragment
-import com.simplemobiletools.musicplayer.helpers.INIT_EQUALIZER
import com.simplemobiletools.musicplayer.helpers.INIT_QUEUE
import com.simplemobiletools.musicplayer.helpers.START_SLEEP_TIMER
import com.simplemobiletools.musicplayer.helpers.STOP_SLEEP_TIMER
@@ -63,7 +61,6 @@ class MainActivity : SimpleActivity() {
handlePermission(PERMISSION_WRITE_STORAGE) {
if (it) {
initActivity()
- sendIntent(INIT_EQUALIZER)
} else {
toast(R.string.no_storage_permissions)
finish()
@@ -91,13 +88,6 @@ class MainActivity : SimpleActivity() {
getAllFragments().forEach {
it?.setupColors(config.textColor, adjustedPrimaryColor)
}
-
- // equalizer can sometimes reset on app start/resume, no idea why. Lets just wait a bit and reenable it
- Handler().postDelayed({
- if (MusicService.mPlayer != null && MusicService.mCurrTrack != null) {
- sendIntent(INIT_EQUALIZER)
- }
- }, 2000)
}
override fun onDestroy() {
diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt
index 801315c7..12cd89bf 100644
--- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt
@@ -24,7 +24,6 @@ val artworkUri = Uri.parse("content://media/external/audio/albumart")
const val INIT = PATH + "INIT"
const val INIT_PATH = PATH + "INIT_PATH"
const val INIT_QUEUE = PATH + "INIT_QUEUE"
-const val INIT_EQUALIZER = PATH + "INIT_EQUALIZER"
const val FINISH = PATH + "FINISH"
const val FINISH_IF_NOT_PLAYING = PATH + "FINISH_IF_NOT_PLAYING"
const val PREVIOUS = PATH + "PREVIOUS"
diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/services/MusicService.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/services/MusicService.kt
index 5d02bd24..8f1e461c 100644
--- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/services/MusicService.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/services/MusicService.kt
@@ -134,7 +134,7 @@ class MusicService : Service(), MediaPlayer.OnPreparedListener, MediaPlayer.OnEr
}
val action = intent.action
- if (isOreoPlus() && action != NEXT && action != PREVIOUS && action != PLAYPAUSE && action != INIT_EQUALIZER) {
+ if (isOreoPlus() && action != NEXT && action != PREVIOUS && action != PLAYPAUSE) {
setupFakeNotification()
}
@@ -142,7 +142,6 @@ class MusicService : Service(), MediaPlayer.OnPreparedListener, MediaPlayer.OnEr
INIT -> handleInit(intent)
INIT_PATH -> handleInitPath(intent)
INIT_QUEUE -> handleInitQueue()
- INIT_EQUALIZER -> setupEqualizer()
PREVIOUS -> handlePrevious()
PAUSE -> pauseTrack()
PLAYPAUSE -> handlePlayPause()
@@ -162,11 +161,7 @@ class MusicService : Service(), MediaPlayer.OnPreparedListener, MediaPlayer.OnEr
}
MediaButtonReceiver.handleIntent(mMediaSession!!, intent)
-
- if (action != INIT_EQUALIZER) {
- setupNotification()
- }
-
+ setupNotification()
return START_NOT_STICKY
}