package Ġorg . rd toolkit . interop Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġorg . rd toolkit . interop . translator . Interop Repository Ċ import Ġorg . rd toolkit . support . interop . R dt Intent Builder . Companion . INT ENT _ EXTRA _ INPUT _ TRANSL ATOR Ċ import Ġorg . rd toolkit . support . interop . R dt Intent Builder . Companion . INT ENT _ EXTRA _ R DT _ CONFIG _ B UNDLE Ċ import Ġorg . rd toolkit . support . interop . R dt Intent Builder . Companion . INT ENT _ EXTRA _ R DT _ SESSION _ B UNDLE Ċ import Ġorg . rd toolkit . support . interop . R dt Intent Builder . Companion . INT ENT _ EXTRA _ R DT _ SESSION _ ID Ċ import Ġorg . rd toolkit . support . interop . Session To Bundle Ċ import Ġorg . rd toolkit . support . model . session . Test Session Ċ import Ġorg . rd toolkit . ui . provision . Provision Activity Ċ Ċ fun Ġprovision Intent ( context Ġ: ĠContext , Ġincoming : ĠIntent ) Ġ: ĠIntent Ġ{ ĊĠĠĠ Ġvar Ġto Bootstrap Ġ= Ġincoming ĊĠĠĠ Ġincoming . getString Extra ( INT ENT _ EXTRA _ INPUT _ TRANSL ATOR )?. let Ġ{ ĊĠĠĠĠĠĠĠ Ġto Bootstrap Ġ= ĠInter op Repository (). get Translator ( it ). map ( incoming ) ĊĠĠĠĠĠĠĠ Ġto Bootstrap . putExtra ( INT ENT _ EXTRA _ R DT _ SESSION _ ID , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġincoming . getString Extra ( INT ENT _ EXTRA _ R DT _ SESSION _ ID )) ĊĠĠĠ Ġ} ĊĠĠĠ Ġvar Ġto Return Ġ= ĠIntent ( context , ĠPro vision Activity :: class . java ) ĊĠĠĠ Ġbootstrap ( to Return , Ġto Bootstrap ) ĊĊĠĠĠ Ġreturn Ġto Return Ċ } Ċ Ċ fun Ġbootstrap ( new Intent : ĠIntent , Ġold Intent : ĠIntent ) Ġ{ ĊĠĠĠ Ġnew Intent . putExtra ( INT ENT _ EXTRA _ R DT _ SESSION _ ID , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġold Intent . getString Extra ( INT ENT _ EXTRA _ R DT _ SESSION _ ID )) ĊĊĠĠĠ Ġnew Intent . putExtra ( INT ENT _ EXTRA _ R DT _ CONFIG _ B UNDLE , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġold Intent . get Bundle Extra ( INT ENT _ EXTRA _ R DT _ CONFIG _ B UNDLE )) Ċ Ċ } Ċ Ċ fun Ġprovision Return Intent ( session Ġ: ĠTest Session ) Ġ: ĠIntent Ġ{ ĊĠĠĠ Ġval Ġintent Ġ= ĠIntent () ĊĠĠĠ Ġintent . putExtra ( INT ENT _ EXTRA _ R DT _ SESSION _ ID , Ġsession . sessionId ) ĊĠĠĠ Ġintent . putExtra ( INT ENT _ EXTRA _ R DT _ SESSION _ B UNDLE , ĠSession To Bundle (). map ( session )) ĊĠĠĠ Ġreturn Ġintent Ċ } Ċ Ċ fun Ġcapture Return Intent ( session Ġ: ĠTest Session ) Ġ: ĠIntent Ġ{ ĊĠĠĠ Ġval Ġintent Ġ= ĠIntent () ĊĠĠĠ Ġintent . putExtra ( INT ENT _ EXTRA _ R DT _ SESSION _ ID , Ġsession . sessionId ) ĊĠĠĠ Ġintent . putExtra ( INT ENT _ EXTRA _ R DT _ SESSION _ B UNDLE , ĠSession To Bundle (). map ( session )) ĊĠĠĠ Ġreturn Ġintent Ċ } Ċ