Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
Fix icon rendering when adaptive icon is used
Browse files Browse the repository at this point in the history
  • Loading branch information
zjn0505 committed May 27, 2019
1 parent acadd73 commit 638ec9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions QuickLookAPK/HZAndroidPackage.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@
NSData *dataFromZipPath(NSString *zipFile, NSString *pathInZip)
{
NSTask *task = [[NSTask alloc] init];

if ([pathInZip hasSuffix:@".xml"]) {
NSRange extension = [pathInZip rangeOfString:@"xml" options:NSBackwardsSearch];
pathInZip = [pathInZip stringByReplacingCharactersInRange:extension withString:@"png"];
pathInZip = [pathInZip stringByReplacingOccurrencesOfString:@"anydpi-v26" withString:@"xxxhdpi-v4"];
pathInZip = [pathInZip stringByReplacingOccurrencesOfString:@"anydpi-v24" withString:@"xxxhdpi-v4"];
}

[task setLaunchPath:@"/usr/bin/unzip"];
[task setArguments:[NSArray arrayWithObjects:@"-p", zipFile, pathInZip, nil]];

Expand Down

0 comments on commit 638ec9a

Please sign in to comment.