package Ġorg . fo ss as ia . sus i . ai . device . connected devices Ċ Ċ import Ġorg . fo ss as ia . sus i . ai . data . contract . IR oom Model Ċ import Ġorg . fo ss as ia . sus i . ai . data . device . Room Model Ċ import Ġorg . fo ss as ia . sus i . ai . device . connected devices . contract . I Connected Device Presenter Ċ import Ġorg . fo ss as ia . sus i . ai . device . connected devices . contract . I Connected Device View Ċ import Ġorg . fo ss as ia . sus i . ai . rest . responses . sus i . Connected Devices Response Ċ import Ġretrofit 2 . Response Ċ import Ġtim ber . log . Tim ber Ċ Ċ class ĠConnected Device Presenter ( private Ġval Ġconnected Device View : ĠI Connected Device View ) Ġ: ĊĠĠĠĠĠĠĠ ĠI Connected Device Presenter , ĊĠĠĠĠĠĠĠ ĠI Room Model . on Connected Device Fetching Finished Listener Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġroom Model : ĠRoom Model Ġ= ĠRoom Model () ĊĊĠĠĠ Ġoverride Ġfun Ġget Devices () Ġ{ ĊĠĠĠĠĠĠĠ Ġroom Model . get Connected Devices ( this ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Room Model Success ( response : ĠResponse < Connected Devices Response >) Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" Showing Ġlist Ġof Ġconnected Ġdevices ") ĊĠĠĠĠĠĠĠ Ġval Ġdevice Response Ġ= Ġresponse . body () ĊĠĠĠĠĠĠĠ Ġval Ġdevice Response Map Ġ= Ġdevice Response ?. devices ĊĠĠĠĠĠĠĠ Ġconnected Device View ?. get Connected Device Details ( device Response Map ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonError ( throwable : ĠThrowable ) Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" Failed Ġto Ġfetch Ġdata Ġabout Ġlist Ġof Ġavailable Ġdevices ") ĊĠĠĠĠĠĠĠ ĠTim ber . d ( throwable ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġopen View Device ( position : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġconnected Device View ?. view Device ( position ) ĊĠĠĠ Ġ} Ċ } Ċ