package Ġeu . kan ade . t ach iz uma . ui . setting . track Ċ Ċ import Ġandroid . app . Dialog Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . core . os . bundle Of Ċ import Ġcom . google . android . material . dialog . Material AlertDialog Builder Ċ import Ġeu . kan ade . t ach iz uma . R Ċ import Ġeu . kan ade . t ach iz uma . data . track . Track Manager Ċ import Ġeu . kan ade . t ach iz uma . data . track . Track Service Ċ import Ġeu . kan ade . t ach iz uma . ui . base . controller . Dialog Controller Ċ import Ġeu . kan ade . t ach iz uma . util . system . toast Ċ import Ġu y . ko hes ive . in jekt . In jekt Ċ import Ġu y . ko hes ive . in jekt . api . get Ċ Ċ class ĠTrack Logout Dialog ( bundle : ĠBundle ? Ġ= Ġnull ) Ġ: ĠDialog Controller ( bundle ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġservice Ġ= ĠIn jekt . get < Track Manager >(). getService ( args . getInt (" service Id ")) !! ĊĊĠĠĠ Ġconstructor ( service : ĠTrack Service ) Ġ: Ġthis ( bundle Of (" service Id " Ġto Ġservice . id )) ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate Dialog ( saved ViewState : ĠBundle ?): ĠDialog Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠserviceName Ġ= Ġactivity !!. getString ( service . name Res ()) ĊĠĠĠĠĠĠĠ Ġreturn ĠMaterial AlertDialog Builder ( activity !! ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. setTitle ( activity !!. getString ( R . string . logout _ title , ĠserviceName )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Positive Button ( R . string . logout ) Ġ{ Ġ_, Ġ_ Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġservice . logout () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ( target Controller Ġas ? ĠListener )?. track Logout Dialog Closed ( service ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity ?. toast ( R . string . logout _ success ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Negative Button ( android . R . string . cancel , Ġnull ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. create () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġinterface ĠListener Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġtrack Logout Dialog Closed ( service : ĠTrack Service ) ĊĠĠĠ Ġ} Ċ } Ċ