package Ġcom . ru u vi . station . app Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroid . bluetooth . Bluetooth Adapter Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Filter Ċ import Ġandroid . os . Power Manager Ċ import Ġcom . facebook . ste tho . St eth o Ċ import Ġcom . ra iz labs . android . db flow . config . Flow Manager Ċ import Ġcom . ru u vi . station . Build Config Ċ import Ġcom . ru u vi . station . app . di . App Injection Modules Ċ import Ġcom . ru u vi . station . app . preferences . Preferences Repository Ċ import Ġcom . ru u vi . station . bluetooth . Default On Tag Found Listener Ċ import Ġcom . ru u vi . station . bluetooth . domain . Bluetooth State Receiver Ċ import Ġcom . ru u vi . station . feature . data . Feature Flag Ċ import Ġcom . ru u vi . station . feature . domain . Runtime Behavior Ċ import Ġcom . ru u vi . station . feature . provider . Runtime Feature Flag Provider Ċ import Ġcom . ru u vi . station . network . domain . Network Data Sync Interactor Ċ import Ġcom . ru u vi . station . network . domain . R uu vi Network Interactor Ċ import Ġcom . ru u vi . station . util . Foreground Ċ import Ġcom . ru u vi . station . util . Foreground Listener Ċ import Ġcom . ru u vi . station . util . Release Tree Ċ import Ġcom . ru u vi . station . util . extensions . diff GreaterThan Ċ import Ġcom . ru u vi . station . util . test . Fake Scan Results Sender Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġorg . kode in . di . K ode in Ċ import Ġorg . kode in . di . K ode in Aware Ċ import Ġorg . kode in . di . conf . Configurable K ode in Ċ import Ġorg . kode in . di . generic . bind Ċ import Ġorg . kode in . di . generic . instance Ċ import Ġorg . kode in . di . generic . singleton Ċ import Ġtim ber . log . Tim ber Ċ import Ġjava . util .* Ċ Ċ @ Experimental Cor outines Api Ċ class ĠR uu vi Scanner Application Ġ: ĠApplication (), ĠK ode in Aware Ġ{ ĊĠĠĠ Ġoverride Ġval Ġk ode in Ġ= ĠConfigur able K ode in () ĊĊĠĠĠ Ġval Ġdefault On Tag Found Listener : ĠDefault On Tag Found Listener Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġf akes Sender : ĠFake Scan Results Sender Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġbluetooth Receiver : ĠBluetooth State Receiver Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġforeground : ĠFore ground Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġnetwork Interactor : ĠR uu vi Network Interactor Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġnetwork Data Sync Interactor : ĠNetwork Data Sync Interactor Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġpreferences Repository : ĠPreferences Repository Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġruntime Feature Flag Provider : ĠRuntime Feature Flag Provider Ġby Ġinstance () ĊĠĠĠ Ġprivate Ġval Ġruntime Behavior : ĠRuntime Behavior Ġby Ġinstance () ĊĊĠĠĠ Ġprivate Ġvar ĠisIn Foreground : ĠBoolean Ġ= Ġfalse ĊĊĠĠĠ Ġprivate Ġval Ġlistener : ĠFore ground Listener Ġ= Ġobject Ġ: ĠFore ground Listener Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon B ec ame Foreground () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTim ber . d (" on B ec ame Foreground ") ĊĠĠĠĠĠĠĠĠĠĠĠ ĠisIn Foreground Ġ= Ġtrue ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdefault On Tag Found Listener . is Foreground Ġ= Ġtrue ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Data Sync Interactor . start Auto Refresh () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġruntime Behavior . refresh Feature Flags () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon B ec ame Background () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTim ber . d (" on B ec ame Background ") ĊĠĠĠĠĠĠĠĠĠĠĠ ĠisIn Foreground Ġ= Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdefault On Tag Found Listener . is Foreground Ġ= Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Data Sync Interactor . stop Auto Refresh () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate () ĊĊĠĠĠĠĠĠĠ Ġif Ġ( Build Config . DEBUG ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTim ber . plant ( Tim ber . Debug Tree ()) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġif Ġ( Build Config . FILE _ LOG S _ ENABLED ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTim ber . plant ( Release Tree ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġsetup DependencyInjection () ĊĊĠĠĠĠĠĠĠ Ġ// L ing ver . init ( this , ĠLocale ( preferences Repository . getLocale ())) ĊĊĠĠĠĠĠĠĠ ĠFlow Manager . init ( this ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ( Build Config . DEBUG ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSte tho . initialize With Defaults ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// turn Ġon Ġfor Ġdebug Ġif Ġyou Ġdon 't Ġhave Ġreal Ġr uu vi Ġtag ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// f akes Sender . start Send F akes () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġregister Receiver ( bluetooth Receiver , ĠIntent Filter ( Bluetooth Adapter . ACTION _ STATE _ CHANGED )) ĊĊĠĠĠĠĠĠĠ Ġdefault On Tag Found Listener . is Foreground Ġ= ĠisIn Foreground ĊĠĠĠĠĠĠĠ Ġforeground . addListener ( listener ) ĊĊĠĠĠĠĠĠĠ Ġsetup Experimental Features () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġsetup DependencyInjection () Ġ{ ĊĠĠĠĠĠĠĠ Ġk ode in . apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadd Import ( App Injection Modules . module ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġadd Import ( K ode in . Module ( java Class . name ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġbind < Application >() Ġwith Ġsingleton Ġ{ Ġthis @ R uu vi Scanner Application Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġbind < Power Manager >() Ġwith Ġsingleton Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis @ R uu vi Scanner Application . getSystem Service ( Context . POWER _ SERVICE ) Ġas ĠPower Manager ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġsetup Experimental Features () Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( network Interactor . signed In ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġruntime Feature Flag Provider . set Feature Enabled ( Feature Flag . R UU VI _ NETWORK , Ġtrue ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }