History log of /packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e6564029f132077c8a4877431a95899db201e506 10-Sep-2015 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Add MNS SDP Search during setNotificationRegistration.

Precondition:
Verified with remote MCE device that starts MNS server
only before issuing setNotification Registration to MSE.

Use Case:
1. Discover and Pair with MSE from MCE.
2. Connect to MSE on Mas insance 0.
3. Enable Notification Registration for MAS Instance 0

Failure:
MNS connection happens over RFCOMM
and MAS Instance is connected over L2CAP.

Root Cause:
Current design performs MNS SDP search only at the time
of successful MAS Instance Connect. MNS connect implementation
tries connection over insecure RFCOMM channel based on UUID
when MNS Server record is not available.

Fix:
Add implementation to check and perform MNS SDP search
if this info is not available when MCE requests
setNotificationRegistration. This fix is required to
handle MCE implementation that start MNS Sever and
expose SDP only before sending setNotificationRegistration.

Change-Id: If1e8d33dcac078f04d13b8bacf8e1d1513c119e1
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
189cc4ca1c36018977e7b9ad62b07ddbefc7f2ba 21-Sep-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Synchronize notifcationReg reply and MNS connect action.

Use Case:
1. Connect to carkit
2. Disconnect connection with carkit.
3. Reconnect to carkit

Failure:
MNS Failure during Reconnection.
User will in some timing conditions not get notification
of new messages and then turns OFF/ON the carkit.
MAS is connected fine but for MNS car sends BAD REQUEST.

Root Cause:
This isssue is reported only with one particular carkit in MCE role,
where in MNS Connect request issued before acknowleding
the setNotificationReg Request.

Fix:
Synchronize handleRegistration method in handler thread to ensure
setNotificationReg response from MSE is sent before requesting
a MNS Connect to MCE.

Change-Id: I30559c643af7733754fce551b97e31543a0cb160
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
5a60e47497f21f64e6d79420dc4c56c1907df22a 17-Mar-2015 kschulz <k.schulz@samsung.com> Update to Bluetooth MAP 1.2 (server)

- Change folder name lookup to a map
Replaced the arrays used to convert mailbox ID/msg type to a folder name with a static map.
This is to avoid null pointer exception for unknown values, and to catch any changes in
the ID/type values at compile time in stead of runtime.
Bug-id:16874441
- Added Instance Information support and Extended Event support.
Still missing integration wiht SDP MAP feature bit mask support
- Adding Abstract implementation to support conversations
- added IM account handling, IM type definition, Application paramenters.
- addedgetConversactionList functionality
- added method to strip encoding in headers
- Fixed messagelist showing both email address and name in the name fields.
- Fixed Index out of bounds exception was hit when the subject contained invalid chars.
- Added functionality to support the getConversationListReq
Works for SMS/MMS, Email and IM
For Email/IM it depends on the convoContact table in the contract.
For SMS/MMS it uses the contact number+ name if available in contact database.
- Added new parameters to msgListing also in contract class
- Added Test framework for "near system level" tests
Currently only includes an entry point for single device tests.
- Added support for setOwnerStatus
- Added support for vcard type X-BT-UID
- Introduced type SignedLongLong to handle 128 bit values which needs to be handled as hex-strings.
- Added convocontact notification events for IM
- Added support for IM getMessage
- Added setEventFilter function.
- Added event filtering before enquing an event to be send.
- Added selective observers, depending on the active filter.
- Fixed timestamp to be from seconds to seconds (not from milisec)
- Fixed version number in bMessage if remote featurebit is set for v 1.1
- Added content encoding to QP for text that are not USACII
- Corrected the addresses in to/from for IM messages
- Added btuid and btuci to vcard
- Fixed (some) longlines
- Added extendedData support (empty when sending, just logging when receiving)
- Fixed Email folderName compairison changed to ignore case
- Fixed problem with names containing "null"
- BluetoothMapbMessageMms changed to BluetoothMapbMessageMime
- Fixrf addOriginator in getMessage request
- Add missing subjects in events for SMS
- Don't send ReadStatusChanged when pushing a message
- Temp way of adding names/uci to IM msg listing
- Added messageHandle filtering in msgListing
- Convolisting parameter mask support
- Added support for using handle when filtering in root folder during msgLising
- Added subject to event in sms
- Fixed so attribute_mime_type is only sent when parameter is requested
- Fixed feature bit check to messageListing version
- Fixed leaking cursors
- Added support for database identifier
- Added folder and conversation version counters

