From ee9fe94829965cf829fac80a8a04c6522c80d763 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Mon, 18 Mar 2024 07:13:58 +0100 Subject: [PATCH] Improves detection for Lineage OS --- Parser/OperatingSystem.php | 7 +++++++ Tests/Parser/fixtures/oss.yml | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/Parser/OperatingSystem.php b/Parser/OperatingSystem.php index c80e442d17..b38c643608 100644 --- a/Parser/OperatingSystem.php +++ b/Parser/OperatingSystem.php @@ -383,6 +383,13 @@ public function parse(): ?array $short = 'ADR'; $version = ''; } + + if ('org.lineageos.jelly' === $this->clientHints->getApp() && 'Lineage OS' !== $name) { + $name = 'Lineage OS'; + $family = 'Android'; + $short = 'LEN'; + $version = ''; + } } $return = [ diff --git a/Tests/Parser/fixtures/oss.yml b/Tests/Parser/fixtures/oss.yml index 15e6ce7cbb..52248d9d57 100644 --- a/Tests/Parser/fixtures/oss.yml +++ b/Tests/Parser/fixtures/oss.yml @@ -4417,3 +4417,13 @@ version: "22.04" platform: x64 family: GNU/Linux +- + user_agent: Mozilla/5.0 (Linux; Android 10; Mi Max Prime Build/QP1A.191005.007) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Mobile Safari/537.36 + os: + name: Lineage OS + short_name: LEN + version: + platform: + family: Android + headers: + http-x-requested-with: org.lineageos.jelly