protected override void OnStop()
{
base.OnStop();
// This app can't do it's job in the background. Clean up and kill the activity.
// Release locks
_wakeLock.Release();
_wifiLock.Release();
// Stop the automation thread
_autoThread.Abort();
_autoThread.Join();
// Kill the activity
Finish();
}