package Ġcom . si ju . ac explorer . storage . model . operations Ċ Ċ import Ġandroid . content . Broadcast Receiver Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġcom . si ju . ac explorer . logging . Logger Ċ import Ġcom . si ju . ac explorer . storage . model . operations . Operation Utils . ACTION _ OP _ REFRESH Ċ import Ġcom . si ju . ac explorer . storage . model . operations . Operation Utils . KEY _ FILES _ COUNT Ċ import Ġcom . si ju . ac explorer . storage . model . operations . Operation Utils . KEY _ OPERATION Ċ Ċ private Ġconst Ġval ĠTAG Ġ= Ġ" Operation Result Receiver " Ċ Ċ class ĠOperation Result Receiver ( private Ġval Ġoperation Helper : ĠOperation Helper ) Ġ: ĠBroadcast Receiver () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġon Receive ( context : ĠContext , Ġintent : ĠIntent ) Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen ( intent . action ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠACTION _ OP _ REFRESH Ġ Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġbundle Ġ= Ġintent . extras ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġoperation Ġ= Ġbundle ?. get Serializable ( KEY _ OPERATION ) Ġas ĠOperations ? ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoperation ?. let Ġ{ Ġon Operation Result ( intent , Ġit ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġon Operation Result ( intent : ĠIntent , Ġoperation : ĠOperations ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLogger . log ( TAG , Ġ" on Operation Result : Ġ$ operation ") ĊĠĠĠĠĠĠĠ Ġval Ġcount Ġ= Ġintent . getInt Extra ( KEY _ FILES _ COUNT , Ġ 0 ) ĊĠĠĠĠĠĠĠ Ġoperation Helper . on OperationCompleted ( operation , Ġcount ) ĊĠĠĠ Ġ} Ċ } Ċ