package Ġfeature a . android . simulator Ċ Ċ import Ġfeature a . android . MainActivity Proxy Ċ import Ġfeature a . jvm . normalized Path Ċ import Ġfeature a . utils . log Ċ import Ġfeature a . runtime . Component Ċ import Ġfeature a . runtime . Module Ċ import Ġfeature a . runtime . import Ċ import Ġfeature a . settings . Settings Service Ċ import Ġfeature a . utils . currentThread Specifier Ċ import Ġfeature a . utils . run On Application Thread Ċ import Ġjava . io . File Ċ Ċ internal Ġvar Ġlast Bundle Path : ĠString ? Ġ= Ġnull Ġ// Ġquick fix Ġtodo Ġimprove Ċ Ċ class ĠSimulator ( override Ġval Ġmodule : ĠModule ) Ġ: ĠComponent Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġmain Activity : ĠSimulator Activity Ġby Ġlazy Ġ{ Ġimport ( MainActivity Proxy ) Ġas ĠSimulator Activity Ġ} ĊĠĠĠ Ġprivate Ġval Ġsimulator : ĠSimulator Ġ= Ġthis ĊĠĠĠ Ġprivate Ġval Ġsettings Service : ĠSettings Service Ġ= Ġimport () ĊĊĠĠĠ Ġvar Ġwith Splash : ĠBoolean Ġ= Ġfalse Ġ// Ġquick fix Ġtodo Ġimprove ĊĠĠĠĠĠĠĠ Ġprivate Ġset ĊĊĠĠĠ Ġfun Ġopen Bundle ( bundle File : ĠFile , Ġwith Splash : ĠBoolean ) Ġ= Ġrun On Application Thread Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ(! bundle File . exists ()) Ġreturn @ run On Application Thread ĊĠĠĠĠĠĠĠ Ġlog ("[ Simulator ] Ġopen Bundle : Ġ$ bundle File Ġ(${ currentThread Specifier () }) ") ĊĠĠĠĠĠĠĠ Ġsimulator . with Splash Ġ= Ġwith Splash ĊĠĠĠĠĠĠĠ Ġlast Bundle Path Ġ= Ġbundle File . normalized Path ĊĠĠĠĠĠĠĠ Ġsettings Service [" last Bundle Path "] Ġ= Ġbundle File . normalized Path ĊĠĠĠĠĠĠĠ Ġif Ġ( with Splash ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmain Activity . update ActionBar Preference () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmain Activity . nav Controller . navigate ( R . id . app Fragment ) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmain Activity . nav Controller . navigate ( R . id . action _ bundles Fragment _ to _ app Fragment ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ Ċ } Ċ