Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d63f7dbf authored by Kenny Root's avatar Kenny Root
Browse files

Use buffered I/O during certificate parsing

The PackageParser was using a raw InputStream instead of wrapping it in
a BufferedInputStream which could degrade performance.

Change-Id: I15c86c3ead363ddbadf4ae27e011feda90fcc579
parent 465618ed
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.util.TypedValue;

import com.android.internal.util.XmlUtils;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -336,7 +337,7 @@ public class PackageParser {
        try {
            // We must read the stream for the JarEntry to retrieve
            // its certificates.
            InputStream is = jarFile.getInputStream(je);
            InputStream is = new BufferedInputStream(jarFile.getInputStream(je));
            while (is.read(readBuffer, 0, readBuffer.length) != -1) {
                // not using
            }