Determine if the browser is Android and Samsung Galaxy or not, add by BugBuster
@return boolean True if the browser is Samsung Galaxy otherwise false
972605
protected function checkBrowserAndroidSamsungGalaxy() 
    {
	    if( stripos($this->_agent,'Android') !== false ) 
	    {
	        $this->setVersion(self::VERSION_UNKNOWN);
	        $this->setMobile(true);
	        
	    	if( stripos($this->_agent,'GT-I9000') !== false ) 
	    	{
    		    $this->setBrowser(self::BROWSER_GALAXY_S);
			    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I9001') !== false ) 
	    	{
			    $this->setBrowser(self::BROWSER_GALAXY_S_PLUS);
			    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I9100') !== false ) 
	    	{
			    $this->setBrowser(self::BROWSER_GALAXY_S_II);
			    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I9300') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S_III);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I8190') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S_III_MINI);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I9301') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S_III_NEO);
	    	    return true;
	    	}
	    	//S4
	    	if( stripos($this->_agent,'GT-I9500') !== false ||
	    	    stripos($this->_agent,'GT-I9505') !== false ||
	    	    stripos($this->_agent,'GT-I9506') !== false ||
	    	    stripos($this->_agent,'GT-I9515') !== false  )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S4);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I9195') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S4_MINI);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I9295') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S4_ACTIVE);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-C101') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S4_ZOOM);
	    	    return true;
	    	}
	    	//S5
	    	if( stripos($this->_agent,'SM-G900') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S5);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-G800') !== false ) 
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S5_MINI);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-G870') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S5_ACTIVE);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-C115') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S5_ZOOM);
	    	    return true;
	    	}
	    	//S6 
	    	if( stripos($this->_agent,'SM-G920') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S6);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-G890') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S6_ACTIVE);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-G9198') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S6_MINI);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-G925') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S6_EDGE);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'SM-G928') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_S6_EDGE_P);
	    	    return true;
	    	}
	    	
	    	
	    	if( stripos($this->_agent,'GT-S5830') !== false ) 
	    	{
			    $this->setBrowser(self::BROWSER_GALAXY_ACE);
			    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I8160') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_ACE_2);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-S7500') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_ACE_PLUS);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-I9250') !== false ||
	    	    stripos($this->_agent,'Galaxy Nexus Build') !== false ) 
	    	{
	    	    $this->setBrowser(self::BROWSER_SAMSUNG_GALAXY_NEXUS);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-N7000') !== false )
	    	{
	    	    $this->setBrowser(self::BROWSER_GALAXY_NOTE);
	    	    return true;
	    	}
	    	if( stripos($this->_agent,'GT-P1000') !== false ||
	    		stripos($this->_agent,'GT-P1010') !== false ||
	    		stripos($this->_agent,'GT-P7100') !== false ||
	    		stripos($this->_agent,'GT-P7300') !== false ||
	    		stripos($this->_agent,'GT-P7510') !== false ||
	    		stripos($this->_agent,'GT-P6200') !== false ||
	    		stripos($this->_agent,'GT-P6210') !== false )
	    	{
			    $this->setBrowser(self::BROWSER_GALAXY_TAB);
			    return true;
	    	}
	    }
	    return false;
    }
364427
protected function checkBrowserSafari()
    {
        if (stripos($this->_agent, 'Safari') !== false
            && stripos($this->_agent, 'iPhone') === false
            && stripos($this->_agent, 'iPod') === false
        ) {

            $aresult = explode('/', stristr($this->_agent, 'Version'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                $this->setVersion($aversion[0]);
            } else {
                $this->setVersion(self::VERSION_UNKNOWN);
            }
            $this->setBrowser(self::BROWSER_SAFARI);
            return true;
        }
        return false;
    }
639651
public static function checkBrowserLIEBAO(){
		if (stripos(self::$userAgentString, 'LBBROWSER') !== false) {
			self::$browser->setName(Browser::LIEBAO);
			return true;
		}

		return false;
	}
890682
protected function isMobile()
    {
        $detect = new MobileDetect();

        return ($detect->isMobile() === false && $detect->isTablet() === false) ? false : true;
    }
867324
public static function isMobileRequest()
    {
        $_SERVER['ALL_HTTP'] = isset($_SERVER['ALL_HTTP']) ? $_SERVER['ALL_HTTP'] : '';
     
        $mobile_browser = '0';
     
        if(preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|ipod|android|xoom)/i', strtolower($_SERVER['HTTP_USER_AGENT'])))
            $mobile_browser++;
     
        if((isset($_SERVER['HTTP_ACCEPT'])) and (strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') !== false))
            $mobile_browser++;
     
        if(isset($_SERVER['HTTP_X_WAP_PROFILE']))
            $mobile_browser++;
     
        if(isset($_SERVER['HTTP_PROFILE']))
            $mobile_browser++;
     
        $mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4));
        $mobile_agents = array(
                            'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac',
                            'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',
                            'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',
                            'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-',
                            'newt','noki','oper','palm','pana','pant','phil','play','port','prox',
                            'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar',
                            'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-',
                            'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp',
                            'wapr','webc','winw','winw','xda','xda-'
                            );
     
        if(in_array($mobile_ua, $mobile_agents))
            $mobile_browser++;
     
        if(strpos(strtolower($_SERVER['ALL_HTTP']), 'operamini') !== false)
            $mobile_browser++;
     
        // Pre-final check to reset everything if the user is on Windows
        if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') !== false)
            $mobile_browser=0;
     
        // But WP7 is also Windows, with a slightly different characteristic
        if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows phone') !== false)
            $mobile_browser++;
     
        if($mobile_browser>0)
            return true;
        else
            return false;
    }
972221
protected function checkBrowserAndroidAcerA500()
    {
        if( stripos($this->_agent,'Android') !== false )
        {
            if( stripos($this->_agent,'A500 Build') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_ACER_A500);
                return true;
            }
        }
        return false;
    }
