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

Commit 80c560bb authored by Neil Fuller's avatar Neil Fuller Committed by Android (Google) Code Review
Browse files

Merge "Switch to HexEncoding from ByteStringUtils"

parents 8b1ed3a5 e1d80fa4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -256,7 +256,6 @@ import android.text.format.DateUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Base64;
import android.util.ByteStringUtils;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.ExceptionUtils;
@@ -330,6 +329,7 @@ import dalvik.system.VMRuntime;
import libcore.io.IoUtils;
import libcore.util.EmptyArray;
import libcore.util.HexEncoding;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -10652,8 +10652,9 @@ public class PackageManagerService extends IPackageManager.Stub
                    } else {
                        // lib signing cert could have rotated beyond the one expected, check to see
                        // if the new one has been blessed by the old
                        if (!libPkg.mSigningDetails.hasSha256Certificate(
                                ByteStringUtils.fromHexToByteArray(expectedCertDigests[0]))) {
                        byte[] digestBytes = HexEncoding.decode(
                                expectedCertDigests[0], false /* allowSingleChar */);
                        if (!libPkg.mSigningDetails.hasSha256Certificate(digestBytes)) {
                            throw new PackageManagerException(
                                    INSTALL_FAILED_MISSING_SHARED_LIBRARY,
                                    "Package " + packageName + " requires differently signed" +