summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/map/BluetoothMapService.java
Commit message (Collapse)AuthorAgeFilesLines
* "DO NOT MERGE" Add write SMS protectionJessica Wagantall2016-06-131-0/+5
| | | | | | | Bug: 25138326 Ticket: CYNGNOS-2707 Change-Id: I494db57e9291fac108e2abae85db367992ad81a1 (cherry picked from commit fd7a794fc57e06606244b9fc1673c9c549cce5c4)
* Compilation fix for bluetoothDivya Sharma2015-03-101-21/+0
| | | | Change-Id: I4fb839a8b2c8444ff3c3fcb5b1305ff65b7455f8
* Merge tag 'android-5.1.0_r1' into HEADSudhir Sharma2015-03-101-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 5.1.0 release 1 Conflicts: src/com/android/bluetooth/btservice/AdapterService.java src/com/android/bluetooth/gatt/AdvertiseManager.java src/com/android/bluetooth/gatt/ScanManager.java src/com/android/bluetooth/hfp/HeadsetPhoneState.java src/com/android/bluetooth/hfp/HeadsetStateMachine.java src/com/android/bluetooth/map/BluetoothMapContent.java src/com/android/bluetooth/map/BluetoothMapContentObserver.java src/com/android/bluetooth/map/BluetoothMapEmailSettingsLoader.java src/com/android/bluetooth/map/BluetoothMapObexServer.java src/com/android/bluetooth/map/BluetoothMapService.java src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java src/com/android/bluetooth/opp/BluetoothOppService.java src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java Change-Id: Ic7a754ea29d6124d7e53b6f13eed181d3f7e64e5
| * Turn off map debug verbose messagesMatthew Xie2014-12-011-2/+2
| | | | | | | | | | | | | | Still leave the debug messages on to provide some basic debug info Bug: 18486776 Change-Id: I08fc5c69d9a128ec5ddc97203d02b82ced255262
| * Add dumpsys support for bluetoothMike Lockwood2014-10-281-0/+22
| | | | | | | | | | Bug: 18159457 Change-Id: I807a7d921b6e5baf111d0f0e3e182c6633a93b7c
* | MAP: Broadcast intent with FLAG_RECEIVER_FOREGROUND parameterHemant Gupta2014-12-221-0/+4
| | | | | | | | | | | | | | | | | | This patch adds FLAG_RECEIVER_FOREGROUND parameter before broadcasting intent so that intent is not delayed and can be received by settings app on time, thereby preventing connection failure for MAP Change-Id: I2a748316eda900aa9a30b84fa4ec233bb8612a33 CRs-Fixed: 771048
* | PBAP: Add support for handling connection stateHemant Gupta2014-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for updating connection state for pbap server on settings UI. A new flag is added to allow settings sub menu to show pbap preference only when remote device has intiaited pbap request and not for all devices for which user has started/accepted pairing request from remote device. Change-Id: I3ba777a6be4a6321a260739b9a87a8c6054a74d3 CRs-Fixed: 758697
* | MAP: Fix KW Issues for MAP.Ashwini Munigala2014-11-041-3/+5
| | | | | | | | | | | | | | | | Modifications to fix KW P1 or critical issues captured from KlocWork. Change-Id: Ie7100907513147f0d743b579998a16880ebf734f CRs-fixed: 739477
* | MAP: Handle EXTRA_ALWAYS_ALLOWED flag and setMessageAccessPermission.Ashwini Munigala2014-11-041-3/+15
| | | | | | | | | | | | | | | | | | Set MessageAccessPermission sharedPreference for MAP authorization as per EXTRA_ALWAYS_ALLOWED flag indicated in ACTION_CONNECTION_ACCESS_REPLY from Settings authority package. Change-Id: I9e4c5e058aa3f27898ae9be0540d19d704e22bb3 CRs-fixed: 739535
* | MAP: Add MAPEmail support in SDP only when email account available.Pradeep Panigrahi2014-11-041-1/+113
| | | | | | | | | | | | | | | | | | | | Register primary email account configuration or deletion to update MAP Email support dynamically from MAP Server SDP only when primary email is configured or available. CRs-fixed: 727015 Change-Id: I7328e210d51e7a15f1493e00846f22688ff03148
* | MAP: Add support for Email and map bug fixesHemant Gupta2014-11-041-330/+528
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed bug fixes in map profile along with email support MAP: Support MMS pushMessage feature. Enable MMS push Message feature support. Parse multi parts in bMessage including text and attachments as per standard MIME format. Change-Id: I292f9f96d0b1215f86c95c9ae531dbe7ec6e7b05 Bluetooth: Map: Add Bug fixes from kk. Squashed commit of the following: commit 2f11cda9955871c40e0ecde465e79eadeb24b089 Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Fri Jul 18 00:03:10 2014 +0530 Bluetooth: Map: Bug fixes on MAP profile Generic bug fixes in map profile. Change-Id: I9b3dcf73de595f30c5c132caf6d9bb728f75191a commit 741be2f08a844e7559f6e328e5b1e86311e5a4cf Author: Ashwini Munigala <AshwiniM@codeaurora.org> Date: Fri May 30 18:25:24 2014 +0530 MAP: Fix MAP Connect issue for frequent connect/disconnect trials Ensure isWaitingAuthorization flag update during MAP Connect authorization from SocketAcceptThread to avoid user timeout disconnection for frequent remote connect/disconnect trials. Change-Id: I1502ef1bd97cc1ecaf624f371fb23a33869ab80e CRs-fixed: 667467 (cherry picked from commit 99eb62b3195782cdde8320e9fe231168b5b48a77) commit 29111c59dba3498b24c5fdfad649b83ae59a7e40 Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Sun Jun 22 17:33:51 2014 +0530 Bluetooth: Map: Add below fixes in map code 1) Do not allow message listing on root, telecom, msg folders. 2) Use fastXmlSerializer for creating xml folder listing element. CRs-fixed: 683145 Change-Id: I446049d21272542274cb675123e9b1735691640d commit 14713469686e72d82b05299ce0dac09f622fe16a Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Wed Jul 16 11:41:50 2014 +0530 Bluetooth: Map: Add only originator phone number in getMessage response In a scenario where originator vcard comprises of multiple numbers, Map server is adding all the numbers present in Originator's vcard to bMessage while responding to getMessage request. This is creating IOT issues with all the carkits, as carkits are not able to parse properly this bMessage and always showing the last contact as the message Originator. Add change to keep only the primary number with which the message is sent, on the originator vcard. Change-Id: I9b3368353ad57476357b4d9933227d39653f3328 CRs-fixed: 694556 commit 365673eb378670d8be8212b10dea34fde35a8f2b Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Wed Jul 9 12:28:02 2014 +0530 BT: Map: Add null check for number parameter during message listing A case where message is saved in draft with no recipeint name. when we try to fetch contact name during messagelisting, null number passed to ContactsProvider would cause IllegalArgumentException. Add null and empty check before quering contact provider. Change-Id: Id25ba00af414d252dd8b1ca6475bfa31b9278757 CRs-fixed: 690894 commit 162b129aac30c5e4081b04e4144d2baa309ea587 Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Tue Jun 24 11:08:48 2014 +0530 Bluetooth: Map: Parse Native format message properly Add change to parse native format message properly and call telephony interface with correct parameter. Change-Id: I52b27fa872986229914787053528e2cc53d8440b CRs-fixed: 684522 commit 2c5d6c433387c2dd863333c6f724ab6573fb4e0f Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Wed May 21 08:50:37 2014 +0530 Bluetooth: Map: IOT: Fix Message Display issue with FORD SYNC carkit FORD SYNC carkit is unable to parse message if line feed (\n) is present in it and displaying incomplete message. Add change to remove line feed (\n) from message and keep only carriage return (\r) in the message, to fix this IOT issue. Change-Id: Icf30097a5651be8595017aa6772cac02582c99be CRs-fixed: 667984 commit 858a4d750e05111e86d98cdbeb511d19fcd47a19 Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Fri May 16 10:54:56 2014 +0530 Bluetooth:Map:IOT: Fix Subject Display issue with HONDA Carkit Honda Carkit always masks subject field in message listing and hence always shows a blank subject in UI. Add change to always send subject field in Messagelisting for honda carkit,so that it can show proper subject fields in UI and better user experience. Change-Id: Icb9dd51ba0e1d1a5b45aeb417afcce6e79365b32 CRs-fixed: 664315 commit 030d6ddffc9df745f46566e93316c52913b14aac Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Thu May 8 13:02:58 2014 +0530 Bluetooth: Map: IOT: Fix Message Display issue with PCM carkit PCM carkit is unable to parse message if carriage return(\r) is present in it and displaying incomplete message. Add change to remove carriage return (\r) from message to fix this IOT issue. Change-Id: Ic69ffad138f2c633214a7a24c377b03c6f569d3f CRs-fixed: 660620 commit 71124336d13c61190d41dccdf830b11242892dac Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Mon Feb 10 12:19:05 2014 +0530 Bluetooth: MAP: Synchronize Mns function's to avoid race condition synchronize Mns shutdown and disconnect function so that if it is called from different threads at the same point, it should not lead to any crash. CRs-fixed: 613764 Change-Id: I1df0440b4189521a0fb88d981f4208f225ef2a51 commit f1a78b061cffe66b58410bf2fd6dce3527150e56 Author: Pradeep Panigrahi <pradeepp@codeaurora.org> Date: Fri Jan 31 11:27:58 2014 +0530 Bluetooth: Map: Validate BT Adapter before starting rfcomm listener Validate BT adapter handle to avoid null pointer exception, while trying to start rfcomm listener as a part of MAP profile startup. Change-Id: Ifa5f1f77ea51cab793df3695a8f7058525f67b98 CRs-fixed: 608319 Change-Id: I7467247891b45708f9ebf8710c9545bdd94d93c3 Conflicts: src/com/android/bluetooth/map/BluetoothMapService.java MAP: Support MAP S Email Instance Add MSE Implementation in Bluetooth Map Profile to support email MAS instance for EMAIL type messages. Change-Id: I65802821ebe545b605c7cfd5e9679173e780f2a1 Conflicts: src/com/android/bluetooth/map/BluetoothMapService.java Bluetooth:Map: Bug fixes in MAP profile. 1) Use Application mainlooper while calling phoneStateListener. 2) Generic bug fixes in map profile. CRs-fixed: 716711 Change-Id: Ibc874c5cba17faa8c97c8b085525a4e40531b9b2 Bluetooth: Map: Add replyToAddressing field in message lisitng element replyToAddressing field is not getting added in messageListing element even if parameter mask is set to zero. Add change to include reply to address as well in the messagelisting element. Change-Id: Id4a87685684b6eb746690489f84347271bd2f21e CRs-fixed: 718838 Bluetooth: Map: Filter email messages based on priority Add change to filter email messages based on priority if message lisiting is done with filterPriority parameter CRs-fixed: 718854 Change-Id: I1dc963ba370d13b867ce559b43e939a5dcf120c4 Bluetooth: Map: Add following fix in MAP profile Add change to filter email messages using originator email .When message listing is done with filter originator parameter set to email address then message listing is failing because filtering was only supported with originator name. Add change to filter email address using originator email as well to fix this issue. Add change to create proper v card for all reciepints in bMessage response to get message request. CRs-fixed: 718859 Change-Id: I1834d6fdc77c6fb92dd29c8bf74e6df37e0b6637 Bluetooth: Map: do not add old folder field in MessageDeleted mns event As per MAP spec 1.2 MessageDeleted event should not contain the old_folder field in mns event report. Add change for the same. CRs-fixed: 720675 Change-Id: I6259b6db1e3d7d8fb83a8c6ea9a912560c2cc4d9 Bluetooth: Map: Add change to not send mns event for mce initiate operation MCE initiated operation does not need mns event to be sent by mas server. Add change such that no mns event is sent for mce initiated operation for email instance. CRs-fixed: 720677 Change-Id: I2355a9c7b81b8ef3c9dc6d612ac440a8fee9b1ee MAP: MMS SendingSuccess event only for MCE initiated push. Report MNS SendingSuccess type event only when MMS is pushed through MAP from MCE. CRs-fixed: 715343 Change-Id: I6f291152d1d91e8eda5ed2aaba6986e018f45446 Bluetooth: Map: Add following fixes in map profile 1) Add change to send sending success mns event for only mce initiated operation. 2) Add change to send message shift mns event 3) Add change to filter reply to addressing using parameter mask. CRs-fixed: 724276 Change-Id: Iae285c63d9e0a452f44e32b58bb8c3240e07f933
* | Revert "BT MAP: added support for email sharing over BT"Hemant Gupta2014-11-041-552/+347
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 326b5e610063ac24c0ba467ac585bd4c7f618a67. Conflicts: Android.mk res/values/strings.xml src/com/android/bluetooth/map/BluetoothMapService.java src/com/android/bluetooth/map/BluetoothMnsObexClient.java Change-Id: I1c1a3220d229473a6d13a568856d6001277bfa2a
* | Revert "Fixed a Bluetooth MAP bug."Sridhar Gujje2014-11-041-2/+0
| | | | | | | | | | | | This reverts commit 335b2b8f6f17c93a4c2b192c8e1b629e48b230b3. Change-Id: Ifd603e49b2ad4cc3553b3459b0c743969789a8d0
* | Bluetooth: Dynamic Logging for data profilesHemant Gupta2014-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds dynamic logging support for MAP, PBAP and OPP data profiles. OPP: Control Verbose logging runtime from adb shell Support runtime VERBOSE logging control for OPP Server or Client app implementation through "BluetoothOpp" TAG. PBAP: Control Verbose logging runtime from adb shell. Support runtime VERBOSE logging control for PBAP Server App implementation through BluetoothPbapService TAG. MAP: Set BluetoothMapService.VERBOSE to false from code. Mark DEBUG for logs to be enabled by default. OPP: Dump timestamp while send and receive file. Add appropriate verbose logging. CRs-fixed: 608230, 604523 Change-Id: Ia0db1ff0847d1f6822d53ecedc3f7095abed1fa5
* | OPP: Support OPP1.2 Features over L2CAP.Hemant Gupta2014-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support OPP1.2 features. OBEX over L2CAP , SRM and SRMP. Use javax.btobex lib instead of javax.obex for OBEX OPP, MAP and PBAP profiles. CRs-Fixed: 639499 Conflicts: src/com/android/bluetooth/opp/BluetoothOppTransfer.java src/com/android/bluetooth/map/BluetoothMapService.java Conflicts: Android.mk src/com/android/bluetooth/map/BluetoothMapAuthenticator.java src/com/android/bluetooth/map/BluetoothMapService.java src/com/android/bluetooth/map/BluetoothMnsObexClient.java Change-Id: I9b4e64dcc4eae44252334547d5478a12f5b9bef5
* | OPP: BUG Fixes in kikatHemant Gupta2014-11-041-0/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bluetooth-OPP: Restart OPP service on ACL disconnect Whenever OPP service is forcefully stopped, it will get restarted on reception of ACL disconnected intent from frameworks. Change-Id: I8b976c44dc5edd62288fd87abd84a1831e820957 Bluetooth: OPP: set csv format as acceptable shareinbound types Adding csv format to acceptable inbound types, to be able to receive these file formats from remote device. Change-Id: I4ef8da4672d021412f806276c9bc292db17bf0c5 Bluetooth: OPP: Display proper name while cancelling transfer Saves names of all the selected files to be transferred even before starting of client thread so that names remain intact in the outbound information even when the batch is cancelled from initiator. Change-Id: I1763e6fee04dc8bbac943ec1db4d739d46f40939 Bluetooth: OPP: Change for updating BT recipients prompt information This patch adds changes for getting the updated name of the BT recipient during OPP in case the device name is getting changed in between the two consecutive transfers. Change-Id: I0d2102343638b693fe6e02bf27ac4c603ff86962 Bluetooth: OPP: null check for optional header length Adding null check for optional header length in put request to avoid NUll pointer Exception. Change-Id: Iac3b96b3803fb0ac83a41e75b7dcc6ce1f7c982f Bluetooth: OPP: Handle Try Again exception to retry write When the write to socket is faster than BT maximum throughput socket buffer gets full and it returns EAGAIN, writing application has to retry in this case. This return value is thrown as exception from JNI layer and has to be handled properly to retry the write operation. Change-Id: I14db1d85a2e406cf70ae3687db8b727baaba782b Allow an empty file information to be stored in ContentValues OPP implementation doesn't store an empty file information in ContentValues though the file has a valid URI info and it is allowed to transfer an empty file to the remote device. Due to which, in OPP file transfer history it became an unknown file. The change enables OPP to update the valid empty file info in ContentValues which can be processed by a ContentResolver. Change-Id: I852bf0d51dc00325854ff1e76436cf4f104ac85c Cleanup Opp session during ACL disconnect Process ACL_DISCONNECT message in OPP module to clean up the transfer related data as soon as ACL is disconnected. This removes the delay we observe in displaying File not received message when Remote device's Battery is abbruptly taken out or remote disconnects the ACL when authorization request is in pending state in DUT. Change-Id: Ie749990987e43a02636c4e573e706f615e58fe7b Bluetooth: Mark proper file transfer status upon OBEX response timeout This patch will handle the scenario of obex timeout which occurs due to cancelling the transfer in between and trying sending again. Change-Id: I92a269be6cd7e972ddc98b10f036b19e7aebbbe5 Bluetooth: Do not terminate session when a Batch contains an empty file If an empty file is rejected by the remote device, client session is terminated and remaining files in the batch also marked as failure. This change continues to send the pending files in the batch even an empty file is rejected by the remote device. Also it provides appropriate message to the user. Change-Id: I0a48e1fb652c51b8e7eb8fa1c9a66efe99acd3d2 Bluetooth: OPP: Update the user confirmation with proper value User confirmation for the Incoming Files is updated in the Array from the Database. There are two Database reads, the first read is used for evaluating the user confirmation and the second read to update the information in the Local Array. The stored information in the Array will be used to evaluate a change in its value in the database. Because of this, if there is a change in the database from the point of first read to second read, the value stored in the array would be different than the value evaluated. In this case the evaluation during next updateShare call will not see any change in user confirmation value in database and array and hence will not result in Notifying the ServerSession which is waiting for user confirmation. Change-Id: I382f9cccf63a8f53f46bb84639ab1345f784ad43 Bluetooth: Add send file information before retransmission This patch adds send file information before retrying failed file transfer. without this change, file outbound file could not be sent as file information was missing resulting in error. CRs-Fixed: 505101 Change-Id: I53e828672d107e80a600fbbcc73c7b0ec7bf0737 Bluetooth: OPP Update progress in worker thread OPP throughput was seen very less because of the progress update from BT Read/Write path. Moved it to worker thread. Change-Id: I884356dc8b42a7f7eca1b8581e3118d5ec2ce9e2 Clean up file when file transfer is aborted by remote/local device Delete File when the transfer is terminated due to Remote's BT is turned off, remote being taken out of reach or remote is turned off properly. Also delete the file on the next reboot while the previous inbound transfer was interrupted by local device power off. CRs-Fixed: 506182 Change-Id: I96211e701610322881eda8345d04898ae3f18ab6 Bluetooth: set apk format as acceptable shareinbound types. Adding apk format as a acceptable inbound types ,to be able to receive these file formats from remote device. Change-Id: I5175b634b88418b0d5c9baaedb84a48fe0d97357 CRs-fixed: 497427 OPP: Set ics format as acceptable shareinbound type Adding ics format to acceptable inbound type, to be able to receive these file format from remote device. Change-Id: Ief9da2c745378ea28fa03da770aee3c8310892c4 CRs-fixed: 570922 OPP: Support for Obex Tx Rx at the same time This change will allow the OPP Rx to be done even when Tx is ongoing. Change-Id: I87a048e8fdb1090bb755fe977901cc6325ce5415 CRs-fixed: 565447 Bluetooth-OPP: Separating Inbound and Outbound notifications This change will ensure that inbound and outbound notifications will be updated separately. Otherwise, during simultaneous Rx and Tx if one of the ongoing transfer is aborted notification status will not be updated and will show transfer in progress because there is one active transfer. CRs-Fixed: 601855, 609292, 653842 Change-Id: I907bd9706a747df82162ce3e5ce42eb40f8fc96f Bluetooth-OPP: Truncate receiving file name instead of rejecting it Truncate receiving filename if name exceeds OPP_LENGTH_OF_FILE_NAME instead of rejecting file by the Obex server with response OBEX_HTTP_INTERNAL_ERROR. CRs-Fixed: 576621 Change-Id: I2ef5fbe22252f41a8c87958a2558476a310b7f39 Bluetooth-OPP: Cleanup OPP transfer sessions after abort When user cancelled the tranfer while ongoing transfer,the transfer session will be cleaned up properly. Otherwise, while Tx + Rx concurrency if user abort the Tx and start Tx again new tranfer session will be created only after Rx is finished. CRs-Fixed: 585962 Change-Id: I9b5e1c0f1748ccc47811d669ddab96ba43f424f5 Bluetooth-OPP: Update notification while BT is turning OFF Update notification while BT is turning OFF. Otherwise, if notification thread didn't start when BT is turning OFF inbound/outbound file transfer status notification will not properly updated and show transfer in progress. CRs-Fixed: 550485, 594171 Change-Id: I0752bcddcf218726c8564d26da7bc7c86a0005fd Bluetooth-OPP: Handle Exceptions while OPP operation Handle Exceptions while OPP operation. Otherwise, during transfer if there is database or security error which will cause bluetooth app crash. CRs-Fixed: 568920 Change-Id: Id64facc10d08be7b7a60cd3b2b6a54e46f844777 Bluetooth-OPP: Cleaning up cursor object to avoid memory leak Cursor objects are leaked after BT OFF/ON, when it is referenced (Directly OR Indirectly). So Garbage Collector doesn't collect cursor objects which are referenced. Setting NULL to cursor object after closing to mark those variable as weak reference object. Any objects memory is immediately claimed by GC, which are marked as weak Reference. CRs-Fixed: 579016 Change-Id: Ic019ae5bf6eb91fb25a259673216cd67fce4afe2 Bluetooth-OPP: Add pending state for multiple connection request This change will ensure that multiple client connections are set to pending when there already exist an OPP client connection. Otherwise, some application can start OPP Server session without transfer and if another client sends a file request during this time will cause multiple incoming file request popup in DUT if first device trys to send the file while DUT is already waiting for user confirmation for the incoming file request from the second device. CRs-Fixed: 659167 Change-Id: Iac6b3c160bd5be6a4ddcd31f8e82d1ee2528d0ec Bluetooth-OPP: Fixed the BT occurs ANR when tap "try again" button When tap the "try again" button on the send failed dialog, the method "BluetoothOppSendFileInfo::generateFileInfo()" will be call, if there are about 1500 contacts, execute this method would be very time consuming, So caused the ANR happen. Changed this method into the child thread execution, through a Handler send a message to the main thread after this method return, and then retry the failed transfer. CRs-Fixed: 522213 Change-Id: I22bd04160e826789f8154bd334d948bb66ea1296 Bluetooth-OPP: Avoid IndexOutOfBoundsException if share is zero This change will avoid IndexOutOfBoundsException if number of sharing files are zero. Otherwise, Bluetooth application will force close itself when exception encountered. CRs-Fixed: 628860 Change-Id: I42473c8ca2d9116c6d57707ab8f3c452d7027e67 Bluetooth-OPP: Add ogg format support Add ogg format to acceptable share inbound types to send/receive these file format using OPP. CRs-Fixed: 623953 Change-Id: I0547a4aee11db294f1d58a61b0b2c68f62e3498c Bluetooth-OPP: Clear incoming file notification while BT turned OFF This change will ensure that incoming file notification will be cleared from notification bar while BT is turned OFF. Otherwise, incoming file notification will be displayed on notification bar even though BT is OFF. CRs-Fixed: 610549 Change-Id: I11d6cc0360802862d836d082e2b16e139090dad0 Bluetooth-OPP: Cleanup pending share while BT turn OFF This will ensure that pending OPP shares will be removed from database while BT is turning OFF. Otherwise, BT turned back ON if there are some pending share in database it will start sending automatically. CRs-Fixed: 611970 Change-Id: Ibc2664840f11bfeaefb5984e8ac18a171d515129 Bluetooth-OPP: Avoid sending TRANSFER_COMPLETED_ACTION intent This change ensure that TRANSFER_COMPLETED_ACTION intent will not sent to receiver if there is any exception occurred during OPP operation because this intent is already sent to receiver from message handler. Otherwise, OPP toast message will come twice in UI. So no need to sent it twice. CRs-Fixed: 609287 Change-Id: I5fbd78d51102dad27145133cd867150f886cc997 Bluetooth: Fix the issue of certain files didn't send by bluetooth DUT didn't send APK files or files whose format were not supported. DUT didn't send several MP3 files by one time. These caused by the bluetooth file transfer limit. Add file type for bluetooth. CRs-Fixed: 591288 Change-Id: Iaa7443dafa724a7c34597bd14bd160528a05fd06 Bluetooth: The hint display English when share a 0kb file in Chinese Add the Chinese resource for "empty_file_notification_sent" string. CRs-Fixed: 670792 Change-Id: I6e1db8b6a9abc672009a2d2d6d9bab11e7a5e822 Bluetooth:Invalid turning on BT under CMCC mode In CMCC mode, share a picture through BT will turn on BT when airplane mode is on. Return when airplane on and in CMCC mode when shareing files through BT. Use res-overlay variable to control it. CRs-Fixed: 655125 Change-Id: I4682d8eaf3c8faf990605f89b5f9b885df35e542 Bluetooth-OPP: Orientation change fix for tranfer history popup Enable screen orientation support in Manifest file of Bluetooth app for Bluetooth file tranfer history activity. Otherwise "Clear List" popup will disappears soon after screen orientation changes. CRs-Fixed: 584258 Change-Id: Ia6cfe1e6a48d37271fe6d558ea090fe39669410f OPP: Use long as file size instead of int This patch fixes issue of problems in sending/receiving files which cannot be accomodated in int type of Java. Instead of using int, long data type is used, which can hold 64 bits data size in JAVA which is suitable for storing file sizes in GB. Changes are done in how updates are sent to progress bar which supports only int by using the percentage of data transferred to update the progress. Change-Id: Ie545fd483c46dd7f41da56857e67decbe7f5a167 CRs-Fixed: 583275 OPP: Always try to get current name of device from stack This patch tries to retrieve current name of device from BD stack everytime, so as to avoid using cached device name which would lead to wrong name when remote device name has been changed. Change-Id: I0ae604b0cb7203dec79bdeeb6bd8d89793f29fa9 CRs-Fixed: 593828 Conflicts: src/com/android/bluetooth/opp/BluetoothOppNotification.java Conflicts: res/values/strings.xml Change-Id: I4682d8eaf3c8faf990605f89b5f9b885df35e542
* Fixed a Bluetooth MAP bug.PauloftheWest2014-09-291-0/+2
| | | | | | | | + Beforehand, if a user disabled MAP and then unpaired the device, then Settings would automatically deny future MAP requests from the device. Bug: 17391677 Change-Id: I068f37426ed6a044ed2b5e9391cd9dd00908f867
* Migrates PBAP and MAP access permission data from Settings to Bluetooth.Edward Jee2014-09-151-37/+44
| | | | | | | | | | | | | Currently, users' preference in phonebook and call history or message access per each Bluetooth-paired device is stored in Settings application's shared preferences. However, some privileged applications other than Settings need to access such data. So we decided to migrate the data from Settings application's shared preferences to Bluetooth application's. Bug: 17158953 Change-Id: I3808891cdcce84aa0d4df31f998c9f1240159d95
* Change broadcast ACTION_CONNECTION_ACCESS_REQUEST to be ordered.Ang Li2014-09-081-1/+1
| | | | | | | | | | | | | | | | Making this broadcast ordered makes it possible to be intercepted before Settings get it. This is cruicial to Android Audo's use case and test automation. The previous change we put in: https://googleplex-android-review.git.corp.google.com/#/c/499135 was accidentally overwritten by https://googleplex-android-review.git.corp.google.com/#/c/503267 We are putting this change back in, and making similar changes for PBAP and HFP. Change-Id: Ia9b4c22a05d0c9beb1485b53ddf04c45fa210526
* BT MAP: added support for email sharing over BTCasper Bonde2014-08-061-344/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Make ACTION_CONNECTION_ACCESS_REQUEST to be sent in ordered fashion.Ang Li2014-07-081-14/+1
| | | | | | | | | | The purpose of this change is to enable automated testing to confirm incoming connection without involving human. Remove .setClass so the intent is no longer only sent to Settings. This is ok because the intent is still hidden and protected. Remove unused imports. Change-Id: I3be5df4ab440b299a75ec41d566f9eecb0ab3f31
* MAP: Remove pending MAP authorization pop upHemant Gupta2014-06-291-4/+59
| | | | | | | | | | | | | | | | | - If USER turn off BT on DUT before accepting incoming authorization request for MAP connection, then MAP authorization pop up should be removed. Thsi was failing as user time-out scenario was not handled currently, where MAP OBEX session is stopped. So MAP OBEX session will not get cleared till BT OFF. So MAP OBEX connection was failing from next iteration onward. Queuing User time-out(30 seconds) to disconnect MAP OBEX session to solve this issue. -If ACL is disconnected by remote device before accepting incoming authorization request for MAP connection, then MAP authorization pop up should be removed. Change-Id: Ib8068f793eb1b55a155d3ff657efefc40728233c
* release wakelock if no activity in Bluetooth MAP profile to avoid waste power.Zhihai Xu2013-12-161-1/+37
| | | | | bug:11138488 Change-Id: Ie7d8903cc917aee51711fa47f275863e4046f3d8
* MAP: fix problem with MNS not disconnecting correctlyZhihai Xu2013-10-221-3/+3
| | | | | | | | | | 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
* Fix for MAP/PBAP: Race-condition when requesting authorization from Settings appCasper Bonde2013-10-111-1/+2
| | | | | | | | | | | | | | | | | | When MAP and PBAP requests authorization from the Settings app via Intents, it also sets a state isWaitingForAuthorization to indicate that it should handle incoming replies. This is however done in the code after the intent have been sent and in some cases the reply for the intent is returned before the state has been update = no handling of the reply. This only happens on the second connect with a paired device and only when the user have selected the "do not ask again" checkmark in the popup requesting access. FIX: Move the update of isWaitingAuthorization to before sending the intent to settings bug: 11179645 Change-Id: I25b019e32a01caa8509c8f97195712120823afa9
* Unable to receive Text Message to CAR Kit(nuvi3580LM)Zhihai Xu2013-09-261-44/+40
| | | | | | | | | | 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
* Fixes to the google review comments + spec 1.1Kim Schulz2013-09-131-370/+389
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Bluetooth MAP profile - sms and mms support initial check-inMatthew Xie2013-08-091-0/+778
bug:10116530 Change-Id: If9ce878d71c1e1b12416014c433da03b3033e158