UserAgentDevice.javaUser-Agent header. Stored in MySession for mobile-aware UI rendering.Ten device values are recognized: ANDROID, BLACKBERRY, IPHONE, IPAD, IPOD, SMARTPHONE, SYMBIAN, WAP, WINDOWS_MOBILE, and UNKNOWN. Note the historical quirk: iPad detection contains a bug — the check for "ipad" incorrectly maps to IPOD instead of a separate IPAD constant.
Key methods:
getUserAgentDevice(String) — Static factory that analyzes the User-Agent string (lowercased) via substring checks. Searches in order: Android → BlackBerry → iPhone → iPad → iPod → Smartphone → Symbian → WAP → Windows Phone/CE → UNKNOWN.isIn(UserAgentDevice...) — Varargs membership test for grouping devices.isMobile() — Convenience check returning true for all values except UNKNOWN (and implicitly IPAD since tablets are not included in the mobile set).This enum feeds into the session layer to adjust page rendering for mobile clients — e.g., simplified layouts, touch-optimized controls. Unlike UserAgentBrowser which identifies the software, UserAgentDevice identifies the hardware platform.
868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 5f7ef41b8 Copyright 2021 -> 2022 ceb63e8a1 Source code header: (C) 2001-2021. 7c79f1922 Copyright of source header -> 2020. 000ca723d Remove pointless boolean expressions (business) dd5ca38ac CopyRight of all java file-header updated or created. 9ebb88522 Initial commit