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

Commit e1d80fa4 authored by Neil Fuller's avatar Neil Fuller Committed by Todd Kennedy
Browse files

Switch to HexEncoding from ByteStringUtils

Migration in preparation for deletion of ByteStringUtils.

Bug: 124232146
Test: atest CtsOsHostTestCases:StaticSharedLibsHostTests
Change-Id: I6ee12e9914503a5b628ae6da82a396aa71dd972c
parent 53bbc534
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -255,7 +255,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;
@@ -10494,8 +10494,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" +