463186
function _isAndroid() {
    var /** @type {?} */ userAgent = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__angular_platform_browser__["b" /* ɵgetDOM */])() ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__angular_platform_browser__["b" /* ɵgetDOM */])().getUserAgent() : '';
    return /android (\d+)/.test(userAgent.toLowerCase());
}
248974
def detectAndroidTablet(self):
        
        #First, let's make sure we're on an Android device.
        if not self.detectAndroid():
            return False

        #Special check for Android devices with Opera Mobile/Mini. They should NOT report here.
        if self.detectOperaMobile():
            return False

        #Otherwise, if it's Android and does NOT have 'mobile' in it, Google says it's a tablet.
        return UAgentInfo.mobile not in self.__userAgent
511125
function DetectFirefoxOSTablet()
   {
   	  //First, let's make sure we're NOT on another major mobile OS.
   	  if ($this->DetectIos() == $this->true 
   	  	|| $this->DetectAndroid() == $this->true
   	  	|| $this->DetectSailfish() == $this->true)
         return $this->false;    	  
   
      if ((stripos($this->useragent, $this->engineFirefox) > -1) &&
		(stripos($this->useragent, $this->deviceTablet) > -1))
         return $this->true;
            
      return $this->false; 
   }
191101
function DetectMobileQuick()
   {
      if ($this->initCompleted == $this->true ||
          $this->isMobilePhone == $this->true)
         return $this->isMobilePhone;

      //Let's exclude tablets
      if ($this->isTierTablet == $this->true) 
         return $this->false;
      
      //Most mobile browsing is done on smartphones
      if ($this->DetectSmartphone() == $this->true) 
         return $this->true;

      //Catch-all for many mobile devices
      if (stripos($this->useragent, $this->mobile) > -1)
         return $this->true; 

      if ($this->DetectOperaMobile() == $this->true)
         return $this->true;

      //We also look for Kindle devices
      if ($this->DetectKindle() == $this->true ||
         $this->DetectAmazonSilk() == $this->true) 
         return $this->true;

      if (($this->DetectWapWml() == $this->true) 
      		|| ($this->DetectMidpCapable() == $this->true)
			|| ($this->DetectBrewDevice() == $this->true))
         return $this->true;
          
      if ((stripos($this->useragent, $this->engineNetfront) > -1)
			|| (stripos($this->useragent, $this->engineUpBrowser) > -1))
         return $this->true; 
         
      return $this->false; 
   }
497276
def detect_firefox_o_s_phone()

      if (detect_ios() || detect_android() || detect_sailfish())
        return false
      end

      if ((user_agent.include?(ENGINE_FIREFOX)) && (user_agent.include?(MOBILE)))
        return true
      end

      return false
    end
509995
protected function checkBrowserChrome()
    {
        if (stripos($this->_agent, 'Chrome') !== false) {
            if (preg_match('/chrome\/([\.0-9]+) (mobile)?/i', $this->_agent, $matches)) {
                $this->setVersion($matches[1]);
                $this->setBrowser(self::BROWSER_CHROME);
                if (isset($matches[2])) {
                    $this->setMobile(true);
                }

                return true;
            }
        }

        return false;
    }
318302
protected function checkBrowseriPod()
    {
        if (stripos($this->_agent, 'iPod') !== false) {
            $this->setVersion(self::VERSION_UNKNOWN);
            $this->setBrowser(self::BROWSER_IPOD);
            $this->getSafariVersionOnIos();
            $this->getChromeVersionOnIos();
            $this->checkForFacebookIos();
            $this->setMobile(true);
            return true;
        }
        return false;
    }
