Skip to content

Commit

Permalink
Filter out Huawei HMSCore from model name
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsLeenheer committed Apr 12, 2022
1 parent b43c9ef commit f481df6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Analyser/Header/Useragent/Os.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ private function detectAndroid($ua)
$candidates[$c] = preg_replace('/^[a-zA-Z][a-zA-Z][-_][a-zA-Z][a-zA-Z]\s+/u', '', $candidates[$c]);
$candidates[$c] = preg_replace('/(.*) - [0-9\.]+ - (?:with Google Apps - )?API [0-9]+ - [0-9]+x[0-9]+/', '\\1', $candidates[$c]);
$candidates[$c] = preg_replace('/^sprd-/u', '', $candidates[$c]);
$candidates[$c] = preg_replace('/; HMSCore.*/u', '', $candidates[$c]);
}

$candidates = array_unique($candidates);
Expand Down

0 comments on commit f481df6

Please sign in to comment.