Change-Id: I4d2954b795aa7ed2a41dd034384da30f240b518f
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
bbb4110b455b3aa29106d5b4f0a37e1be8e09475 09-Apr-2015 Casper Bonde <c.bonde@samsung.com> Obex over L2CAP + SDP search API

Each profile had its own implementation of ObexTransport.
These implementations were implemented very similar, and
could easily be merged into a common implementation.

Additionally it will make it easier to adopt the transport
to support L2CAP.

The SDP functionality is implemented in a way that is scalable,
hence adding new record types is easy.
Intents are currently used to distribute the SDP search results,
as we have observed that the new client side profiles have been
located outside the Bluetooth package.
We strongly recommend to keep all bluetooth profiles within the
Bluetooth package, to acoid the need for exposing all bluetooth
interfaces through the Android framework. For instance this new
SDP create API is internal to Bluetooth, hence cannot be used by
the external profiles - hence they cannot use OBEX over L2CAP.

The SDP search currently supports:
- MAP both sides
- OPP server (only the server needs an SDP record)
- PBAP server (only the server needs SDP record)

The SDP create record currently supports:
- MAP both sides
- OPP server
- PBAP server
The new l2cap sockets introduces a new wrapper class for a rfcomm
and an l2cap socket.
The wrapper design:
- Creates two accept threads running while bluetooth is
turned on.
- When a connection is accepted the owner is asked wether or not
to accept the connection if rejected, the connection will be
rejected at obex level, else it will be accepted and the state
is changed to busy.
- Any further connections will be rejected at Obex level, until
the state is changed back to idle.

Notes tor executing the test cases:
Test OBEX using local pipes(no BT) or two bluetooth enabled
devices.

Test SDP using two Bluetooth enabled devices

Start server testcase first on one device, then start
the matching client test on the other device.

You cannot run all tests in one go, as they need to run
on multiple devices.

Edit the test sequesce to add/remove/modify the sequence
of OBEX operations to perform.

Use the new SDP record create interface.

Change-Id: I3941793f9843abf4afa5ffbee40d1d01c118b29b
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
326b5e610063ac24c0ba467ac585bd4c7f618a67 24-Jul-2014 Casper Bonde <c.bonde@samsung.com> BT MAP: added support for email sharing over BT

- added support for Emails
- added activity to do setup of the email accounts to share
- added improved handling of MMS, SMS and Email
- Many optimizations to speed (especially getMessageListing)
- fixed wakelock problem
- fixed user timeout problem when user do not react to msg access request
- added missing privileges
- support for Quoted Printable format
- added accountId in test case URIs
- fixed problem with service numbers being strings
- fixed problem with read flag in getMessage
- added support for transparent flag in Email Push
- added missing send-event for non-imap accounts
- set attachment size to 0 if text-only message
- fixed double send for sms messages with retry
- removed secondary phone numbers from recipient/originator
- removed insert-address-token in MMS messages
- fixed null-pointer exception in settings (missing extra in intent)
- send text-only mms as sms (workaround to make it cheaper)
- fixed rejection of native and fraction requests
- better handling of unknown message types in push
- fixed problem with possible illigal xml chars in message listing
- added missing WRITE_APN_SETTINGS permission to manifest
- fixed problem with notifications when pushing to folders other than OUTBOX
- removed debugging code
- added support for threadId
- fixed permission problems
- changed to use ContentProviderClients for Email app access
- fixed names for member vars

UPDATE: Moved the MAP E-mail API to the bluetooth package.

UPDATE: Added check for the presense of MMS parts.
This is needed due to a change in the MMS app/subsystem,
where deleted messages gets corrupted.

Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Change-Id: Ib5dbe7c2d5c0ba8d978ae843d840028592e3cab4
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
0e7e149687b0b5e340991b20c9d8e5232e8d3e39 08-Nov-2013 Hemant Gupta <hemantg@codeaurora.org> MAP: Fix MNS observer sync and sendevent exception issue.

Allow MNS Client sendEvent only when MNS Client is registered
and connected to fix NullPointer exceptions. Mark MNS disconnect
and observer registration as synchronized to handle synchronization
for operations from worker and main threads.

