Android tablets don't need mobile theme
authorJamie Cameron <jcameron@webmin.com>
Thu, 28 Jul 2011 19:11:49 +0000 (12:11 -0700)
committerJamie Cameron <jcameron@webmin.com>
Thu, 28 Jul 2011 19:11:49 +0000 (12:11 -0700)
miniserv.pl

index 75b694b..a541b11 100755 (executable)
@@ -5270,19 +5270,24 @@ local @substrings = (
     "iPhone",            # Apple iPhone KHTML browser
     "iPod",              # iPod touch browser
     "MobileSafari",      # HTTP client in iPhone
-    "Android",           # gPhone
     "Opera Mini",        # Opera Mini
     "HTC_P3700",         # HTC mobile device
     "Pre/",              # Palm Pre
     "webOS/",            # Palm WebOS
     "Nintendo DS",       # DSi / DSi-XL
     );
+local @regexps = (
+    "Android.*Mobile",   # Android phone
+    );
 foreach my $p (@prefixes) {
        return 1 if ($agent =~ /^\Q$p\E/);
        }
 foreach my $s (@substrings, @mobile_agents) {
        return 1 if ($agent =~ /\Q$s\E/);
        }
+foreach my $s (@regexps) {
+       return 1 if ($agent =~ /$s/);
+       }
 return 0;
 }