Loading core/java/android/content/pm/PackageParser.java +20 −3 Original line number Diff line number Diff line Loading @@ -1041,9 +1041,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 @@ -1057,6 +1057,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 @@ -1065,8 +1073,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 @@ -1079,6 +1088,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 @@ -1041,9 +1041,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 @@ -1057,6 +1057,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 @@ -1065,8 +1073,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 @@ -1079,6 +1088,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