adding a null check at the MediaSideScroll
This commit is contained in:
parent
4595f6549a
commit
6033d6a812
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ class MediaSideScroll(context: Context, attrs: AttributeSet) : RelativeLayout(co
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getCurrentVolume() = activity!!.audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)
|
private fun getCurrentVolume() = activity?.audioManager?.getStreamVolume(AudioManager.STREAM_MUSIC) ?: 0
|
||||||
|
|
||||||
private fun getCurrentBrightness(): Int {
|
private fun getCurrentBrightness(): Int {
|
||||||
return try {
|
return try {
|
||||||
|
|
Loading…
Reference in a new issue