Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.
Bug: 124232146
Test: build only (tested in upstream)
Exempt-From-Owner-Approval: Already approved in upstream.
Merged-In: I6ee12e9914503a5b628ae6da82a396aa71dd972c
Change-Id: I6ee12e9914503a5b628ae6da82a396aa71dd972c
(cherry picked from commit e1d80fa415)
This commit is contained in:
@@ -256,7 +256,6 @@ import android.text.format.DateUtils;
|
|||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
import android.util.ArraySet;
|
import android.util.ArraySet;
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
import android.util.ByteStringUtils;
|
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.EventLog;
|
import android.util.EventLog;
|
||||||
import android.util.ExceptionUtils;
|
import android.util.ExceptionUtils;
|
||||||
@@ -330,6 +329,7 @@ import dalvik.system.VMRuntime;
|
|||||||
|
|
||||||
import libcore.io.IoUtils;
|
import libcore.io.IoUtils;
|
||||||
import libcore.util.EmptyArray;
|
import libcore.util.EmptyArray;
|
||||||
|
import libcore.util.HexEncoding;
|
||||||
|
|
||||||
import org.xmlpull.v1.XmlPullParser;
|
import org.xmlpull.v1.XmlPullParser;
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
@@ -10656,8 +10656,9 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
} else {
|
} else {
|
||||||
// lib signing cert could have rotated beyond the one expected, check to see
|
// lib signing cert could have rotated beyond the one expected, check to see
|
||||||
// if the new one has been blessed by the old
|
// if the new one has been blessed by the old
|
||||||
if (!libPkg.mSigningDetails.hasSha256Certificate(
|
byte[] digestBytes = HexEncoding.decode(
|
||||||
ByteStringUtils.fromHexToByteArray(expectedCertDigests[0]))) {
|
expectedCertDigests[0], false /* allowSingleChar */);
|
||||||
|
if (!libPkg.mSigningDetails.hasSha256Certificate(digestBytes)) {
|
||||||
throw new PackageManagerException(
|
throw new PackageManagerException(
|
||||||
INSTALL_FAILED_MISSING_SHARED_LIBRARY,
|
INSTALL_FAILED_MISSING_SHARED_LIBRARY,
|
||||||
"Package " + packageName + " requires differently signed" +
|
"Package " + packageName + " requires differently signed" +
|
||||||
|
|||||||
Reference in New Issue
Block a user