239303
private function isSafari()
  {
    $is = false;
    if ( preg_match( "/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//", $this->ua, $matches ) )
    {
      // These things sometimes surf around acting like they're Safari.
      if ( !preg_match( "/(PhantomJS|Silk|rekonq|OPR|Chrome|Android|Edge|bot)/", $this->ua ) )
      {
        $is = true;
        $major = ( isset( $matches[ 2 ] ) ) ? $matches[ 2 ] : null;
        $minor = ( isset( $matches[ 3 ] ) ) ? $matches[ 3 ] : null;
        $rev = ( isset( $matches[ 4 ] ) ) ? $matches[ 4 ] : null;
        $version = ( isset( $major ) ) ? $major : null;
        $version .= ( isset( $minor ) ) ? '.' . $minor : null;
        $version .= ( isset( $rev ) ) ? '.' . $rev : null;
      }
    }
    // Versions below 3.x doe not have the Version/ in the UA.  Since we can't get the version number, we go with the
    // highest version that didn't have the version number in the UA.  It doesn't really matter, since this would be
    // a 'baseline' browser anyway.
    elseif ( preg_match("/(Safari)\/\d+/", $this->ua, $matches) )
    {
      // These things sometimes surf around acting like they're Safari.
      if ( !preg_match( "/(PhantomJS|Silk|rekonq|OPR|Chrome|Android|Edge|bot)/", $this->ua ) )
      {
        $is = true;
        $version = 2;
        $major = 2;
        $minor = 0;
        $rev = 4;
      }
    }

    if ( $is && isset( $version, $major, $minor ) )
    {
      $this->browser = 'safari';
      $this->version = $version;
      $this->major = $major;
      $this->minor = $minor;
      $this->rev = ( isset( $rev ) ) ? $rev : null;

      return true;
    }

    return false;
  }
909200
protected function checkBrowserNetscape()
    {
        //BlackBerry & Nokia UAs can conflict with Netscape UAs
        if ($this->containString($this->_agent, array('BlackBerry', 'Nokia'), true, false)) {
            return false;
        }

        //Netscape v6 to v9 check
        if ($this->checkSimpleBrowserUA(array('Netscape', 'Navigator', 'Netscape6'), $this->_agent, self::BROWSER_NETSCAPE)) {
            return true;
        }

        //Netscape v1-4 (v5 don't exists)
        $found = false;
        if ($this->containString($this->_agent, 'Mozilla') && !$this->containString($this->_agent, 'rv:', true, false)) {
            $version = '';
            $verParts = explode('/', stristr($this->_agent, 'Mozilla'));
            if (count($verParts) > 1) {
                $verParts = explode(' ', $verParts[1]);
                $verParts = explode('.', $verParts[0]);

                $majorVer = $this->parseInt($verParts[0]);
                if ($majorVer > 0 && $majorVer < 5) {
                    $version = implode('.', $verParts);
                    $found = true;

                    if (strtolower(substr($version, -4)) == '-sgi') {
                        $version = substr($version, 0, -4);
                    } else {
                        if (strtolower(substr($version, -4)) == 'gold') {
                            $version = substr($version, 0, -4) . ' Gold'; //Doubles spaces (if any) will be normalized by setVersion()
                        }
                    }
                }
            }
        }

        if ($found) {
            $this->setBrowser(self::BROWSER_NETSCAPE);
            $this->setVersion($version);
            $this->setMobile(false);
            $this->setRobot(false);
        }

        return $found;
    }
536537
public static function isUserAgentMobile() {
		
		$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
		
		$devices = array('phone', 'iphone', 'itouch', 'ipod', 'symbian', 'android', 'htc_', 'htc-',
				'palmos', 'blackberry', 'opera mini', 'iemobile', 'windows ce', 'nokia', 'fennec',
				'hiptop', 'kindle', 'mot ', 'mot-', 'webos\/', 'samsung', 'sonyericsson', '^sie-',
				'nintendo');
		
		if (preg_match('/' . implode('|', $devices) . '/', $user_agent)) {
			return TRUE;
		} else {
			return FALSE;
		}
		
	}
1196826
protected function checkBrowserAndroidHTCDesire()
    {
        if( stripos($this->_agent,'Android') !== false )
        {
            if( stripos($this->_agent,'HTC_DesireHD') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE_HD);
                return true;
            }
            if( stripos($this->_agent,'HTC Desire Z') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE_Z);
                return true;
            }
            if( stripos($this->_agent,'HTC_DesireS') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE_S);
                return true;
            }
            if( stripos($this->_agent,'HTC_Desire')   !== false ||
                stripos($this->_agent,'HTC Desire')   !== false ||
            	stripos($this->_agent,'Desire_A8181') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_HTC_DESIRE);
                return true;
            }
        }
        return false;
    }