code: public static DeviceType getDevice(final HttpServletRequest request) {
  		// User agent
  		String userAgent = ((HttpServletRequest) request).getHeader("User-Agent");
  		if (Util.empty(userAgent)) {
  			LOG.warn("No User-Agent details in the request headers. Will assume normal device.");
  			return DeviceType.NORMAL;
  		}
  
  		// Check for device type
  		UAgentInfo agentInfo = new UAgentInfo(userAgent, null);
  		if (agentInfo.detectMobileQuick()) {
  			return DeviceType.MOBILE;
  		} else if (agentInfo.detectTierTablet()) {
  			return DeviceType.TABLET;
  		}
  		return DeviceType.NORMAL;
  	}
docs: Determine the user's device type from the {@link HttpServletRequest}.
  
  @param request the request being processed
  @return the device type