优化
This commit is contained in:
parent
2fa48187b9
commit
f5b44c5c0a
@ -15,20 +15,17 @@ import java.util.Arrays;
|
||||
public class MiRilHook extends QcRilHook {
|
||||
|
||||
|
||||
private final int mHeaderSize;
|
||||
|
||||
private static final int HOOK_HEAD_SIZE = "QOEMHOOK".length() + 8;
|
||||
|
||||
|
||||
public MiRilHook(Context context) {
|
||||
super(context);
|
||||
this.mHeaderSize = "QOEMHOOK".length() + 8;
|
||||
|
||||
}
|
||||
|
||||
public MiRilHook(Context context, QcRilHookCallback qcRilHookCallback) {
|
||||
super(context, qcRilHookCallback);
|
||||
this.mHeaderSize = "QOEMHOOK".length() + 8;
|
||||
|
||||
}
|
||||
|
||||
@ -69,8 +66,7 @@ public class MiRilHook extends QcRilHook {
|
||||
|
||||
public org.codeaurora.telephony.utils.AsyncResult sendQcRilHookMsg(int requestId, byte[] request, int responseSize, int phoneId) {
|
||||
validateInternalState();
|
||||
int mHeaderSize = "QOEMHOOK".length() + 8;
|
||||
byte[] request_new = new byte[mHeaderSize + request.length];
|
||||
byte[] request_new = new byte[HOOK_HEAD_SIZE + request.length];
|
||||
ByteBuffer reqBuffer = createBufferWithNativeByteOrder(request_new);
|
||||
addQcRilHookHeader(reqBuffer, requestId, request.length);
|
||||
reqBuffer.put(request);
|
||||
|
Loading…
Reference in New Issue
Block a user