public String getDeviceType(HttpServletRequest req) {

        CmsTemplateContext templateContext = (CmsTemplateContext)(req.getAttribute(
            CmsTemplateContextManager.ATTR_TEMPLATE_CONTEXT));
        if ((templateContext != null) && isTemplateContextCompatible(templateContext)) {
            return templateContext.getKey();
        }
        m_userAgentInfo = new UAgentInfo(
            req.getHeader(CmsRequestUtil.HEADER_USER_AGENT),
            req.getHeader(CmsRequestUtil.HEADER_ACCEPT));
        if (m_userAgentInfo.detectMobileQuick()) {
            return C_MOBILE;
        }

        if (m_userAgentInfo.getIsTierTablet()) {
            return C_TABLET;
        }
        return C_DESKTOP;
    }
public String getDeviceType ( HttpServletRequest req ) { CmsTemplateContext templateContext = ( CmsTemplateContext ) ( req . getAttribute ( CmsTemplateContextManager . ATTR_TEMPLATE_CONTEXT ) ) ; if ( ( templateContext != null ) && isTemplateContextCompatible ( templateContext ) ) { return templateContext . getKey ( ) ; } m_userAgentInfo = new UAgentInfo ( req . getHeader ( CmsRequestUtil . HEADER_USER_AGENT ) , req . getHeader ( CmsRequestUtil . HEADER_ACCEPT ) ) ; if ( m_userAgentInfo . detectMobileQuick ( ) ) { return C_MOBILE ; } if ( m_userAgentInfo . getIsTierTablet ( ) ) { return C_TABLET ; } return C_DESKTOP ; }
@see org.opencms.jsp.util.I_CmsJspDeviceSelector#getDeviceType(javax.servlet.http.HttpServletRequest)