Skip to content

Commit

Permalink
Merge pull request #335 from 121cast/master
Browse files Browse the repository at this point in the history
Fixed Google Pixel detection
  • Loading branch information
commenthol authored Sep 14, 2018
2 parents 701a862 + e1a3031 commit 33e5842
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ device_parsers:
device_replacement: '$1'
brand_replacement: 'Google'
model_replacement: '$1'
- regex: '; *(Pixel \w+) Build'
- regex: '; *(Pixel.*) Build'
device_replacement: '$1'
brand_replacement: 'Google'
model_replacement: '$1'
Expand Down
15 changes: 15 additions & 0 deletions tests/test_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79955,11 +79955,26 @@ test_cases:
brand: 'OnePlus'
model: 'ONE E1003'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 8.1.0; Pixel Build/OPM1.171019.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.137 Mobile Safari/537.36'
family: 'Pixel'
brand: 'Google'
model: 'Pixel'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 7.0; Pixel C Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.98 Safari/537.36'
family: 'Pixel C'
brand: 'Google'
model: 'Pixel C'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 7.1.1; Pixel XL Build/NMF26F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36'
family: 'Pixel XL'
brand: 'Google'
model: 'Pixel XL'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.125 Mobile Safari/537.36'
family: 'Pixel 2'
brand: 'Google'
model: 'Pixel 2'

- user_agent_string: 'Mozilla/5.0 (Linux; Android 5.0; RCT6773W22B Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85'
family: 'RCT6773W22B'
brand: 'RCA'
Expand Down

0 comments on commit 33e5842

Please sign in to comment.