[Mainline] android.system package APIs migration
By removing Int32Ref. Bug: 177619520 Bug: 179703584 Test: mma Change-Id: I9b63146ae563ed977f3112c9910f7a7c575de0b8 Merged-In: I9b63146ae563ed977f3112c9910f7a7c575de0b8 (cherry picked from commit 63be51447826b077a1048901bb1aa73adb321ee1)
This commit is contained in:
committed by
Roland Levillain
parent
5597c03563
commit
915ad3be79
@@ -41,7 +41,6 @@ import android.os.Handler;
|
||||
import android.os.MessageQueue;
|
||||
import android.os.Messenger;
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Int32Ref;
|
||||
import android.system.Os;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
@@ -306,9 +305,8 @@ public class TcpKeepaliveController {
|
||||
|
||||
private static boolean isReceiveQueueEmpty(FileDescriptor fd)
|
||||
throws ErrnoException {
|
||||
Int32Ref result = new Int32Ref(-1);
|
||||
Os.ioctlInt(fd, SIOCINQ, result);
|
||||
if (result.value != 0) {
|
||||
final int result = Os.ioctlInt(fd, SIOCINQ);
|
||||
if (result != 0) {
|
||||
Log.e(TAG, "Read queue has data");
|
||||
return false;
|
||||
}
|
||||
@@ -317,9 +315,8 @@ public class TcpKeepaliveController {
|
||||
|
||||
private static boolean isSendQueueEmpty(FileDescriptor fd)
|
||||
throws ErrnoException {
|
||||
Int32Ref result = new Int32Ref(-1);
|
||||
Os.ioctlInt(fd, SIOCOUTQ, result);
|
||||
if (result.value != 0) {
|
||||
final int result = Os.ioctlInt(fd, SIOCOUTQ);
|
||||
if (result != 0) {
|
||||
Log.e(TAG, "Write queue has data");
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user