Skip to content

Commit

Permalink
Adds detection for TechPad devices (matomo-org#5805)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl authored Sep 12, 2018
1 parent fc22668 commit 7e45218
Show file tree
Hide file tree
Showing 8 changed files with 274 additions and 81 deletions.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'T4' => 'ThL',
'TH' => 'TiPhone',
'TB' => 'Tecno Mobile',
'TP' => 'TechPad',
'TD' => 'Tesco',
'TI' => 'TIANYU',
'TL' => 'Telefunken',
Expand Down
2 changes: 1 addition & 1 deletion Tests/fixtures/phablet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@
model: GALAXY Note 8
os_family: Android
browser_family: Unknown
-
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; SM-N960F Build/M1AJQ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36
os:
name: Android
Expand Down
40 changes: 20 additions & 20 deletions Tests/fixtures/smartphone-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5552,26 +5552,6 @@
model: "6.1"
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.1.1; TA-1004 Build/NMF26F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.1.1"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "60.0.3112.116"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: NK
model: 8
os_family: Android
browser_family: Chrome
-
user_agent: Nokia210/2.0 (04.12) Profile/MIDP-2.1 Configuration/CLDC-1.1 UCWEB/2.0 (Java; U; MIDP-2.0; en-US; Nokia210) U2/1.0.0 UCBrowser/9.3.0.326 U2/1.0.0 Mobile
os:
Expand Down Expand Up @@ -5652,6 +5632,26 @@
model: 7 plus
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.1.1; TA-1004 Build/NMF26F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.1.1"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "60.0.3112.116"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: NK
model: 8
os_family: Android
browser_family: Chrome
-
user_agent: OneBrowser/3.1 (Nokia7230/06.90)
os:
Expand Down
80 changes: 40 additions & 40 deletions Tests/fixtures/smartphone-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7378,6 +7378,46 @@
model: Tlink475
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Tech Pad +Q545 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "4.4.2"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "51.0.2704.81"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: TP
model: +Q545
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; Techpad X5 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "7.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "68.0.3440.91"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: TP
model: X5
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.3; el-gr; Turbo-X pi Build/JLS36C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
Expand Down Expand Up @@ -9869,43 +9909,3 @@
model: Birdy
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; BLOOM Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "4.4.2"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "30.0.0.0"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: WI
model: Bloom
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.1.2; CINK FIVE Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "4.1.2"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "34.0.1847.114"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: WI
model: Cink FIVE
os_family: Android
browser_family: Chrome
40 changes: 40 additions & 0 deletions Tests/fixtures/smartphone-6.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
---
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; BLOOM Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "4.4.2"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "30.0.0.0"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: WI
model: Bloom
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.1.2; CINK FIVE Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "4.1.2"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "34.0.1847.114"
engine: Blink
engine_version: ""
device:
type: smartphone
brand: WI
model: Cink FIVE
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.0.4; CINK KING Build/IMM76D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19
os:
Expand Down
157 changes: 157 additions & 0 deletions Tests/fixtures/tablet-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4116,6 +4116,163 @@
model: QM735-8G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; S813G Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.116 Safari/537.36
os:
name: Android
short_name: AND
version: "6.0"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: "60.0.3112.116"
engine: Blink
engine_version: ""
device:
type: tablet
brand: TP
model: S813G
os_family: Android
browser_family: Chrome
-
user_agent: 'Mozilla/5.0 (Linux; Android 4.4.4; Xtab 7 Build/KTU84Q) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/42.0.0.27.114;]'
os:
name: Android
short_name: AND
version: "4.4.4"
platform: ""
client:
type: mobile app
name: Facebook
version: "42.0.0.27.114"
device:
type: tablet
brand: TP
model: XTAB 7
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.3; hu-hu; xTAB-70dc Build/xTAB-70dc.8GB.20121102) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
os:
name: Android
short_name: AND
version: "4.0.3"
platform: ""
client:
type: browser
name: Android Browser
short_name: AN
version: ""
engine: WebKit
engine_version: "534.30"
device:
type: tablet
brand: TP
model: XTAB 70dc
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; Android 4.2.1; XTAB 781+ Build/JOP40D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.137 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "4.2.1"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "64.0.3282.137"
engine: Blink
engine_version: ""
device:
type: tablet
brand: TP
model: XTAB 781+
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.2.2; es-la; Xtab-781+ Build/JDQ39) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 UCBrowser/9.6.0.378 U3/0.8.0 Mobile Safari/533.1
os:
name: Android
short_name: AND
version: "4.2.2"
platform: ""
client:
type: browser
name: UC Browser
short_name: UC
version: "9.6.0.378"
engine: WebKit
engine_version: "533.1"
device:
type: tablet
brand: TP
model: XTAB 781+
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 4.2.2; Dual C1081HD Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.117 Safari/537.36 OPR/24.0.1565.82529
os:
name: Android
short_name: AND
version: "4.2.2"
platform: ""
client:
type: browser
name: Opera
short_name: OP
version: "24.0.1565.82529"
engine: Blink
engine_version: ""
device:
type: tablet
brand: TP
model: XTAB C1081HD
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.1.1; es-us; Xtab Dual C1081+ Build/GT11K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
os:
name: Android
short_name: AND
version: "4.1.1"
platform: ""
client:
type: browser
name: Android Browser
short_name: AN
version: ""
engine: WebKit
engine_version: "534.30"
device:
type: tablet
brand: TP
model: XTAB Dual C1081+
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Xtab i700 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Safari/537.36
os:
name: Android
short_name: AND
version: "4.4.2"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: "48.0.2564.95"
engine: Blink
engine_version: ""
device:
type: tablet
brand: TP
model: XTAB i700
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.3; ro-ro; Turbo-X Ice Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
os:
Expand Down
20 changes: 0 additions & 20 deletions Tests/fixtures/unknown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -876,26 +876,6 @@
model: ""
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.3; hu-hu; xTAB-70dc Build/xTAB-70dc.8GB.20121102) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
os:
name: Android
short_name: AND
version: "4.0.3"
platform: ""
client:
type: browser
name: Android Browser
short_name: AN
version: ""
engine: WebKit
engine_version: "534.30"
device:
type: ""
brand: ""
model: ""
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.3; id-id; IMO TAB X9 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
os:
Expand Down
Loading

0 comments on commit 7e45218

Please sign in to comment.