Skip to content

Commit

Permalink
improve detection of alcatel one touch devices
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Jul 12, 2015
1 parent ac228d6 commit 657c152
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 22 deletions.
61 changes: 59 additions & 2 deletions Tests/fixtures/smartphone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,25 @@
model: One Touch 4007D
os_family: Android
browser_family: Android Browser
-
user_agent: UCWEB/2.0 (MIDP-2.0; U; Adr 2.3.6; en-US; ONE_TOUCH_4007D) U2/1.0.0 UCBrowser/9.0.2.389 U2/1.0.0 Mobile
os:
name: Android
short_name: AND
version: "2.3.6"
platform:
client:
type: browser
name: UC Browser
short_name: UC
version: "9.0.2.389"
engine:
device:
type: smartphone
brand: AL
model: One Touch 4007D
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; ALCATEL ONE TOUCH 4010A Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
Expand Down Expand Up @@ -436,6 +455,25 @@
model: ONE TOUCH 4012A
os_family: Firefox OS
browser_family: Firefox
-
user_agent: UCWEB/2.0 (MIDP-2.0; U; Adr 4.2.2; en-US; ONE_TOUCH_4033E) U2/1.0.0 UCBrowser/9.4.0.460 U2/1.0.0 Mobile
os:
name: Android
short_name: AND
version: "4.2.2"
platform:
client:
type: browser
name: UC Browser
short_name: UC
version: "9.4.0.460"
engine:
device:
type: smartphone
brand: AL
model: One Touch 4033E
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 4.1.1; ALCATEL ONE TOUCH 5020A Build/JRO03C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Mobile Safari/537.36 OPR/21.0.1437.74904
os:
Expand Down Expand Up @@ -505,7 +543,7 @@
device:
type: smartphone
brand: AL
model: one touch 585
model: One Touch 585
os_family: Unknown
browser_family: Unknown
-
Expand Down Expand Up @@ -603,6 +641,25 @@
model: One Touch 918S
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; ONE_TOUCH_960C Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
name: Android
short_name: AND
version: "2.3.6"
platform:
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: smartphone
brand: AL
model: One Touch 960C
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; ALCATEL ONE TOUCH 985 Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
Expand Down Expand Up @@ -676,7 +733,7 @@
device:
type: smartphone
brand: AL
model: ONE TOUCH 991
model: One Touch 991
os_family: Android
browser_family: Unknown
-
Expand Down
38 changes: 19 additions & 19 deletions Tests/fixtures/tablet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1880,25 +1880,6 @@
model: Vodafone Smart Tab 4G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 1.0.3; fr-fr; A80KSC Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
os:
name: Android
short_name: AND
version: "1.0.3"
platform:
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: tablet
brand: AN
model: 8
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.2.1; fr-fr; A101B Build/MASTER) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
Expand Down Expand Up @@ -2355,6 +2336,25 @@
model: 7h G3
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 1.0.3; fr-fr; A80KSC Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
os:
name: Android
short_name: AND
version: "1.0.3"
platform:
client:
type: browser
name: Android Browser
short_name: AN
version:
engine: WebKit
device:
type: tablet
brand: AN
model: 8
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.3; fr-fr; AN8G2I Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
os:
Expand Down
4 changes: 3 additions & 1 deletion regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Airness:

# Alcatel
Alcatel:
regex: 'Alcatel|Alc[a-z0-9]+|One ?Touch|Smart ?Tab ?4G'
regex: 'Alcatel|Alc[a-z0-9]+|One[ _]?Touch|Smart ?Tab ?4G'
device: 'smartphone'
models:
- regex: 'Smart ?Tab ?4G'
Expand All @@ -366,6 +366,8 @@ Alcatel:
model: 'One Touch $1'
- regex: '(?:Alcatel[ _])?One[ _]?Touch([^/;]*) Build'
model: 'One Touch$1'
- regex: '(?:Alcatel[ _])?One[ _]?Touch([^/;\)]*)\)'
model: 'One Touch$1'
- regex: 'Alcatel UP'
model: ''
- regex: 'ALCATEL([^/;]+) Build'
Expand Down

0 comments on commit 657c152

Please sign in to comment.