The Fleet Android Agent's orbit-enroll did not match the existing
AMAPI-created host record on Fleet instances with Apple MDM disabled,
creating a duplicate hosts row alongside the AMAPI-enrolled one. The
Android-specific UUID match clause in matchHostDuringEnrollment was
gated by isMDMEnabled, which only reflects Apple MDM status. Gate the
clause on platform="android" instead. The Fleet Android Agent always
sends this since PR #43809, and the SELECT itself filters
platform=android, so the clause is Android-safe by construction and no
longer depends on the Apple-MDM flag. The serial-match clause keeps its
existing isMDMEnabled gate.
<!-- Add the related story/sub-task/bug number, like Resolves#123, or
remove if NA -->
**Related issue:** Resolves#46001
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
## Testing
- [x] Updated tests
- [x] QA'd all new/changed functionality manually
For unreleased bug fixes in a release candidate, one of:
- [x] Confirmed that the fix is not expected to adversely impact load
test results
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Prevents duplicate host records when enrolling Android devices on
instances with Apple MDM disabled.
* Improves enrollment host-matching so devices are identified by their
platform, reducing misattributed or duplicate hosts during enrollment.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/46008?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->