Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.
Also contains an import ordering change needed for upload.
Bug: 124232146
Test: build only
Change-Id: I0c71751de9a142a81ce43b4eaea497bf291afcbc
(cherry picked from commit 8fdca745d6)
This commit is contained in:
@@ -16,11 +16,12 @@
|
|||||||
|
|
||||||
package android.mtp;
|
package android.mtp;
|
||||||
|
|
||||||
import com.android.internal.util.Preconditions;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.util.ByteStringUtils;
|
|
||||||
|
import com.android.internal.util.Preconditions;
|
||||||
|
|
||||||
|
import libcore.util.HexEncoding;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@@ -103,7 +104,7 @@ public class MtpServer implements Runnable {
|
|||||||
byte[] randomBytes = new byte[sID_LEN_BYTES];
|
byte[] randomBytes = new byte[sID_LEN_BYTES];
|
||||||
|
|
||||||
randomVal.nextBytes(randomBytes);
|
randomVal.nextBytes(randomBytes);
|
||||||
return ByteStringUtils.toHexString(randomBytes);
|
return HexEncoding.encodeToString(randomBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
|||||||
Reference in New Issue
Block a user