package Ġcom . cw lar son . device id . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . SharedPreferences Ċ import Ġcom . cw lar son . device id . app updates . Fake App Update Manager Wrapper Ċ import Ġcom . cw lar son . device id . settings . Preference Manager Ċ import Ġcom . google . android . play . core . app update . App Update Manager Ċ import Ġcom . google . android . play . core . app update . App Update ManagerFactory Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdagger . h ilt . components . Singleton Component Ċ import Ġtim ber . log . Tim ber Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ object ĠApp Module Ġ{ ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovides Preferences (@ ApplicationContext Ġcontext : ĠContext ): ĠSharedPreferences Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġandroidx . preference . Preference Manager . getDefault SharedPreferences ( context ) ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovides App M anger (@ ApplicationContext Ġcontext : ĠContext , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpreference Manager : ĠPreference Manager ): ĠApp Update Manager Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d ("${ preference Manager . use Fake Update Manager }") ĊĠĠĠĠĠĠĠ Ġreturn Ġif Ġ( preference Manager . use Fake Update Manager ) ĠFake App Update Manager Wrapper ( context ) ĊĠĠĠĠĠĠĠ Ġelse ĠApp Update ManagerFactory . create ( context ) ĊĠĠĠ Ġ} Ċ }