package Ġcom . b alys v . ver yn iced rink s Ċ Ċ import Ġandroid . annotation . Suppress Lint Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġio . reactivex . Flow able Ċ import Ġio . reactivex . Maybe Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . Single Ċ import Ġio . reactivex . android . schedul ers . Android Schedulers . main Thread Ċ import Ġio . reactivex . schedul ers . Schedulers . io Ċ import Ġandroid . content . Context Wrapper Ċ import Ġandroid . app . Activity ĊĊ Ċ const Ġval ĠDAG GER _ SERVICE _ NAME : ĠString Ġ= Ġ" D agger Service " Ċ Ċ @ Suppress (" UN CHECK ED _ CAST ") Ċ @ Suppress Lint (" Wrong Constant ") Ċ fun Ġ< T > ĠContext . get D agger Component (): ĠT Ġ{ ĊĠ Ġreturn Ġget System Service ( DAG GER _ SERVICE _ NAME ) Ġas ĠT Ċ } Ċ Ċ fun Ġ< T > ĠObservable < T >. bind Async Schedulers (): ĠObservable < T > Ġ{ ĊĠ Ġreturn Ġsubscribe On ( io ()). observe On ( main Thread ()) Ċ } Ċ Ċ fun Ġ< T > ĠFlow able < T >. bind Async Schedulers (): ĠFlow able < T > Ġ{ ĊĠ Ġreturn Ġsubscribe On ( io ()). observe On ( main Thread ()) Ċ } Ċ Ċ fun Ġ< T > ĠSingle < T >. bind Async Schedulers (): ĠSingle < T > Ġ{ ĊĠ Ġreturn Ġsubscribe On ( io ()). observe On ( main Thread ()) Ċ } Ċ Ċ fun Ġ< T > ĠMaybe < T >. bind Async Schedulers (): ĠMaybe < T > Ġ{ ĊĠ Ġreturn Ġsubscribe On ( io ()). observe On ( main Thread ()) Ċ } Ċ Ċ fun ĠViewGroup . inflate ( layout Res : ĠInt ): ĠView Ġ{ ĊĠ Ġreturn ĠLayoutInflater . from ( context ). inflate ( layout Res , Ġthis , Ġfalse ) Ċ } Ċ Ċ fun ĠContext . as Activity (): ĠActivity ? Ġ{ ĊĠ Ġvar Ġcontext Ġ= Ġthis ĊĠ Ġwhile Ġ( context Ġis ĠContext Wrapper ) Ġ{ ĊĠĠĠ Ġif Ġ( context Ġis ĠActivity ) Ġ{ ĊĠĠĠĠĠ Ġreturn Ġcontext ĊĠĠĠ Ġ} ĊĠĠĠ Ġcontext Ġ= Ġcontext . base Context ĊĠ Ġ} ĊĠ Ġreturn Ġnull Ċ } ĊĊ