1191 Simulation Mode

This adds a simulation mode to satisfy #1191.

This needs a testcase to verify that the application context being passed from the ScanManager down to GPSScanner, WifiScanner and CellScanner gets properly wrapped with the SimulationContext, but this branch should merge cleanly to dev.

Let's just merge it in and add more tests along the way.
Looks like a bad merge.  The null check is not necessary before we
instantiate and assign.

More generally,  this is a good example of why we should pull out the mock
location generation from the SimulationContext and use an injected
simulation service.

Ugh.  I'll take a better look at this on Monday
On Dec 28, 2014 12:12 PM, "Christian Ascheberg" <notifications@github.com>
wrote:

> In
> android/src/main/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/ScanManager.java
> <https://github.com/mozilla/MozStumbler/pull/1351#discussion-diff-22298955>
> :
>
> >          }
> >
> >          if (mGPSScanner == null) {
> > -            mGPSScanner = new GPSScanner(context, this);
> > -            mWifiScanner = new WifiScanner(context);
> > -            mCellScanner = new CellScanner(context);
> > +            mGPSScanner = new GPSScanner(mAppContext, this);
> > +            mWifiScanner = new WifiScanner(mAppContext);
> > +            mCellScanner = new CellScanner(mAppContext);
>
> @crankycoder <https://github.com/crankycoder> these are always reassigned
> below. Does that make sense?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mozilla/MozStumbler/pull/1351/files#r22298955>.
>