Meshtastic-Android/app/src/main
James Rich a28dc377ae
fix: Handle node public key mismatch and show warning (#1720)
* Handle node public key mismatch and show warning

- Add a mismatchKey flag to Node and MessageTopBar to indicate a public key mismatch.
- Set the public key to a default error value (all zeros) when a node's public key changes.
- Display a warning in the MessageTopBar when a key mismatch is detected in PKC.
- Only clear all nodes when a different mynode number is present.

* feat: Add key mismatch detection to NodeInfoDao

This commit introduces a new feature to the `NodeInfoDao` that detects and handles public key mismatches for existing nodes.

-   A new function `upsertCheckKeyMatch` is added to `NodeInfoDao` that checks for public key changes when upserting a node. If a mismatch is detected, the public key is set to `ERROR_BYTE_STRING`, and a warning is logged.
- The function `upsertCheckKeyMatch` is used instead of `upsert` in `NodeRepository` and in `putAll` inside of `NodeInfoDao`.
-   A new test `testPkcMismatch` is added to `NodeInfoDaoTest` to verify the key mismatch detection.
- Changed `testNodes` to have unique public keys.
- Added `mismatchKey` state to the node model.

* detekt spacing

* Refactor: Correctly handle different node installations in NodeRepository

The logic for detecting different node installations in `NodeRepository.kt` was inverted, this commit fixes the logic to use `!=` instead of `==` to detect if the node number has changed.
2025-03-27 15:58:43 -05:00
..
aidl/com/geeksville/mesh feat: Adds Request user info (#1279) 2024-10-03 05:02:13 -03:00
assets feat: Add RAK2560 hardware model and graphic (#1543) 2025-02-15 22:17:57 -06:00
java/com/geeksville/mesh fix: Handle node public key mismatch and show warning (#1720) 2025-03-27 15:58:43 -05:00
play chore: Remove Discourse Links, Replace with Discussions (#1455) 2024-12-11 11:40:46 -03:00
proto@14ec205865 chore(protos): Meshtastic Protobufs v2.6.2 (#1693) 2025-03-19 10:00:32 -05:00
res feat #1632: Accessibility updates (#1705) 2025-03-23 20:26:28 -05:00
.gitignore we now request perms 2020-01-21 13:12:01 -08:00
AndroidManifest.xml chore: Unused code cleanup (#1612) 2025-02-27 16:18:42 -06:00
ic_launcher-114x114.png add icon for the amazon store 2020-07-14 22:05:38 -07:00
ic_launcher2-playstore.png update to latest launcher icon from @thepoweroftwo 2021-02-01 10:31:24 +08:00