i introduced a crash a8f2b2d742026a542b8751a622252e584e6e72b6 that i fixed in 02c953d91b3dcae6a2bf6a808854d2d5921986be. a unit test would have easily caught this.
i think the steps here are:
Happy to pick this up
@ahmedre when you say turn it into a Singleton, you mean via Dagger or just by plain Java?
Also I presume this involves turning static methods to instance methods?
either one - preferably dagger though.
so it'd look like:
@Singleton
public class AudioUtils {
private final Context appContext;
@Inject
public AudioUtils(Context appContext) {
this.appContext = appContext;
}
}
and then when you want to use it (i.e. in PagerActivity
for example), you'd just do
@Inject AudioUtils audioUtils;
since PagerActivity
already deals with injection for you, you should be able to use it easily whenever you need it.
Most helpful comment
Happy to pick this up