| 8 | import androidx.preference.PreferenceManager; |
| 9 | |
| 10 | public class App extends android.app.Application { |
| 11 | private static App instance; |
| 12 | private DiskCache diskCache; |
| 13 | public App() { |
| 14 | instance = this; |
| 15 | } |
| 16 | |
| 17 | public static SharedPreferences getPrefs() { |
| 18 | return PreferenceManager.getDefaultSharedPreferences(instance); |
| 19 | } |
| 20 | public static App getInstance() { |
| 21 | return instance; |
| 22 | } |
| 23 | public void setDiskCache(DiskCache diskCache) { |
| 24 | this.diskCache = diskCache; |
| 25 | } |
| 26 | public DiskCache getDiskCache() { |
| 27 | return diskCache; |
| 28 | } |
| 29 | |
| 30 | @Override public void onCreate() { |
| 31 | super.onCreate(); |
| 32 | AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); |
| 33 | } |
| 34 | } |
nothing calls this directly
no outgoing calls
no test coverage detected