Skip to content

Commit

Permalink
Adds detection for Glory Star and improves detection for Android (mat…
Browse files Browse the repository at this point in the history
…omo-org#7767)

* Improves version detection for Android
* Adds detection for Glory Star
  • Loading branch information
liviuconcioiu authored Aug 8, 2024
1 parent 4729129 commit 9ca2b42
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'GLB' => 'Globmall',
'38' => 'GLONYX',
'U6' => 'Glofiish',
'GLO' => 'Glory Star',
'G7' => 'GoGEN',
'GC' => 'GOCLEVER',
'5G' => 'Gocomma',
Expand Down
8 changes: 8 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5158,3 +5158,11 @@
version: ""
platform: ""
family: GNU/Linux
-
user_agent: Mozilla/5.0 (Linux; StarOS 9) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/4.7.2 Chrome/91.0.4472.77 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "9"
platform: ""
family: Android
18 changes: 18 additions & 0 deletions Tests/fixtures/tablet-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8325,3 +8325,21 @@
model: MiTraveler 958
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; StarOS 9) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/4.7.2 Chrome/91.0.4472.77 Mobile Safari/537.36
os:
name: Android
version: "9"
platform: ""
client:
type: browser
name: Firefox Focus
version: 4.7.2
engine: Blink
engine_version: 91.0.4472.77
device:
type: tablet
brand: Glory Star
model: ""
os_family: Android
browser_family: Unknown
6 changes: 6 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36734,6 +36734,12 @@ Glofiish:
device: 'tablet'
model: 'G Pad Air'

# Glory Star (https://www.glorystartouch.com/)
Glory Star:
regex: 'StarOS'
device: 'tablet'
model: ''

# Polar (polar.ru)
Polar:
regex: 'Polar(?:_W?K?)?[_ ]P\d{2}|(?:P42L31T2CSM|P32L33T2CSM)(?:[);/ ]|$)'
Expand Down
2 changes: 1 addition & 1 deletion regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@
name: 'Android'
version: ''

- regex: '(?:Android OS|OMDroid|sdk_gphone64_arm64-userdebug)[ /](\d+[\.\d]*)'
- regex: '(?:Android OS|OMDroid|sdk_gphone64_arm64-userdebug|StarOS)[ /](\d+[\.\d]*)'
name: 'Android'
version: '$1'

Expand Down

0 comments on commit 9ca2b42

Please sign in to comment.