diff --git a/README.md b/README.md index befdda53..4e0f11ec 100644 --- a/README.md +++ b/README.md @@ -131,10 +131,11 @@ the [Network Survey Messaging](https://github.com/christianrowlands/network-surv library can be used to stand up a gRPC server. From there it is up to the implementation to handle the incoming survey messages. -If you want to see how to use the generated Go code to create a gRPC server, check out the code at +If you want to see how to use the generated Go code to create a gRPC server, check out the code at https://github.com/christianrowlands/ns-messaging-go-grpc-server -The server does not do anything useful, but serves as an example of how one might be created in GoLang. +The server does not do anything useful, but serves as an example of how one might be created in +GoLang. ## MQTT Broker Survey Record Streaming diff --git a/networksurvey/src/main/java/com/craxiom/networksurvey/fragments/CalculatorFragment.java b/networksurvey/src/main/java/com/craxiom/networksurvey/fragments/CalculatorFragment.java index 3b8723ab..62cc09de 100644 --- a/networksurvey/src/main/java/com/craxiom/networksurvey/fragments/CalculatorFragment.java +++ b/networksurvey/src/main/java/com/craxiom/networksurvey/fragments/CalculatorFragment.java @@ -12,8 +12,8 @@ import androidx.fragment.app.Fragment; -import com.craxiom.networksurvey.util.CalculationUtils; import com.craxiom.networksurvey.R; +import com.craxiom.networksurvey.util.CalculationUtils; import com.craxiom.networksurvey.util.CellularUtils; import timber.log.Timber; diff --git a/networksurvey/src/main/java/com/craxiom/networksurvey/logging/PhoneStateRecordLogger.java b/networksurvey/src/main/java/com/craxiom/networksurvey/logging/PhoneStateRecordLogger.java index a074baad..347dc570 100644 --- a/networksurvey/src/main/java/com/craxiom/networksurvey/logging/PhoneStateRecordLogger.java +++ b/networksurvey/src/main/java/com/craxiom/networksurvey/logging/PhoneStateRecordLogger.java @@ -24,8 +24,8 @@ import com.craxiom.networksurvey.constants.csv.PhoneStateCsvConstants; import com.craxiom.networksurvey.listeners.IDeviceStatusListener; import com.craxiom.networksurvey.services.NetworkSurveyService; -import com.craxiom.networksurvey.util.NsUtils; import com.craxiom.networksurvey.util.MathUtils; +import com.craxiom.networksurvey.util.NsUtils; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Strings; diff --git a/networksurvey/src/main/java/com/craxiom/networksurvey/services/SurveyRecordProcessor.java b/networksurvey/src/main/java/com/craxiom/networksurvey/services/SurveyRecordProcessor.java index 58bad0ac..9e533cda 100644 --- a/networksurvey/src/main/java/com/craxiom/networksurvey/services/SurveyRecordProcessor.java +++ b/networksurvey/src/main/java/com/craxiom/networksurvey/services/SurveyRecordProcessor.java @@ -99,9 +99,9 @@ import com.craxiom.networksurvey.model.NrRecordWrapper; import com.craxiom.networksurvey.model.WifiRecordWrapper; import com.craxiom.networksurvey.services.controller.CellularController; -import com.craxiom.networksurvey.util.NsUtils; import com.craxiom.networksurvey.util.LocationUtils; import com.craxiom.networksurvey.util.MathUtils; +import com.craxiom.networksurvey.util.NsUtils; import com.craxiom.networksurvey.util.ParserUtils; import com.craxiom.networksurvey.util.PreferenceUtils; import com.craxiom.networksurvey.util.WifiUtils; diff --git a/networksurvey/src/main/java/com/craxiom/networksurvey/services/controller/CellularController.java b/networksurvey/src/main/java/com/craxiom/networksurvey/services/controller/CellularController.java index ad0f2aeb..ad52a436 100644 --- a/networksurvey/src/main/java/com/craxiom/networksurvey/services/controller/CellularController.java +++ b/networksurvey/src/main/java/com/craxiom/networksurvey/services/controller/CellularController.java @@ -29,7 +29,6 @@ import androidx.core.app.ActivityCompat; import androidx.localbroadcastmanager.content.LocalBroadcastManager; -import com.craxiom.networksurvey.util.CalculationUtils; import com.craxiom.networksurvey.SimChangeReceiver; import com.craxiom.networksurvey.constants.NetworkSurveyConstants; import com.craxiom.networksurvey.listeners.CdrSmsObserver; @@ -45,6 +44,7 @@ import com.craxiom.networksurvey.model.LogTypeState; import com.craxiom.networksurvey.services.NetworkSurveyService; import com.craxiom.networksurvey.services.SurveyRecordProcessor; +import com.craxiom.networksurvey.util.CalculationUtils; import com.craxiom.networksurvey.util.NsUtils; import com.craxiom.networksurvey.util.PreferenceUtils; diff --git a/networksurvey/src/main/java/com/craxiom/networksurvey/util/LegacyRecordConversion.java b/networksurvey/src/main/java/com/craxiom/networksurvey/util/LegacyRecordConversion.java index 9e158081..6a6ae852 100644 --- a/networksurvey/src/main/java/com/craxiom/networksurvey/util/LegacyRecordConversion.java +++ b/networksurvey/src/main/java/com/craxiom/networksurvey/util/LegacyRecordConversion.java @@ -1,5 +1,7 @@ package com.craxiom.networksurvey.util; +import static com.craxiom.networksurvey.util.NsUtils.getEpochFromRfc3339; + import com.craxiom.messaging.CdmaRecord; import com.craxiom.messaging.CdmaRecordData; import com.craxiom.messaging.DeviceStatus; @@ -13,8 +15,6 @@ import com.craxiom.networksurvey.messaging.Error; import com.craxiom.networksurvey.messaging.LteBandwidth; -import static com.craxiom.networksurvey.util.NsUtils.getEpochFromRfc3339; - /** * Utility methods to help with converting the newer survey record protobuf objects to the old format. This class should * only exist for a short amount of time while usages of the old protobuf records are removed from other code bases. @@ -45,7 +45,10 @@ public static com.craxiom.networksurvey.messaging.DeviceStatus convertDeviceStat builder.setAltitude(data.getAltitude()); builder.setDeviceName((data.getDeviceName())); - if (data.hasBatteryLevelPercent()) builder.setBatteryLevelPercent(data.getBatteryLevelPercent().getValue()); + if (data.hasBatteryLevelPercent()) + { + builder.setBatteryLevelPercent(data.getBatteryLevelPercent().getValue()); + } if (data.hasError()) { builder.setError(Error.newBuilder().setErrorMessage(data.getError().getErrorMessage()).build());