package Ġcom . she ve lev . my _ foot prints _ re master ed . ui . activity _ first _ loading Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . fragment . app . Fragment Transaction Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . R Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . application . App Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . storage s . key _ value . KeyValue Storage Facade Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . sync . gd _ sign _ in . Google Drive Credentials Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . ui . activity _ first _ loading . di . First Loading Activity Component Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . ui . activity _ first _ loading . fragment _ google _ drive _ sign _ in . view . Google Drive SignIn Fragment Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . ui . activity _ first _ loading . fragment _ loading _ progress . view . Loading Progress Fragment Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . ui . activity _ main . MainActivity Ċ import Ġcom . she ve lev . my _ foot prints _ re master ed . ui . shared . mv vm . view . Activity Base Ċ import Ġdagger . Lazy Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠFirst Loading Activity Ġ: ĠActivity Base () Ġ{ ĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġinternal Ġlateinit Ġvar Ġkey Value Storage Facade : ĠLazy < KeyValue Storage Facade > ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġinternal Ġlateinit Ġvar Ġgoogle Drive Credentials : ĠGoogle Drive Credentials ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ first _ lo a ing ) ĊĊĠĠĠĠĠĠĠ Ġif ( savedInstanceState Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinit Screen () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinject ( key : ĠString ) Ġ= ĠApp . injection s . get < First Loading Activity Component >( key ). inject ( this ) ĊĊĠĠĠ Ġoverride Ġfun Ġrelease Injection ( key : ĠString ) Ġ= ĠApp . injection s . release < First Loading Activity Component >( key ) ĊĊĠĠĠ Ġfun Ġon Google Drive SignIn Fail () Ġ= Ġupdate Fragment Ġ{ Ġreplace ( R . id . fragment Container , ĠGoogle Drive SignIn Fragment . newInstance ()) Ġ} ĊĊĠĠĠ Ġfun Ġon Google Drive SignIn Success () Ġ{ ĊĠĠĠĠĠĠĠ Ġif ( key Value Storage Facade . get (). is Start Loading Completed ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmove To Main Screen () ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġupdate Fragment Ġ{ Ġreplace ( R . id . fragment Container , ĠLoading Progress Fragment . newInstance ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġmove To Main Screen () Ġ{ ĊĠĠĠĠĠĠĠ ĠstartActivity ( Intent ( this , ĠMainActivity :: class . java )) ĊĠĠĠĠĠĠĠ Ġfinish () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit Screen () Ġ{ ĊĠĠĠĠĠĠĠ Ġif ( google Drive Credentials . need ToS ing In ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġupdate Fragment Ġ{ Ġadd ( R . id . fragment Container , ĠGoogle Drive SignIn Fragment . newInstance ()) Ġ} ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif ( key Value Storage Facade . get (). is Start Loading Completed ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmove To Main Screen () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġupdate Fragment Ġ{ Ġadd ( R . id . fragment Container , ĠLoading Progress Fragment . newInstance ()) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġupdate Fragment ( fragment Action : ĠFragment Transaction . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsupport FragmentManager . beginTransaction (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfragment Action ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcommit () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }