package Ġcom . group ify . group ify Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . support . v 7 . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . preference . Preference Manager Ċ import Ġandroid . util . Log Ċ import Ġandroid . view . View Ċ import Ġcom . group ify . group ify . on boarding . On Board ing Activity Ċ Ċ class ĠSpl ash Screen Activity Ġ: ĠAppCompatActivity (), ĠSpotify Session Helper . Login Finished Callback Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġon Finished () Ġ= Ġgo Home () ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġwindow . set Flags ( View . SYSTEM _ UI _ FLAG _ LAYOUT _ FULL SCREEN , ĠView . SYSTEM _ UI _ FLAG _ LAYOUT _ FULL SCREEN ); ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ splash _ screen ) ĊĠĠĠĠĠĠĠ ĠPreference Manager . getDefault SharedPreferences ( this ). getString ( getString ( R . string . spotify _ token _ pref ), Ġnull )?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLog . e (" Token ", Ġit ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLog . e (" Id ", ĠPreference Helper . get Spot ify UserId ( this )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġgo Home () ĊĠĠĠĠĠĠĠ Ġ} Ġ?: ĠSpotify Session Helper . spotify Login ( this ) ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Activity Result ( request Code : ĠInt , ĠresultCode : ĠInt , Ġdata : ĠIntent ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ(! Spot ify Session Helper . login Finished ( this , Ġthis , Ġrequest Code , ĠresultCode , Ġdata )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsuper . on Activity Result ( request Code , ĠresultCode , Ġdata ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġgo Home () Ġ{ ĊĠĠĠĠĠĠĠ Ġif ( Preference Helper . has Seen On Board ing ( this )) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( Intent ( this , ĠHome Activity :: class . java )) ĊĠĠĠĠĠĠĠ Ġelse ĊĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( Intent ( this , ĠOn Board ing Activity :: class . java )) ĊĠĠĠĠĠĠĠ Ġfinish () ĊĠĠĠ Ġ} Ċ Ċ } Ċ