package Ġcom . smart settings . ai . core . setting Ch ang ers Ċ Ċ import Ġandroid . media . Audio Manager Ċ import Ġcom . smart settings . ai . core . serial izable s . Serializable Data Ċ import Ġcom . smart settings . ai . data . action Data . Volume Action Data Ċ import Ġcom . smart settings . ai . di . Dependency Provider Ċ Ċ open Ġclass ĠVolume Setting Ch anger ( volume Action Data : ĠVolume Action Data ) Ġ: ĊĠĠĠ ĠSetting Ch anger < Volume Action Data >( Serializable Data ( volume Action Data )) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġaudio Manager : ĠAudio Manager Ġ= ĠDependency Provider . audio Manager ĊĊĠĠĠ Ġoverride Ġfun Ġask Setting Change Permission If Any ( permission Grant Callback : Ġ( Boolean ) Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġpermission Grant Callback ( true ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġis Permission Granted (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġapply Setting Changes ( action Data : ĠVolume Action Data ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġaudio Manager . set Stream Volume ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAudio Manager . STREAM _ RING , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġserial izable Action Data . data . volume ToBe Set , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġaudio Manager . get Stream Max Volume ( Audio Manager . STREAM _ RING ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġclass ĠM ute Setting Ch anger Ġ: ĠVolume Setting Ch anger ( Volume Action Data ( 0 )) Ċ }