Loading api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -15966,11 +15966,11 @@ package android.hardware.usb { ctor public UsbRequest(); method public boolean cancel(); method public void close(); method public boolean enqueue(java.nio.ByteBuffer); method public java.lang.Object getClientData(); method public android.hardware.usb.UsbEndpoint getEndpoint(); method public boolean initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint); method public deprecated boolean queue(java.nio.ByteBuffer, int); method public boolean queue(java.nio.ByteBuffer); method public void setClientData(java.lang.Object); } Loading Loading @@ -45992,7 +45992,6 @@ package android.view { method public static deprecated int getEdgeSlop(); method public static deprecated int getFadingEdgeLength(); method public static deprecated long getGlobalActionKeyTimeout(); method public float getScaledHorizontalScrollFactor(); method public static int getJumpTapTimeout(); method public static int getKeyRepeatDelay(); method public static int getKeyRepeatTimeout(); Loading @@ -46004,6 +46003,7 @@ package android.view { method public int getScaledDoubleTapSlop(); method public int getScaledEdgeSlop(); method public int getScaledFadingEdgeLength(); method public float getScaledHorizontalScrollFactor(); method public int getScaledMaximumDrawingCacheSize(); method public int getScaledMaximumFlingVelocity(); method public int getScaledMinimumFlingVelocity(); Loading @@ -46012,6 +46012,7 @@ package android.view { method public int getScaledPagingTouchSlop(); method public int getScaledScrollBarSize(); method public int getScaledTouchSlop(); method public float getScaledVerticalScrollFactor(); method public int getScaledWindowTouchSlop(); method public static int getScrollBarFadeDuration(); method public static deprecated int getScrollBarSize(); Loading @@ -46019,7 +46020,6 @@ package android.view { method public static float getScrollFriction(); method public static int getTapTimeout(); method public static deprecated int getTouchSlop(); method public float getScaledVerticalScrollFactor(); method public static deprecated int getWindowTouchSlop(); method public static long getZoomControlsTimeout(); method public boolean hasPermanentMenuKey(); api/system-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -17424,11 +17424,11 @@ package android.hardware.usb { ctor public UsbRequest(); method public boolean cancel(); method public void close(); method public boolean enqueue(java.nio.ByteBuffer); method public java.lang.Object getClientData(); method public android.hardware.usb.UsbEndpoint getEndpoint(); method public boolean initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint); method public deprecated boolean queue(java.nio.ByteBuffer, int); method public boolean queue(java.nio.ByteBuffer); method public void setClientData(java.lang.Object); } Loading Loading @@ -49449,7 +49449,6 @@ package android.view { method public static deprecated int getEdgeSlop(); method public static deprecated int getFadingEdgeLength(); method public static deprecated long getGlobalActionKeyTimeout(); method public float getScaledHorizontalScrollFactor(); method public static int getJumpTapTimeout(); method public static int getKeyRepeatDelay(); method public static int getKeyRepeatTimeout(); Loading @@ -49461,6 +49460,7 @@ package android.view { method public int getScaledDoubleTapSlop(); method public int getScaledEdgeSlop(); method public int getScaledFadingEdgeLength(); method public float getScaledHorizontalScrollFactor(); method public int getScaledMaximumDrawingCacheSize(); method public int getScaledMaximumFlingVelocity(); method public int getScaledMinimumFlingVelocity(); Loading @@ -49469,6 +49469,7 @@ package android.view { method public int getScaledPagingTouchSlop(); method public int getScaledScrollBarSize(); method public int getScaledTouchSlop(); method public float getScaledVerticalScrollFactor(); method public int getScaledWindowTouchSlop(); method public static int getScrollBarFadeDuration(); method public static deprecated int getScrollBarSize(); Loading @@ -49476,7 +49477,6 @@ package android.view { method public static float getScrollFriction(); method public static int getTapTimeout(); method public static deprecated int getTouchSlop(); method public float getScaledVerticalScrollFactor(); method public static deprecated int getWindowTouchSlop(); method public static long getZoomControlsTimeout(); method public boolean hasPermanentMenuKey(); api/test-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -16021,11 +16021,11 @@ package android.hardware.usb { ctor public UsbRequest(); method public boolean cancel(); method public void close(); method public boolean enqueue(java.nio.ByteBuffer); method public java.lang.Object getClientData(); method public android.hardware.usb.UsbEndpoint getEndpoint(); method public boolean initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint); method public deprecated boolean queue(java.nio.ByteBuffer, int); method public boolean queue(java.nio.ByteBuffer); method public void setClientData(java.lang.Object); } Loading Loading @@ -46369,7 +46369,6 @@ package android.view { method public static deprecated int getEdgeSlop(); method public static deprecated int getFadingEdgeLength(); method public static deprecated long getGlobalActionKeyTimeout(); method public float getScaledHorizontalScrollFactor(); method public static int getHoverTooltipHideShortTimeout(); method public static int getHoverTooltipHideTimeout(); method public static int getHoverTooltipShowTimeout(); Loading @@ -46385,6 +46384,7 @@ package android.view { method public int getScaledDoubleTapSlop(); method public int getScaledEdgeSlop(); method public int getScaledFadingEdgeLength(); method public float getScaledHorizontalScrollFactor(); method public int getScaledMaximumDrawingCacheSize(); method public int getScaledMaximumFlingVelocity(); method public int getScaledMinimumFlingVelocity(); Loading @@ -46393,6 +46393,7 @@ package android.view { method public int getScaledPagingTouchSlop(); method public int getScaledScrollBarSize(); method public int getScaledTouchSlop(); method public float getScaledVerticalScrollFactor(); method public int getScaledWindowTouchSlop(); method public static int getScrollBarFadeDuration(); method public static deprecated int getScrollBarSize(); Loading @@ -46400,7 +46401,6 @@ package android.view { method public static float getScrollFriction(); method public static int getTapTimeout(); method public static deprecated int getTouchSlop(); method public float getScaledVerticalScrollFactor(); method public static deprecated int getWindowTouchSlop(); method public static long getZoomControlsTimeout(); method public boolean hasPermanentMenuKey(); core/java/android/hardware/usb/UsbRequest.java +20 −18 Original line number Diff line number Diff line Loading @@ -60,9 +60,11 @@ public class UsbRequest { // Prevent the connection from being finalized private UsbDeviceConnection mConnection; /** Whether this buffer was {@link #enqueue enqueued (new behavior)} or {@link #queue queued * (deprecared behavior)}. */ private boolean mIsUsingEnqueue; /** * Whether this buffer was {@link #queue(ByteBuffer) queued using the new behavior} or * {@link #queue(ByteBuffer, int) queued using the deprecated behavior}. */ private boolean mIsUsingNewQueue; /** Temporary buffer than might be used while buffer is enqueued */ private ByteBuffer mTempBuffer; Loading Loading @@ -172,7 +174,7 @@ public class UsbRequest { * * @return true if the queueing operation succeeded * * @deprecated Use {@link #enqueue(ByteBuffer)} instead. * @deprecated Use {@link #queue(ByteBuffer)} instead. */ @Deprecated public boolean queue(ByteBuffer buffer, int length) { Loading Loading @@ -219,23 +221,23 @@ public class UsbRequest { * * @return true if the queueing operation succeeded */ public boolean enqueue(@Nullable ByteBuffer buffer) { public boolean queue(@Nullable ByteBuffer buffer) { // Request need to be initialized Preconditions.checkState(mNativeContext != 0, "request is not initialized"); // Request can not be currently enqueued Preconditions.checkState(!mIsUsingEnqueue, "request is currently enqueued"); // Request can not be currently queued Preconditions.checkState(!mIsUsingNewQueue, "this request is currently queued"); boolean isSend = (mEndpoint.getDirection() == UsbConstants.USB_DIR_OUT); boolean wasEnqueued; boolean wasQueued; synchronized (mLock) { mBuffer = buffer; if (buffer == null) { // Null buffers enqueue empty USB requests which is supported mIsUsingEnqueue = true; wasEnqueued = native_enqueue(null, 0, 0); mIsUsingNewQueue = true; wasQueued = native_queue(null, 0, 0); } else { // Can only send/receive MAX_USBFS_BUFFER_SIZE bytes at once Preconditions.checkArgumentInRange(buffer.remaining(), 0, MAX_USBFS_BUFFER_SIZE, Loading @@ -260,18 +262,18 @@ public class UsbRequest { buffer = mTempBuffer; } mIsUsingEnqueue = true; wasEnqueued = native_enqueue(buffer, buffer.position(), buffer.remaining()); mIsUsingNewQueue = true; wasQueued = native_queue(buffer, buffer.position(), buffer.remaining()); } } if (!wasEnqueued) { mIsUsingEnqueue = false; if (!wasQueued) { mIsUsingNewQueue = false; mTempBuffer = null; mBuffer = null; } return wasEnqueued; return wasQueued; } /* package */ void dequeue() { Loading @@ -279,9 +281,9 @@ public class UsbRequest { int bytesTransferred; synchronized (mLock) { if (mIsUsingEnqueue) { if (mIsUsingNewQueue) { bytesTransferred = native_dequeue_direct(); mIsUsingEnqueue = false; mIsUsingNewQueue = false; if (mBuffer == null) { // Nothing to do Loading Loading @@ -332,7 +334,7 @@ public class UsbRequest { private native boolean native_init(UsbDeviceConnection connection, int ep_address, int ep_attributes, int ep_max_packet_size, int ep_interval); private native void native_close(); private native boolean native_enqueue(ByteBuffer buffer, int offset, int length); private native boolean native_queue(ByteBuffer buffer, int offset, int length); private native boolean native_queue_array(byte[] buffer, int length, boolean out); private native int native_dequeue_array(byte[] buffer, int length, boolean out); private native boolean native_queue_direct(ByteBuffer buffer, int length, boolean out); Loading core/jni/android_hardware_UsbRequest.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ android_hardware_UsbRequest_queue_direct(JNIEnv *env, jobject thiz, } static jboolean android_hardware_UsbRequest_enqueue(JNIEnv *env, jobject thiz, jobject buffer, jint offset, android_hardware_UsbRequest_queue(JNIEnv *env, jobject thiz, jobject buffer, jint offset, jint length) { struct usb_request* request = get_request_from_object(env, thiz); Loading Loading @@ -226,8 +226,8 @@ static const JNINativeMethod method_table[] = { {"native_init", "(Landroid/hardware/usb/UsbDeviceConnection;IIII)Z", (void *)android_hardware_UsbRequest_init}, {"native_close", "()V", (void *)android_hardware_UsbRequest_close}, {"native_enqueue", "(Ljava/nio/ByteBuffer;II)Z", (void *)android_hardware_UsbRequest_enqueue}, {"native_queue", "(Ljava/nio/ByteBuffer;II)Z", (void *)android_hardware_UsbRequest_queue}, {"native_queue_array", "([BIZ)Z", (void *)android_hardware_UsbRequest_queue_array}, {"native_dequeue_array", "([BIZ)I", (void *)android_hardware_UsbRequest_dequeue_array}, {"native_queue_direct", "(Ljava/nio/ByteBuffer;IZ)Z", Loading Loading
api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -15966,11 +15966,11 @@ package android.hardware.usb { ctor public UsbRequest(); method public boolean cancel(); method public void close(); method public boolean enqueue(java.nio.ByteBuffer); method public java.lang.Object getClientData(); method public android.hardware.usb.UsbEndpoint getEndpoint(); method public boolean initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint); method public deprecated boolean queue(java.nio.ByteBuffer, int); method public boolean queue(java.nio.ByteBuffer); method public void setClientData(java.lang.Object); } Loading Loading @@ -45992,7 +45992,6 @@ package android.view { method public static deprecated int getEdgeSlop(); method public static deprecated int getFadingEdgeLength(); method public static deprecated long getGlobalActionKeyTimeout(); method public float getScaledHorizontalScrollFactor(); method public static int getJumpTapTimeout(); method public static int getKeyRepeatDelay(); method public static int getKeyRepeatTimeout(); Loading @@ -46004,6 +46003,7 @@ package android.view { method public int getScaledDoubleTapSlop(); method public int getScaledEdgeSlop(); method public int getScaledFadingEdgeLength(); method public float getScaledHorizontalScrollFactor(); method public int getScaledMaximumDrawingCacheSize(); method public int getScaledMaximumFlingVelocity(); method public int getScaledMinimumFlingVelocity(); Loading @@ -46012,6 +46012,7 @@ package android.view { method public int getScaledPagingTouchSlop(); method public int getScaledScrollBarSize(); method public int getScaledTouchSlop(); method public float getScaledVerticalScrollFactor(); method public int getScaledWindowTouchSlop(); method public static int getScrollBarFadeDuration(); method public static deprecated int getScrollBarSize(); Loading @@ -46019,7 +46020,6 @@ package android.view { method public static float getScrollFriction(); method public static int getTapTimeout(); method public static deprecated int getTouchSlop(); method public float getScaledVerticalScrollFactor(); method public static deprecated int getWindowTouchSlop(); method public static long getZoomControlsTimeout(); method public boolean hasPermanentMenuKey();
api/system-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -17424,11 +17424,11 @@ package android.hardware.usb { ctor public UsbRequest(); method public boolean cancel(); method public void close(); method public boolean enqueue(java.nio.ByteBuffer); method public java.lang.Object getClientData(); method public android.hardware.usb.UsbEndpoint getEndpoint(); method public boolean initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint); method public deprecated boolean queue(java.nio.ByteBuffer, int); method public boolean queue(java.nio.ByteBuffer); method public void setClientData(java.lang.Object); } Loading Loading @@ -49449,7 +49449,6 @@ package android.view { method public static deprecated int getEdgeSlop(); method public static deprecated int getFadingEdgeLength(); method public static deprecated long getGlobalActionKeyTimeout(); method public float getScaledHorizontalScrollFactor(); method public static int getJumpTapTimeout(); method public static int getKeyRepeatDelay(); method public static int getKeyRepeatTimeout(); Loading @@ -49461,6 +49460,7 @@ package android.view { method public int getScaledDoubleTapSlop(); method public int getScaledEdgeSlop(); method public int getScaledFadingEdgeLength(); method public float getScaledHorizontalScrollFactor(); method public int getScaledMaximumDrawingCacheSize(); method public int getScaledMaximumFlingVelocity(); method public int getScaledMinimumFlingVelocity(); Loading @@ -49469,6 +49469,7 @@ package android.view { method public int getScaledPagingTouchSlop(); method public int getScaledScrollBarSize(); method public int getScaledTouchSlop(); method public float getScaledVerticalScrollFactor(); method public int getScaledWindowTouchSlop(); method public static int getScrollBarFadeDuration(); method public static deprecated int getScrollBarSize(); Loading @@ -49476,7 +49477,6 @@ package android.view { method public static float getScrollFriction(); method public static int getTapTimeout(); method public static deprecated int getTouchSlop(); method public float getScaledVerticalScrollFactor(); method public static deprecated int getWindowTouchSlop(); method public static long getZoomControlsTimeout(); method public boolean hasPermanentMenuKey();
api/test-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -16021,11 +16021,11 @@ package android.hardware.usb { ctor public UsbRequest(); method public boolean cancel(); method public void close(); method public boolean enqueue(java.nio.ByteBuffer); method public java.lang.Object getClientData(); method public android.hardware.usb.UsbEndpoint getEndpoint(); method public boolean initialize(android.hardware.usb.UsbDeviceConnection, android.hardware.usb.UsbEndpoint); method public deprecated boolean queue(java.nio.ByteBuffer, int); method public boolean queue(java.nio.ByteBuffer); method public void setClientData(java.lang.Object); } Loading Loading @@ -46369,7 +46369,6 @@ package android.view { method public static deprecated int getEdgeSlop(); method public static deprecated int getFadingEdgeLength(); method public static deprecated long getGlobalActionKeyTimeout(); method public float getScaledHorizontalScrollFactor(); method public static int getHoverTooltipHideShortTimeout(); method public static int getHoverTooltipHideTimeout(); method public static int getHoverTooltipShowTimeout(); Loading @@ -46385,6 +46384,7 @@ package android.view { method public int getScaledDoubleTapSlop(); method public int getScaledEdgeSlop(); method public int getScaledFadingEdgeLength(); method public float getScaledHorizontalScrollFactor(); method public int getScaledMaximumDrawingCacheSize(); method public int getScaledMaximumFlingVelocity(); method public int getScaledMinimumFlingVelocity(); Loading @@ -46393,6 +46393,7 @@ package android.view { method public int getScaledPagingTouchSlop(); method public int getScaledScrollBarSize(); method public int getScaledTouchSlop(); method public float getScaledVerticalScrollFactor(); method public int getScaledWindowTouchSlop(); method public static int getScrollBarFadeDuration(); method public static deprecated int getScrollBarSize(); Loading @@ -46400,7 +46401,6 @@ package android.view { method public static float getScrollFriction(); method public static int getTapTimeout(); method public static deprecated int getTouchSlop(); method public float getScaledVerticalScrollFactor(); method public static deprecated int getWindowTouchSlop(); method public static long getZoomControlsTimeout(); method public boolean hasPermanentMenuKey();
core/java/android/hardware/usb/UsbRequest.java +20 −18 Original line number Diff line number Diff line Loading @@ -60,9 +60,11 @@ public class UsbRequest { // Prevent the connection from being finalized private UsbDeviceConnection mConnection; /** Whether this buffer was {@link #enqueue enqueued (new behavior)} or {@link #queue queued * (deprecared behavior)}. */ private boolean mIsUsingEnqueue; /** * Whether this buffer was {@link #queue(ByteBuffer) queued using the new behavior} or * {@link #queue(ByteBuffer, int) queued using the deprecated behavior}. */ private boolean mIsUsingNewQueue; /** Temporary buffer than might be used while buffer is enqueued */ private ByteBuffer mTempBuffer; Loading Loading @@ -172,7 +174,7 @@ public class UsbRequest { * * @return true if the queueing operation succeeded * * @deprecated Use {@link #enqueue(ByteBuffer)} instead. * @deprecated Use {@link #queue(ByteBuffer)} instead. */ @Deprecated public boolean queue(ByteBuffer buffer, int length) { Loading Loading @@ -219,23 +221,23 @@ public class UsbRequest { * * @return true if the queueing operation succeeded */ public boolean enqueue(@Nullable ByteBuffer buffer) { public boolean queue(@Nullable ByteBuffer buffer) { // Request need to be initialized Preconditions.checkState(mNativeContext != 0, "request is not initialized"); // Request can not be currently enqueued Preconditions.checkState(!mIsUsingEnqueue, "request is currently enqueued"); // Request can not be currently queued Preconditions.checkState(!mIsUsingNewQueue, "this request is currently queued"); boolean isSend = (mEndpoint.getDirection() == UsbConstants.USB_DIR_OUT); boolean wasEnqueued; boolean wasQueued; synchronized (mLock) { mBuffer = buffer; if (buffer == null) { // Null buffers enqueue empty USB requests which is supported mIsUsingEnqueue = true; wasEnqueued = native_enqueue(null, 0, 0); mIsUsingNewQueue = true; wasQueued = native_queue(null, 0, 0); } else { // Can only send/receive MAX_USBFS_BUFFER_SIZE bytes at once Preconditions.checkArgumentInRange(buffer.remaining(), 0, MAX_USBFS_BUFFER_SIZE, Loading @@ -260,18 +262,18 @@ public class UsbRequest { buffer = mTempBuffer; } mIsUsingEnqueue = true; wasEnqueued = native_enqueue(buffer, buffer.position(), buffer.remaining()); mIsUsingNewQueue = true; wasQueued = native_queue(buffer, buffer.position(), buffer.remaining()); } } if (!wasEnqueued) { mIsUsingEnqueue = false; if (!wasQueued) { mIsUsingNewQueue = false; mTempBuffer = null; mBuffer = null; } return wasEnqueued; return wasQueued; } /* package */ void dequeue() { Loading @@ -279,9 +281,9 @@ public class UsbRequest { int bytesTransferred; synchronized (mLock) { if (mIsUsingEnqueue) { if (mIsUsingNewQueue) { bytesTransferred = native_dequeue_direct(); mIsUsingEnqueue = false; mIsUsingNewQueue = false; if (mBuffer == null) { // Nothing to do Loading Loading @@ -332,7 +334,7 @@ public class UsbRequest { private native boolean native_init(UsbDeviceConnection connection, int ep_address, int ep_attributes, int ep_max_packet_size, int ep_interval); private native void native_close(); private native boolean native_enqueue(ByteBuffer buffer, int offset, int length); private native boolean native_queue(ByteBuffer buffer, int offset, int length); private native boolean native_queue_array(byte[] buffer, int length, boolean out); private native int native_dequeue_array(byte[] buffer, int length, boolean out); private native boolean native_queue_direct(ByteBuffer buffer, int length, boolean out); Loading
core/jni/android_hardware_UsbRequest.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ android_hardware_UsbRequest_queue_direct(JNIEnv *env, jobject thiz, } static jboolean android_hardware_UsbRequest_enqueue(JNIEnv *env, jobject thiz, jobject buffer, jint offset, android_hardware_UsbRequest_queue(JNIEnv *env, jobject thiz, jobject buffer, jint offset, jint length) { struct usb_request* request = get_request_from_object(env, thiz); Loading Loading @@ -226,8 +226,8 @@ static const JNINativeMethod method_table[] = { {"native_init", "(Landroid/hardware/usb/UsbDeviceConnection;IIII)Z", (void *)android_hardware_UsbRequest_init}, {"native_close", "()V", (void *)android_hardware_UsbRequest_close}, {"native_enqueue", "(Ljava/nio/ByteBuffer;II)Z", (void *)android_hardware_UsbRequest_enqueue}, {"native_queue", "(Ljava/nio/ByteBuffer;II)Z", (void *)android_hardware_UsbRequest_queue}, {"native_queue_array", "([BIZ)Z", (void *)android_hardware_UsbRequest_queue_array}, {"native_dequeue_array", "([BIZ)I", (void *)android_hardware_UsbRequest_dequeue_array}, {"native_queue_direct", "(Ljava/nio/ByteBuffer;IZ)Z", Loading