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

Commit 8e9d566

Browse files
committed
more TRACE log outputs
1 parent 38b9dd1 commit 8e9d566

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/main/java/com/tomjanson/wifilocationlogger/MainActivity.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class MainActivity extends Activity implements
5858
static final String UPLOAD_SECRET = "sLlx6PaL";
5959

6060
// unique ID sent to server to distinguish clients
61-
// changes everytime logging is enabled
61+
// changes every time logging is enabled
6262
static String sessionId;
6363

6464
// Location update intervals
@@ -199,6 +199,7 @@ public void toggleLogging(View view) {
199199
}
200200

201201
private void initWifiScan() {
202+
log.trace("initWifi");
202203
wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
203204
wifiBroadcastReceiver = new WifiBroadcastReceiver(this);
204205
wifiIntentFilter = new IntentFilter();
@@ -283,13 +284,15 @@ public void onLocationChanged(Location location) {
283284
@Override
284285
protected void onStart() {
285286
super.onStart();
287+
log.trace("onStart");
286288
googleApiClient.connect();
287289
log.trace("Connecting GoogleApiClient ...");
288290
}
289291

290292
@Override
291293
protected void onResume() {
292294
super.onResume();
295+
log.trace("onResume");
293296
if (googleApiClient.isConnected()) {
294297
startLocationUpdates();
295298
}
@@ -304,6 +307,7 @@ protected void onResume() {
304307
@Override
305308
protected void onPause() {
306309
super.onPause();
310+
log.trace("onPause");
307311

308312
if (!loggingEnabled) {
309313
this.unregisterReceiver(wifiBroadcastReceiver);
@@ -317,6 +321,7 @@ protected void onPause() {
317321
@Override
318322
protected void onStop() {
319323
super.onStop();
324+
log.trace("onStop");
320325

321326
if (!loggingEnabled) {
322327
disconnectGoogleApiClient();
@@ -332,6 +337,7 @@ protected void onStop() {
332337
@Override
333338
protected void onDestroy() {
334339
super.onDestroy();
340+
log.trace("onDestroy");
335341

336342
disconnectGoogleApiClient();
337343

0 commit comments

Comments
 (0)