Use Build.MODEL for device hostname instead of Build.PRODUCT#209
Conversation
Build.PRODUCT returns the internal AOSP build product name (e.g. "raven", "sdk_gphone64_arm64"), which is not human-readable. Build.MODEL returns the user-facing model name (e.g. "Pixel 6"), which makes for a more recognizable peer hostname in NetBird. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-line change modifies the ChangesDevice Identifier Update
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The Android client uses
deviceName()inChangeServerFragmentas the peer hostname reported to the NetBird management server (flows throughLoginWithSetupKeyAndSaveConfig→system.DeviceNameCtxKey→Info.Hostname).It previously returned
Build.PRODUCT, which is the internal AOSP build product name (e.g.raven,sdk_gphone64_arm64) — not human-readable.This changes it to
Build.MODEL, the user-facing model name (e.g.Pixel 6), giving a more recognizable peer hostname in the NetBird dashboard.Change
app/src/main/java/io/netbird/client/ui/server/ChangeServerFragment.javaprivate String deviceName() { - return Build.PRODUCT; + return Build.MODEL; }🤖 Generated with Claude Code
Summary by CodeRabbit