package Ġcom . simp ly app . plate . calculator Ċ Ċ import Ġandroid . app . Activity Ċ import Ġandroid . app . Application Ċ import Ġandroid . preference . Preference Manager Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ BLUE Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ G OLD Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ GRAY Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ GREEN Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ OR ANGE Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ PIN K Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ PUR PLE Ċ import Ġcom . simp ly app . plate . calculator . data . model . Plate Constants . Companion . PL ATE _ VALUE _ SUM O Ċ import Ġdagger . android . Dispatch ing Android Injector Ċ import Ġdagger . android . Has Dispatch ing Activity Injector Ċ import Ġtim ber . log . Tim ber Ċ import Ġjavax . inject . Inject Ċ Ċ open Ġclass ĠP late Calculator App Ġ: ĠApplication (), ĠHas Dispatch ing Activity Injector Ġ{ ĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġdispatch ing Android Injector : ĠDispatch ing Android Injector < Activity > ĊĊĠĠĠ Ġval Ġpreferences Ġby Ġlazy Ġ{ ĠPreference Manager . getDefault SharedPreferences ( this ) Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġcomponent Ġ= Ġcreate Component () ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate () ĊĊĠĠĠĠĠĠĠ Ġif Ġ( Build Config . DEBUG ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTim ber . plant ( Tim ber . Debug Tree ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcomponent . inject ( this ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ( preferences . getInt ( this . getString ( R . string . pref _ first _ opened ), Ġ 0 ) Ġ!= ĠBuild Config . VERSION _ CODE ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpreferences . edit () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Int ( this . getString ( R . string . pref _ first _ opened ), ĠBuild Config . VERSION _ CODE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ green _ plate ), ĠP LATE _ VALUE _ GREEN ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ blue _ plate ), ĠP LATE _ VALUE _ BLUE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ purple _ plate ), ĠP LATE _ VALUE _ PUR PLE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ orange _ plate ), ĠP LATE _ VALUE _ OR ANGE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ pink _ plate ), ĠP LATE _ VALUE _ PIN K ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ gray _ plate ), ĠP LATE _ VALUE _ GRAY ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ gold _ plate ), ĠP LATE _ VALUE _ G OLD ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. put Float ( this . getString ( R . string . pref _ sum o _ plate ), ĠP LATE _ VALUE _ SUM O ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. apply () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġactivity Injector (): ĠDispatch ing Android Injector < Activity >? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġdispatch ing Android Injector ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprotected Ġopen Ġfun Ġcreate Component (): ĠBase App Component Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠD agger App Component . builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. app Module ( App Module ( this )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcomponent (): ĠBase App Component Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcomponent ĊĠĠĠ Ġ} Ċ } Ċ