Merge changes from topic "int32ref"
* changes: [Mainline] android.system package APIs migration Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of libcore
This commit is contained in:
@@ -41,7 +41,6 @@ import android.os.Handler;
|
|||||||
import android.os.MessageQueue;
|
import android.os.MessageQueue;
|
||||||
import android.os.Messenger;
|
import android.os.Messenger;
|
||||||
import android.system.ErrnoException;
|
import android.system.ErrnoException;
|
||||||
import android.system.Int32Ref;
|
|
||||||
import android.system.Os;
|
import android.system.Os;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
@@ -306,9 +305,8 @@ public class TcpKeepaliveController {
|
|||||||
|
|
||||||
private static boolean isReceiveQueueEmpty(FileDescriptor fd)
|
private static boolean isReceiveQueueEmpty(FileDescriptor fd)
|
||||||
throws ErrnoException {
|
throws ErrnoException {
|
||||||
Int32Ref result = new Int32Ref(-1);
|
final int result = Os.ioctlInt(fd, SIOCINQ);
|
||||||
Os.ioctlInt(fd, SIOCINQ, result);
|
if (result != 0) {
|
||||||
if (result.value != 0) {
|
|
||||||
Log.e(TAG, "Read queue has data");
|
Log.e(TAG, "Read queue has data");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -317,9 +315,8 @@ public class TcpKeepaliveController {
|
|||||||
|
|
||||||
private static boolean isSendQueueEmpty(FileDescriptor fd)
|
private static boolean isSendQueueEmpty(FileDescriptor fd)
|
||||||
throws ErrnoException {
|
throws ErrnoException {
|
||||||
Int32Ref result = new Int32Ref(-1);
|
final int result = Os.ioctlInt(fd, SIOCOUTQ);
|
||||||
Os.ioctlInt(fd, SIOCOUTQ, result);
|
if (result != 0) {
|
||||||
if (result.value != 0) {
|
|
||||||
Log.e(TAG, "Write queue has data");
|
Log.e(TAG, "Write queue has data");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user