package Ġcom . p unto gr is . are you ar obot Ċ Ċ import Ġandroid . annotation . Suppress Lint Ċ import Ġandroid . content . Context Ċ import Ġandroidx . preference . Preference Manager Ċ import Ġcom . p unto gr is . are you ar obot . utils . Constants . PLAYER _ NAME _ PRE F Ċ import Ġcom . p unto gr is . are you ar obot . utils . Utils Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠShared Pref Ġ@ Inject Ġconstructor (@ ApplicationContext Ġcontext : ĠContext ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġshared Pref Ġ= ĠPreference Manager . getDefault SharedPreferences ( context ) ĊĊĠĠĠ Ġfun Ġget Player Name () Ġ= ĊĠĠĠĠĠĠĠ Ġshared Pref . getString ( PLAYER _ NAME _ PRE F , ĠUtils . create Default Random Name ()) Ġ?: ĠUtils . create Default Random Name () ĊĊĠĠĠ Ġ@ Suppress Lint (" Commit Pref Ed its ") ĊĠĠĠ Ġfun Ġset Player Name ( input : ĠString ){ ĊĠĠĠĠĠĠĠ Ġval Ġplayer Name Ġ= Ġif Ġ( input . isEmpty ()) ĠUtils . create Default Random Name () Ġelse Ġinput ĊĠĠĠĠĠĠĠ Ġshared Pref . edit (). putString ( PLAYER _ NAME _ PRE F , Ġplayer Name ). apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġshow Robot Animation () Ġ= Ġshared Pref . contains ( PLAYER _ NAME _ PRE F ) Ċ }