Actually run thread in background.

`Thread.run()` is not the correct call, changed to the correct `Thread.start()`.
Also, explicitly indicate that we want the stopping of wifi to happen in the
background.
This commit is contained in:
Peter Serwylo 2016-02-26 09:15:01 +11:00
parent 1eae135929
commit ddbd9e2ea9
2 changed files with 3 additions and 4 deletions

View File

@ -99,7 +99,7 @@ public abstract class SwapType {
public void run() {
SwapType.this.stop();
}
}.run();
}.start();
}
}

View File

@ -302,9 +302,8 @@ public class StartSwapView extends ScrollView implements SwapWorkflowActivity.In
Utils.debugLog(TAG, "Received onCheckChanged(true) for WiFi swap, asking in background thread to ensure WiFi swap is running.");
getManager().getWifiSwap().ensureRunningInBackground();
} else {
Utils.debugLog(TAG, "Received onCheckChanged(false) for WiFi swap, disabling WiFi swap.");
getManager().getWifiSwap().stop();
Utils.debugLog(TAG, "Received onCheckChanged(false) for WiFi swap, WiFi swap disabled successfully.");
Utils.debugLog(TAG, "Received onCheckChanged(false) for WiFi swap, disabling WiFi swap in background thread.");
getManager().getWifiSwap().stopInBackground();
}
uiUpdateWifiNetwork();
}