package Ġio . mount x . w uk ung . settings Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . SharedPreferences Ċ Ċ private Ġfun ĠContext . get Settings Sp FileName () Ġ= ĊĠĠĠ Ġ"$ packageName . settings " Ċ Ċ fun ĠContext . get Settings Sp (): ĠSharedPreferences Ġ= ĊĠĠĠ Ġget SharedPreferences ( get Settings Sp FileName (), ĠContext . MODE _ PRIVATE ) ĊĊ Ċ const Ġval ĠSP _ KEY _ N IGHT _ MODE Ġ= Ġ" night _ mode "