package Ġcom . android . my application . movies . util Ċ Ċ import Ġandroid . os . Handler Ċ import Ġandroid . os . Looper Ċ import Ġjava . util . concurrent . Executor Ċ import Ġjava . util . concurrent . Executors Ċ Ċ public Ġclass ĠApp Executors Ġ{ ĊĠĠĠ Ġ// executor Ġto Ġdeal Ġwith Ġthe ĠDAO ĊĠĠĠ Ġval Ġdisk IO Ġ= ĠExec utors . new Single Thread Executor () ĊĠĠĠ Ġ// executor Ġto Ġput Ġrunnable Ġinto Ġthe Ġmain ĠThread Ġqueue Ġfrom Ġa Ġbackground Ġthread ĊĠĠĠ Ġval Ġmain Thread Executor Ġ= ĠMain Thread Executor () ĊĊĠĠĠ Ġclass ĠMain Thread Executor Ġ: ĠExecutor Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġmain Thread Handler Ġ= ĠHandler ( Looper . get Main Looper ()) ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġexecute ( command : ĠRunnable ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmain Thread Handler . post ( command ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }