diff --git a/app/build.gradle b/app/build.gradle index 630d5c81..137fa275 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -76,8 +76,6 @@ android { ndk { // abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" } - - buildConfigField "int", "TIMESTAMP", System.currentTimeSeconds().toString() } bundle { language { diff --git a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt index 4dbe7c07..bcd53c97 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt @@ -907,8 +907,8 @@ class MeshService : Service(), Logging { private fun handleReceivedMeshPacket(packet: MeshPacket) { if (haveNodeDB) { processReceivedMeshPacket(packet.toBuilder().apply { - // If the rxTime is invalid (earlier than build time), update with current time - if (packet.rxTime < BuildConfig.TIMESTAMP) setRxTime(currentSecond()) + // If the rxTime was not set by the device, update with current time + if (packet.rxTime == 0) setRxTime(currentSecond()) }.build()) onNodeDBChanged() } else {