mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
dc56c0508f
Any class that has access to a context should call Prefs.getInstance(Context) which is guaranteed to return a Prefs. With no context, classes can call Prefs.getInstanceWithoutContext() but they must null-check the return, and handle accordingly. Fortunately, the latter case happens in very few places, all of which require no special handling of this case. This change: - maintains context-less access to the Prefs - classes internal to the service can safely call getInstanceWithoutContext(), as the service (or the MainApp in the stumbler case) will have instantiated a Prefs so that getInstanceWithoutContext() will return a prefs - protects against null Prefs if we have failed to consider a particular entry point to the code will require that Prefs was instatiated with a context. |
||
---|---|---|
.. | ||
java/org/mozilla/mozstumbler/service | ||
manifests | ||
Makefile.in | ||
moz.build | ||
stumbler_sources.mozbuild |