Change-Id: If34a6b67a1774f693ed42cfb6c871cd9563abe55
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
c09b531ba47eee740485b0c6022981fc38ef1587 27-Nov-2013 Zhihai Xu <zhihaixu@google.com> release wakelock if no activity in Bluetooth MAP profile to avoid waste power.

bug:11138488
Change-Id: Ie7d8903cc917aee51711fa47f275863e4046f3d8
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
9dc561f7f13569552a62f771b16fe35dc5b9cd16 02-Nov-2013 Zhihai Xu <zhihaixu@google.com> Merge "NPE in bluetooth MAP cause bluetooth process crash" into klp-dev
9679a425747e95082e169b3bd3673ed6b5a27590 31-Oct-2013 Zhihai Xu <zhihaixu@google.com> NPE in bluetooth MAP cause bluetooth process crash

bug:11448104
Change-Id: I30045162c89e2150a9ef476f33e1b322e7cc9a44
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
824929471ee80476e6d6774eedac9f30c5623eb2 23-Oct-2013 Zhihai Xu <zhihaixu@google.com> MAP: fix problem with MNS not disconnecting correctly

MNS is needed to disconnect with the MSE but did not.
This patch fixes that by re-adding a disconnect() that was wrongfully removed during review.
Patch set 2:
-----------
- Split disconnect and shutdown for MNS connection
bug: 11161674
Change-Id: Idd09fc774584dfdb171b0d00be0f7711ae57b853
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
311fd8bf28c1c16c4da81485b26518c8df97f50b 17-Oct-2013 Zhihai Xu <zhihaixu@google.com> Bluetooth Application Crash while try to pairing with laptop - IKDVXPSE-345

the handleRegistration will never run after we shutdown the handler thread first,
with this change, we can make sure the mObserver will never be null
when call handleRegistration.
bug:11148404

Change-Id: I93b351915b49cf59a7d2026b7d83a68a7e76dd38
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
70bfe3280ce158c39dbb25fe18386f0d10b490d3 24-Sep-2013 Zhihai Xu <zhihaixu@google.com> Unable to receive Text Message to CAR Kit(nuvi3580LM)

The problem is when we receive the SetNotificationRegistration,
the MNS thread is not ready yet.so the notification is not enabled.
so we won't send new message notification to Carkit.

bug:10898884

Change-Id: Ibaa4a92694bcbb1ea2fb4e8a3de0ff30acdafeb1
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
70be005a18a35ec5fcb46152f0dfbe82156efa3a 22-Aug-2013 Kim Schulz <k.schulz@samsung.com> Fixes to the google review comments + spec 1.1

- updated code to comply with MAP spec 1.1
- removed activity + strings.xml
- removed unused notification code
- fixed TODOs
- added more string validation and case insensitivity
- fixed internal+google review comments
- Added dump of incoming bMessages to /sdcard/bluetooth/log when verbose debug in enabled. Only the latest received message will be stored
- Fix functions msgListingSize and msgListingHasUnread to also consider mms filter message type
- Fix wrong tag length define for notification status parameter
- Re-added shutdown code to interupt the MNS
- removed map activity
- Added initial bluetooth map unit tests
- Fix map event report xml start tag to uppercase 'MAP'
- added support for using ProfileService class
- changed the way the Broadcast Receiver was implemented
- Fixed minor bugs found during Automotive Test Event
- FilterPeriod application parameters can be present, but with zero length
- For MMS the end-boundary were added too early
- The FOLDER entry in bMessage can be empty for a message push
- Wrong error value returned for a set status operation with a wrong handle
- In getMessage() exclude all binary content and smil.xml if the appParam attachment is set to "no".
- Set correct content id and content location for mms. Fix mms mime parser bug.
- moved disconnect to Handler thread
- fixed multipart-message split bug.
- added a few Unit tests for multi-part messages
- MMS parser optimized
- fixed exception in MNS obex Client
- fixed problem with Native PDUs not getting correct timestamp
- corrected mixup in ordinator/recipient for MMS

Change-Id: I3875762822a7f8ce0132065e0da5d0257e3850a1
Bug:10692365
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java
fd6603b8bf9ed72dcc8bd59aaef3209251b6e17c 19-Jul-2013 Matthew Xie <mattx@google.com> Bluetooth MAP profile - sms and mms support initial check-in

bug:10116530

Change-Id: If9ce878d71c1e1b12416014c433da03b3033e158
/packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMnsObexClient.java