refactor(packages): 重构 APKS 解析逻辑并优化图标选择
- 移除 parseApks 的 @Deprecated 标记,改为直接提取 Base/Universal APK 解析 - 使用 BinaryXmlParser 解码二进制 AndroidManifest.xml - 图标选择改为取 density 最大的候选图标 - 调整依赖版本并更新测试用例
This commit is contained in:
1 parent
a3a34326e2
commit
4a38c1c1a4
3 files changed
+146
-17
No files matched your search
@@ -33,6 +33,8 @@ class ApkMetaParserTest {
|
||||
"D:\\apkTest\\XwadOSHonor_V1.4.7.aab",
|
||||
"D:\\apkTest\\XwadOSHonor_V1.4.7.apks",
|
||||
"D:\\apkTest\\Twitter_v8.95.0-release.00_apkpure.com.xapk",
|
||||
"D:\\apkTest\\MIR4_0.488243_APKPure.xapk",
|
||||
"D:\\apkTest\\GitHub_1.271.1_APKPure.xapk",
|
||||
"D:\\apkTest\\com.instagram.android_440.1.0.46.86-384611414_1dpi_c0d8039a2b3d4f69b31e6cbb1c611c5a_apkmirror.com.apkm",
|
||||
"D:\\apkTest\\抖音V39.1.2谷歌版.apks"
|
||||
);
|
||||
@@ -70,10 +72,11 @@ class ApkMetaParserTest {
|
||||
int total = paths.size();
|
||||
int success = 0;
|
||||
|
||||
for (String path : paths) {
|
||||
for (int i = 0; i < paths.size(); i++) {
|
||||
String path = paths.get(i);
|
||||
File apkFile = new File(path);
|
||||
System.out.println();
|
||||
System.out.println(">>>>>> [" + (success + 1) + "/" + total + "] " + apkFile.getAbsolutePath());
|
||||
System.out.println(">>>>>> [" + (i + 1) + "/" + total + "] " + apkFile.getAbsolutePath());
|
||||
|
||||
if (!apkFile.exists() || !apkFile.isFile()) {
|
||||
System.out.println("!! 跳过:文件不存在或不是普通文件");
|
||||
|
||||
Reference in new issue
Block a user