Skip to content

Commit

Permalink
fixes #5300 - added detection for iTel devices
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Jan 18, 2015
1 parent a0dda9f commit 7272d26
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 0 deletions.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'IQ' => 'INQ',
'IT' => 'Intek',
'IV' => 'Inverto',
'IZ' => 'iTel',
'JI' => 'Jiayu',
'JO' => 'Jolla',
'KA' => 'Karbonn',
Expand Down
180 changes: 180 additions & 0 deletions Tests/fixtures/smartphone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9101,6 +9101,186 @@
model: Nuclea N1
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.5; fr-fr; iNote beyond Build/MocorDroid2.3.5) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
name: Android
short_name: AND
version: 2.3.5
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: smartphone
brand: IZ
model: iNote beyond
os_family: Android
browser_family: Android Browser
-
user_agent: 'JUC (Linux; U; 2.3.5; zh-cn; iNote_beyond; 480*854) UCWEB7.9.0.94/139/444'
os:
name: GNU/Linux
short_name: LIN
version:
client:
type: browser
name: UC Browser
short_name: UC
version: 7.9.0.94
engine:
device:
type: smartphone
brand: IZ
model: iNote beyond
os_family: GNU/Linux
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.5; fr-fr; iNote mini Build/MocorDroid2.3.5) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
name: Android
short_name: AND
version: 2.3.5
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: smartphone
brand: IZ
model: iNote mini
os_family: Android
browser_family: Android Browser
-
user_agent: UCWEB/2.0 (Linux; U; Adr 2.3.5; en-US; iNote_mini) U2/1.0.0 UCBrowser/8.7.0.315 U2/1.0.0 Mobile
os:
name: Android
short_name: AND
version: 2.3.5
client:
type: browser
name: UC Browser
short_name: UC
version: 8.7.0.315
engine:
device:
type: smartphone
brand: IZ
model: iNote mini
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.5; fr-fr; itel IT1351 Build/MocorDroid2.3.5) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
name: Android
short_name: AND
version: 2.3.5
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: smartphone
brand: IZ
model: IT1351
os_family: Android
browser_family: Android Browser
-
user_agent: UCWEB/2.0 (Linux; U; Opera Mini/7.1.32052/30.3697; en-US; itel_IT1351) U2/1.0.0 UCBrowser/9.1.1.420 Mobile
os:
name: GNU/Linux
short_name: LIN
version:
client:
type: browser
name: Opera Mini
short_name: OI
version: 7.1.32052
engine: Presto
device:
type: smartphone
brand: IZ
model: IT1351
os_family: GNU/Linux
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.1.2; fr-be; itel IT1351E Build/JZO57K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.1.2
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: smartphone
brand: IZ
model: IT1351E
os_family: Android
browser_family: Android Browser
-
user_agent: UCWEB/2.0 (Linux; U; Adr 4.1.2; fr-BE; itel_IT1351E) U2/1.0.0 UCBrowser/8.6.0.276 U2/1.0.0 Mobile
os:
name: Android
short_name: AND
version: 4.1.2
client:
type: browser
name: UC Browser
short_name: UC
version: 8.6.0.276
engine:
device:
type: smartphone
brand: IZ
model: IT1351E
os_family: Android
browser_family: Unknown
-
user_agent: UCWEB/2.0 (Linux; U; Adr 2.3.5; fr-FR; itel_it1400) U2/1.0.0 UCBrowser/8.6.0.276 U2/1.0.0 Mobile
os:
name: Android
short_name: AND
version: 2.3.5
client:
type: browser
name: UC Browser
short_name: UC
version: 8.6.0.276
engine:
device:
type: smartphone
brand: IZ
model: it1400
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.1.2; fr-be; itel it1500 Build/JZO57K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.1.2
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: smartphone
brand: IZ
model: it1500
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.4; zh-cn; JY-G2 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
Expand Down
14 changes: 14 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,20 @@ iKoMo:
device: 'feature phone'
model: '$1'

# iTel
iTel:
regex: 'itel|iNote'
device: 'smartphone'
models:
- regex: 'iNote ([^/;]*)Build'
model: 'iNote $1'
- regex: 'iNote_([a-z0-9-_]+)'
model: 'iNote $1'
- regex: 'iTel ([^/;]*)Build'
model: '$1'
- regex: 'iTel_([a-z0-9-_]*)'
model: '$1'

#Jiayu
Jiayu:
regex: '(JY-[a-z0-9]+) Build'
Expand Down

0 comments on commit 7272d26

Please sign in to comment.