diff --git a/QuickLook.Plugin/QuickLook.Plugin.AppViewer/PackageParsers/Apk/ApiLevel.cs b/QuickLook.Plugin/QuickLook.Plugin.AppViewer/PackageParsers/Apk/ApiLevel.cs index 056e0d5..d1dc4f0 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.AppViewer/PackageParsers/Apk/ApiLevel.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.AppViewer/PackageParsers/Apk/ApiLevel.cs @@ -1,4 +1,21 @@ -using System.Collections.Generic; +// Copyright © 2017-2025 QL-Win Contributors +// +// This file is part of QuickLook program. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System.Collections.Generic; namespace QuickLook.Plugin.AppViewer.PackageParsers.Apk; @@ -14,6 +31,11 @@ public class ApiLevel public override string ToString() { + if (AndroidVersion == null || Codename == null || Release == null) + { + return $"API Level {APILevel}"; + } + return $"API Level {APILevel} ({AndroidVersion} {Codename} {Release})"; } @@ -27,9 +49,9 @@ public class ApiLevel return new ApiLevel { APILevel = apiLevel, - AndroidVersion = $"API Level {apiLevel}", - Codename = "Unknown", - Release = "Unknown" + AndroidVersion = null, + Codename = null, + Release = null, }; } @@ -40,7 +62,7 @@ public class ApiLevel APILevel = "35", AndroidVersion = "Android 15", Codename = "VanillaIceCream", - Release = "开发中(2025)" + Release = "2025" }, ["34"] = new ApiLevel {