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

Commit b92282a0 authored by Neil Fuller's avatar Neil Fuller
Browse files

Switch to HexEncoding from ByteStringUtils

Migration in preparation for deletion of ByteStringUtils.

Bug: 124232146
Test: build only
Change-Id: I2ffc14f05669309950e16334104274402a9fc104
parent 4e7ca342
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -24,12 +24,13 @@ import android.content.ComponentName;
import android.content.Context;
import android.os.Process;
import android.os.ServiceManager;
import android.util.ByteStringUtils;
import android.util.EventLog;
import android.util.Log;

import com.android.server.pm.dex.DynamicCodeLogger;

import libcore.util.HexEncoding;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -280,10 +281,10 @@ public class DynamicCodeLoggingService extends JobService {
    }

    private static String unhex(String hexEncodedPath) {
        byte[] bytes = ByteStringUtils.fromHexToByteArray(hexEncodedPath);
        if (bytes == null || bytes.length == 0) {
        if (hexEncodedPath == null || hexEncodedPath.length() == 0) {
            return "";
        }
        byte[] bytes = HexEncoding.decode(hexEncodedPath, false /* allowSingleChar */);
        return new String(bytes);
    }
}