dist_group replaces owner and the default is going to change, set it
to the current default "android" for frameworks/base java_sdk_libraries.
Bug: 186723288
Test: m checkbuild
Change-Id: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
Merged-In: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
The new format is described in tools/metalava/FORMAT.md.
Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: I8314f4e7099fa92e4f8ed7d283ccf836cc9a84a0
Merged-In: Ia248aece5250e84e47c815c601133b698bf644c2
javax.obex is built with java_sdk_library and api files are added by
running "make update-api".
Remove java.obex is from platform.xml, since it will be generated
automatically by soong when the library is built with java_sdk_library.
Bug:77577799
Test: make -j
make checkapi
Change-Id: Ib94955e62582ffbdfc7eb88cd0e494c61757c7aa
Remote Device: LG-G2 as OPP client
Use Case:
1) Pair DUT with Remote.
2) Now push the file from Remote.
3) Ignore the incoming request from Remote
Failure:
RX_Notification lasts only for 10 seconds.
Fix:
OBEX lib handles a PUT Request case with NO BODY header on server
session with CONTINUE response until body is found in request
packet from remote. However, this needs to be avoided if SRM is
enabled from remote to get proceed transfer authorization
from Application layer.
Test: Send connection request from remote device and verified that
connection is sustainable for 30 seconds until timeout.
Bug: 37886388
Change-Id: I1b5bfd65f9023d77850a34bcb08cfbb435e9a474
Use case:
1. Send file to remote device.
2. Wait for accepting the file transfer on remote device.
Use Specific remote device(that sends some
optional headers).
Failure:
No file acceptance popup seen on remote device.
Root cause:
Crash in com.android.bluetooth.
FATAL EXCEPTION: BtOpp ClientThread
Process: com.android.bluetooth, PID: 22527
java.lang.NegativeArraySizeException: -3
at javax.obex.ObexHelper.updateHeaderSet(ObexHelper.java:216)
at javax.obex.ClientSession.sendRequest(ClientSession.java:568)
at javax.obex.ClientSession.connect(ClientSession.java:148)
at com.android.bluetooth.opp.BluetoothOppObexClientSession$ClientThread.
connect(BluetoothOppObexClientSession.java:317)
at com.android.bluetooth.opp.BluetoothOppObexClientSession$ClientThread.
run(BluetoothOppObexClientSession.java:231)
am_crash( 1402): [22527,0,com.android.bluetooth,818462277,java.lang.
NegativeArraySizeException,-3,ObexHelper.java,216]
Fix:
Add length check before allocate memory and break loop if length is less than
expected header length as per OBEX Specification to prevent crash.
Test: Verified that OPP Tx and Rx works successfully multiple times.
Bug: 35588578
Change-Id: I805e6b1d51f69645d5132c3c18db2e752d04b096
Add required OBEX application parameters TAGID's and length
declarations required to support PBAP 1.2 specification.
Test: Connected with Remote PBAP Client supporting PBAP 1.2 and
verified that connection and transfer happens over L2CAP.
Connected with Remote PBAP Client supporting PBAP 1.1 and
and verified that connection and transfer happens over RFCOMM.
Bug: 33011817
Change-Id: I8a772b0dddf6ecf74b057e12d7596421c0e0f558
Precondition: PTS 7.0
Usecase:
Execute test case TC_TG_CA_BI_02_C for AVRCP 1.6
Expectation:
Test case should pass
Observation:
Test case fails
Root cause:
Disconnection of OBEX from PTS leads to disconnection of transport
(initiated by DUT) leading to test case failure. Obex server was
unnecessary assuming that transport would be disconnected so was
informing registered users that transport has been disconnected,
which was leading to issues on new obex connect on same transport
channel from remote obex client
Fix:
Remove check to break out of loop after obex disconnection, as that is
already handled in case when read would return -1 in case transport
is closed.
Test: TC_TG_CA_BI_02_C can be passed after the patch.
Bug: 35590000
Change-Id: Ic1682ce77c07cf2e43da09dc95fff2214338f758
Set OBEX Server maxRxLength to the minium value acceptable from
either server and client during CONNECT Operation.
Below basic and all PUT test cases fail without this fix, as the
maxPacketLength for later is less than maxRxLength of server.
TC_MSE_MMU_BV_03_I
TC_MSE_MMU_BV_02_I
Change-Id: Iaa4f92e3146dc13d647dca12c84eb43b91657efa
- If obex based profile explicitly sets GET with final flag, then
GET should always be sent as single packet request with final flag
set.
Change-Id: I82ff8295a239c4dbbfb4b3abfd358021820283cc
This change handles GET operation properly whenever the
Input stream is getting aborted in between. Without this
patch it was observed that GET request was being sent by
DUT even when abort has been sent/received resulting
in IOT issues with some remote devices including PTS.
Change-Id: Idcb4ea04abb57353af5ab1fef050b3a36579892e
- Updated OBEX to support SRM
- Added support for OBEX over l2cap and SRM.
- Minor bugfixes, and reduce CPU load ALOT
- Added support to send responses without body data.
- Extend BluetoothSocket to support L2CAP
- Added functionality to get the channel number
needed to be able to create an SDP record with the channel number.
- Added interface to get socket type and max packet sizes.
- Added interface to perform SDP search and get the resulting
SDP record data.
Change-Id: I9d37a00ce73dfffc0e3ce03eab5511ba3a86e5b8
When data less than max packet size in length is sent into the write
method the data will only be added to the internal buffer. If several
calls to write is performed by the application continueOperation will
not be called at all. The solution to the problem is to always check
the internal buffer size and to call continueOperation every time
maxPacketSize bytes is in the internal buffer.
Change-Id: I5ebfa3c26db2c1aefe1a115d7782d8ceaa760937
Windows 7 says it can handle the maximum OBEX packet size. However
if the maximum packet size is used the transfer will fail. This
should be fixed by Microsoft but until they do the only way to solve
this is to reduce the maximum packet size for the OBEX client.
Change-Id: I51975eec972395ae3f1f21cca236b223d0812ef3
Long time to show notification of file transfer failed after
canceling transfer via remote part.
Device A is in contact with our device, B. When device A Cancel
a transfer operation, it sends OBEX_OPCODE_DISCONNECT HeaderID
and the length of package to B. B use the length of package to
read remainder bytes from A. If the bytes B read do not meet the
received length it will block and wait for remainder bytes from A.
But when B compute the remainder bytes it forgets to subtract
the three bytes it has already read through HeaderID and the length
of the package. So the operation was blocked until the operation
timeout.
Change-Id: I0f8bf62d3119e081b5c01af9fc05fe586fd4fabc
Long time to show notification of file transfer failed after
canceling transfer via remote part.
Device A is in contact with our device, B. When device A Cancel
a transfer operation, it sends OBEX_OPCODE_DISCONNECT HeaderID
and the length of package to B. B use the length of package to
read remainder bytes from A. If the bytes B read do not meet the
received length it will block and wait for remainder bytes from A.
But when B compute the remainder bytes it forgets to subtract
the three bytes it has already read through HeaderID and the length
of the package. So the operation was blocked until the operation
timeout.
Change-Id: I0f8bf62d3119e081b5c01af9fc05fe586fd4fabc
From IrOBEX, 3.3.6.1, we can see below explanation for Flags bit 1:
1 Don't create directory if it does not exist, return an error instead.
The correct understanding should be: if bit 1 is set to 1, we'll not create
directory if it not exist; if bit 1 is set to 0, we'll create it if it not
exists.
The third parameter count of PrivateOutputStream.write()
should be the size of vcards data plus header length, excluding the 3 bytes
for the response message and 3 bytes for the header ID and length.
Adjust the return value of getMaxPacketSize() by minus headser size, so that
applications should not get packet slipped during multiple sharing operation.
Do not set the header to null in getHeaderLength() to get PBAP PTS passed;
Per OBEX spec, for Get request:
Only the last packet need send the 0x49(End of Body);
for intermediate packets, we need to send 0x48 (Body).
If all packets use 0x49, some carkit like Nokia PD-17 will fail to download
all contacts, except data in the last packet.
Bug: 2246927
Dr No: Eastham
re-format comments
move connectible to connectable
remove unnecessary throws
remove not-used function ClientOperation.readResponse()
fix client abort case for PUT
set mOpen for PrivateOutputStream
add to platform.xml
- Change variable namings
- Remove interface public modifier
- Move 2 duplicate methods to ObexSession
- Removed unused code and variables
- Use static variables for some protocol defines
o Use mMemberField variable naming as per style guide
o ClientSession.trans is only used in the ctor, doesn't need to be a member
o Rename connectionOpen to mOpen and isConnected to mObexConnected to reduce
confusion
o Refactor duplicated code into helper functions (setRequestActive())
o Fix whitespace around comment blocks
o Change unnecessary public scope's to package private (eg setRequestInactive())
o Remove a redundant factory method ClientSession.createHeaderSet()
o Rename OPTIMIZATION to TODO to match Android style
o Rename java.io.IOException to IOException
o Be consistent with variable naming - use header not headers
o Add Android.mk file.
o Add @hide so it is not exposed in the public API. It is not yet in shape.
o Prefer @throws to @exception
o Do not use @version. This is meaningless in Android.
o Prefer classes 'final' unless explicitly allowing inheritance
(See "Effective Java" item 15)
o Prefer CamelCaps java naming even for acronyms (OBEXHelper -> ObexHelper)
o Use the built-in MD5 library.
o Move ObexConstants into ObexHelper.
o Remove unused variables.
o Prefer stricter access priveleges. Most importantly, avoid public fields.
o Don't use 'import java.io.*'. Name each class explicitly.
o Delete commented out code. If its not used then remove it.
Based of a JSR-82 reference implementation.
This check-in is 'as-is' from the source provided June 25.
This code does not conform to Android style and quality guidelines. I will be
working with Motorola to improve it. If it does not see substantial improvement
in the Eclair timeframe it will be deleted.