Loading core/java/android/content/pm/PackageParser.java +20 −3 Original line number Diff line number Diff line Loading @@ -1057,9 +1057,9 @@ public class PackageParser { private ArrayList<String> scanPackageOverlays(File originalFile) { Set<String> overlayTargets = new HashSet<String>(); ZipFile privateZip = null; try { final ZipFile privateZip = new ZipFile(originalFile.getPath()); privateZip = new ZipFile(originalFile.getPath()); final Enumeration<? extends ZipEntry> privateZipEntries = privateZip.entries(); while (privateZipEntries.hasMoreElements()) { final ZipEntry zipEntry = privateZipEntries.nextElement(); Loading @@ -1073,6 +1073,14 @@ public class PackageParser { } catch(Exception e) { e.printStackTrace(); overlayTargets.clear(); } finally { if (privateZip != null) { try { privateZip.close(); } catch (Exception e) { //Ignore } } } ArrayList<String> overlays = new ArrayList<String>(); Loading @@ -1081,8 +1089,9 @@ public class PackageParser { } private boolean packageHasIconPack(File originalFile) { ZipFile privateZip = null; try { final ZipFile privateZip = new ZipFile(originalFile.getPath()); privateZip = new ZipFile(originalFile.getPath()); final Enumeration<? extends ZipEntry> privateZipEntries = privateZip.entries(); while (privateZipEntries.hasMoreElements()) { final ZipEntry zipEntry = privateZipEntries.nextElement(); Loading @@ -1095,6 +1104,14 @@ public class PackageParser { } } catch(Exception e) { Log.e(TAG, "Could not read zip entries while checking if apk has icon pack", e); } finally { if (privateZip != null) { try { privateZip.close(); } catch (Exception e) { //Ignore } } } return false; } Loading Loading
core/java/android/content/pm/PackageParser.java +20 −3 Original line number Diff line number Diff line Loading @@ -1057,9 +1057,9 @@ public class PackageParser { private ArrayList<String> scanPackageOverlays(File originalFile) { Set<String> overlayTargets = new HashSet<String>(); ZipFile privateZip = null; try { final ZipFile privateZip = new ZipFile(originalFile.getPath()); privateZip = new ZipFile(originalFile.getPath()); final Enumeration<? extends ZipEntry> privateZipEntries = privateZip.entries(); while (privateZipEntries.hasMoreElements()) { final ZipEntry zipEntry = privateZipEntries.nextElement(); Loading @@ -1073,6 +1073,14 @@ public class PackageParser { } catch(Exception e) { e.printStackTrace(); overlayTargets.clear(); } finally { if (privateZip != null) { try { privateZip.close(); } catch (Exception e) { //Ignore } } } ArrayList<String> overlays = new ArrayList<String>(); Loading @@ -1081,8 +1089,9 @@ public class PackageParser { } private boolean packageHasIconPack(File originalFile) { ZipFile privateZip = null; try { final ZipFile privateZip = new ZipFile(originalFile.getPath()); privateZip = new ZipFile(originalFile.getPath()); final Enumeration<? extends ZipEntry> privateZipEntries = privateZip.entries(); while (privateZipEntries.hasMoreElements()) { final ZipEntry zipEntry = privateZipEntries.nextElement(); Loading @@ -1095,6 +1104,14 @@ public class PackageParser { } } catch(Exception e) { Log.e(TAG, "Could not read zip entries while checking if apk has icon pack", e); } finally { if (privateZip != null) { try { privateZip.close(); } catch (Exception e) { //Ignore } } } return false; } Loading