package Ġcom . pay pay . currency converter . pref Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . SharedPreferences Ċ import Ġandroidx . preference . Preference Manager Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdagger . h ilt . android . scopes . Activity Ret ained Scoped Ċ import Ġjavax . inject . Inject Ċ Ċ private Ġconst Ġval ĠKEY _ LAST _ FETCH _ TIME Ġ= Ġ" key _ last _ fetch _ time " Ċ Ċ @ Activity Ret ained Scoped Ċ class ĠPreference Provider Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġ@ ApplicationContext Ġprivate Ġval Ġcontext : ĠContext Ċ ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġpreference : ĠSharedPreferences ĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠPreference Manager . getDefault SharedPreferences ( context ) ĊĊĠĠĠ Ġfun Ġsave Latest Fetch Time ( f etched At : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġpreference . edit (). put Int ( KEY _ LAST _ FETCH _ TIME , Ġfetched At ). apply () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠgetLast Fetch Time (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġpreference . getInt ( KEY _ LAST _ FETCH _ TIME , Ġ 0 ) ĊĠĠĠ Ġ} Ċ Ċ }