package Ġorg . opp ia . app . settings . profile Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġorg . opp ia . app . activity . Injectable AppCompatActivity Ċ import Ġjavax . inject . Inject Ċ Ċ const Ġval ĠKEY _ PROFILE _ EDIT _ PROFILE _ ID Ġ= Ġ" KEY _ PROFILE _ EDIT _ PROFILE _ ID " Ċ Ċ /** ĠActivity Ġthat Ġallows Ġuser Ġto Ġedit Ġa Ġprofile . Ġ*/ Ċ class ĠProfile Edit Activity Ġ: ĠInjectable AppCompatActivity () Ġ{ ĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġprofile Edit Activity Presenter : ĠProfile Edit Activity Presenter ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġfun Ġcreate Profile Edit Activity ( context : ĠContext , Ġprofile Id : ĠInt ): ĠIntent Ġ{ ĊĠĠĠĠĠ Ġval Ġintent Ġ= ĠIntent ( context , ĠProfile Edit Activity :: class . java ) ĊĠĠĠĠĠ Ġintent . putExtra ( KEY _ PROFILE _ EDIT _ PROFILE _ ID , Ġprofile Id ) ĊĠĠĠĠĠ Ġreturn Ġintent ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠ Ġactivity Component . inject ( this ) ĊĠĠĠ Ġprofile Edit Activity Presenter . handle On Create () ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Restore InstanceState ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠ Ġsuper . on Restore InstanceState ( savedInstanceState ) ĊĠĠĠ Ġprofile Edit Activity Presenter . handle On Restore Saved InstanceState () ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Support Navigate Up (): ĠBoolean Ġ{ ĊĠĠĠ Ġval Ġintent Ġ= ĠIntent ( this , ĠProfile List Activity :: class . java ) ĊĠĠĠ Ġintent . add Flags ( Intent . FLAG _ ACTIVITY _ CLEAR _ TOP ) ĊĠĠĠ ĠstartActivity ( intent ) ĊĠĠĠ Ġreturn Ġfalse ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Back Pressed () Ġ{ ĊĠĠĠ Ġval Ġintent Ġ= ĠIntent ( this , ĠProfile List Activity :: class . java ) ĊĠĠĠ Ġintent . add Flags ( Intent . FLAG _ ACTIVITY _ CLEAR _ TOP ) ĊĠĠĠ ĠstartActivity ( intent ) ĊĠ Ġ} Ċ } Ċ