Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Commit

Permalink
more TRACE log outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanson committed Mar 19, 2015
1 parent 38b9dd1 commit 8e9d566
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class MainActivity extends Activity implements
static final String UPLOAD_SECRET = "sLlx6PaL";

// unique ID sent to server to distinguish clients
// changes everytime logging is enabled
// changes every time logging is enabled
static String sessionId;

// Location update intervals
Expand Down Expand Up @@ -199,6 +199,7 @@ public void toggleLogging(View view) {
}

private void initWifiScan() {
log.trace("initWifi");
wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
wifiBroadcastReceiver = new WifiBroadcastReceiver(this);
wifiIntentFilter = new IntentFilter();
Expand Down Expand Up @@ -283,13 +284,15 @@ public void onLocationChanged(Location location) {
@Override
protected void onStart() {
super.onStart();
log.trace("onStart");
googleApiClient.connect();
log.trace("Connecting GoogleApiClient ...");
}

@Override
protected void onResume() {
super.onResume();
log.trace("onResume");
if (googleApiClient.isConnected()) {
startLocationUpdates();
}
Expand All @@ -304,6 +307,7 @@ protected void onResume() {
@Override
protected void onPause() {
super.onPause();
log.trace("onPause");

if (!loggingEnabled) {
this.unregisterReceiver(wifiBroadcastReceiver);
Expand All @@ -317,6 +321,7 @@ protected void onPause() {
@Override
protected void onStop() {
super.onStop();
log.trace("onStop");

if (!loggingEnabled) {
disconnectGoogleApiClient();
Expand All @@ -332,6 +337,7 @@ protected void onStop() {
@Override
protected void onDestroy() {
super.onDestroy();
log.trace("onDestroy");

disconnectGoogleApiClient();

Expand Down

0 comments on commit 8e9d566

Please sign in to comment.