Ejemplo n.º 1
0
 public boolean isMobileBrowser(String BrowserAgent) {
   if (BrowserAgent == null) return false;
   StringBuilder c_input = new StringBuilder(Server.srv.MOBILE_BROWSER_REGEX);
   c_input.trimToSize();
   Pattern p = Pattern.compile(c_input.toString().toLowerCase());
   Matcher m = p.matcher(BrowserAgent.toLowerCase());
   if (m.find()) {
     Server.log(
         this,
         "found Mobile Browser [" + m.group() + "] (" + BrowserAgent + ")",
         Server.MSG_TRAFFIC,
         Server.LVL_VERBOSE);
     return true;
   } else return false;
 }