From 605ef120c937a45710ea0972ae7ba8562e1b8583 Mon Sep 17 00:00:00 2001 From: andrekir Date: Sat, 2 Nov 2024 06:13:36 -0300 Subject: [PATCH] fix: remove build timestamp (breaking reproducible builds) reverts 9f099f3edfb9a0d759e13942b4d4e576f69eaf98 --- app/build.gradle | 2 -- app/src/main/java/com/geeksville/mesh/service/MeshService.kt | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) 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 {