code refactor

This commit is contained in:
h4h13 2018-12-10 13:01:43 +05:30
parent acc7e31d57
commit 16451a2fb6

View file

@ -2,7 +2,6 @@ package code.name.monkey.retromusic.ui.activities.base
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.view.KeyEvent
@ -101,7 +100,7 @@ abstract class AbsThemeActivity : ATHActivity(), Runnable {
VersionUtils.hasLollipop() -> statusBar.setBackgroundColor(ColorUtil.darkenColor(color))
else -> statusBar.setBackgroundColor(color)
}
} else if (Build.VERSION.SDK_INT >= 21) {
} else {
when {
VersionUtils.hasMarshmallow() -> window.statusBarColor = color
else -> window.statusBarColor = ColorUtil.darkenColor(color)