mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 12:05:32 -04:00
universal7885: Clamp DolbyCore.getProfile()'s returned value
Change-Id: I267a4ea4c6bf51347d2ba2c0f59e95d144b9c7d3 Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
7319be6f31
commit
a281ee2318
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ object DolbyCore {
|
||||||
fun getProfile(): Int {
|
fun getProfile(): Int {
|
||||||
val out = intArrayOf(PROFILE_AUTO)
|
val out = intArrayOf(PROFILE_AUTO)
|
||||||
audioEffect?.getParameter(EFFECT_PARAM_PROFILE, out)
|
audioEffect?.getParameter(EFFECT_PARAM_PROFILE, out)
|
||||||
return out.first()
|
return out.first().coerceIn(PROFILE_AUTO, PROFILE_SPACIAL_AUDIO)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getProfileName(context: Context): String {
|
fun getProfileName(context: Context): String {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue