detectDeviceType

Classify the host device into a DeviceType for per-URI asset targeting (see resolveTargetedUri).

This is Android platform glue, not portable brain behaviour, so it has no cross-language conformance fixture — deliberately mirroring the web detectDeviceType, which sniffs a User-Agent string and is likewise excluded. Android can do far better than a UA heuristic: the system tells us directly whether we are on a TV, and the smallest-width qualifier is the same signal the resource system uses to pick layout-sw600dp.

Order matters: TV first, because an Android TV device also reports a large smallest-width and would otherwise be classified as a tablet.

DeviceType.DESKTOP is never returned — it has no Android meaning. An asset array targeting only desktop therefore falls through to its untargeted default here, which is the intended behaviour.