Prevent NPE from null location listeners in mock mode.
Handles configuration changes in sample application.