OSDN Git Service

android-x86/packages-apps-Bluetooth.git
9 years agoLocale based string alignment changes in BT.
Sanket Padawe [Tue, 7 Jul 2015 23:32:42 +0000 (16:32 -0700)]
Locale based string alignment changes in BT.

Bug: 22218258
Change-Id: Id2e1cf9a653ce58619d5c5bea2d62868f3f1e517

9 years agoAdd READ_PRIVILEGED_PHONE_STATE permission to manifest
Andre Eisenbach [Mon, 29 Jun 2015 18:11:58 +0000 (11:11 -0700)]
Add READ_PRIVILEGED_PHONE_STATE permission to manifest

Bug: 22093842
Change-Id: I0410b9b2f82b7471989ac3857abf6ffa2e106015

9 years agoSend ACTION_ALIAS_CHANGED when remote device alias is changed
Andre Eisenbach [Wed, 24 Jun 2015 17:45:44 +0000 (10:45 -0700)]
Send ACTION_ALIAS_CHANGED when remote device alias is changed

Bug: 20341903
Change-Id: I6e9dbeb1d05bdcce56fab63ccdd701138c99f5a0

9 years agoSends bond state change intent for unbonding a device
Subramanian Srinivasan [Fri, 31 Jan 2014 02:51:42 +0000 (18:51 -0800)]
Sends bond state change intent for unbonding a device

When remove bond API is called from the stack layer,
the bond state change intent is not sent in the
upper layers to unbond a device.

Change-Id: I515bfaf3f1a575106b10e2f688b1e9de58770b87

9 years agoPBAP: Add support for PBAP 1.1.1 specification
Hemant Gupta [Tue, 28 Apr 2015 12:15:17 +0000 (17:45 +0530)]
PBAP: Add support for PBAP 1.1.1 specification

This patch adds support for erratas to make the specification version
compatible to PBAP 1.1.1 specification.

Following errata needs to be supported to make the specification version
compatible to PBAP 1.1.1

   https://www.bluetooth.org/errata/errata_view.cfm?errata_id=1824

   Proposed modification to the text of the spec:
   5.3.3 Name
     This is the name of the folder to be retrieved. The value shall not include
     any path information, since the PullvCardListing function uses relative paths.
     An empty name header may be sent to retrieve the vCard Listing object of the
     current folder. However, it is illegal to issue a PullvCardListing request with
     an emtpy name header from the telecom/ folder.
     Any such request shall be responded to with a "Not Found" error message.

Bug: 21896912
Change-Id: I0fb2c7d96b6e34d0bf83bb62901a8fd47c470fe6

9 years agoFix compile errors due to OPP merge
Andre Eisenbach [Tue, 23 Jun 2015 19:23:53 +0000 (12:23 -0700)]
Fix compile errors due to OPP merge

Change-Id: Ia07d99d58785c7e974b1fb32afaeb157ad337932

9 years agoDisplay proper file name while cancelling transfer
Pradeep Panigrahi [Thu, 29 Aug 2013 06:04:03 +0000 (11:34 +0530)]
Display proper file name while cancelling transfer

Use Case:
1) Send files in batch from remote to DUT
2) Cancel the transfer in between from either side.
3) Check name of the files in failed tranfer message.

Failure:
Name shown in the failure message is different than actual file
name in batch

Fix:
Save 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.

Bug: 21896912
Change-Id: I42c98721365c4c8acb746d49ba9ceff5b0737b71

9 years agoAcquire the full wakelock only during user confirmation request
Pradeep Panigrahi [Tue, 27 Jan 2015 04:14:00 +0000 (09:44 +0530)]
Acquire the full wakelock only during user confirmation request

Use Case:
1. Create obex connection from remote to DUT.
2. Dont transfer any file and wait for the screentimeout.
3. Check if device goes to suspend.

Failure:
Device does not go to suspend mode if OPP connection is present.

Root Cause:
Acquire the full wakelock when user confirmation is required and
not during opp connection request.

Fix:
Obex server session will acquire the full wakelock only when user
confirmation is required. Otherwise, if session acquires the full
wakelock during connect request and did not receives the PUT
request from remote full wakelock will not be released. In this
scenario DUT will not go to suspend and cause battery drain.

Bug: 21896912
Change-Id: I17b90b206016c2a34d724393ac3b17a41983722c

9 years agoUse long as file size instead of int while using OPP.
Pradeep Panigrahi [Fri, 5 Jun 2015 05:27:03 +0000 (10:57 +0530)]
Use long as file size instead of int while using OPP.

Use Case:
1. Pair and connect to Dongle
2. Send a 2GB file from Dongle to DUT.

Failure:
File transfer failed in between.

Fix:
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.

Bug: 21896912
Change-Id: I49f9bf8a4a0e3668e32058d582a2700b0e6057e8

9 years agoMark proper file transfer status upon OBEX response timeout
Pradeep Panigrahi [Thu, 29 Aug 2013 04:03:24 +0000 (09:33 +0530)]
Mark proper file transfer status upon OBEX response timeout

Use Case:
1) Pair with remote dongle and send a file over OPP.
2) Reset dongle such that there is obex response timeout.

Failure:
File transfer status is not marked a failed and hence cannot be retried

Fix:
This patch will handle the scenario of obex timeout which occurs due
to cancelling the transfer in between and trying sending again.

Bug: 21896912
Change-Id: Ide1a64e5874bda2c5cf71531f5971bc8bebf5e9f

9 years agoAvoid sending TRANSFER_COMPLETED_ACTION intent multiple times.
Pradeep Panigrahi [Wed, 29 Jan 2014 06:13:58 +0000 (11:43 +0530)]
Avoid sending TRANSFER_COMPLETED_ACTION intent multiple times.

Use Case:
1. Share a picture through Bluetooth, select partner devices.
2. The partner devices do not confirm to receive the file.
3. Check the transfer status on the DUT.

Failure:
Failure Notification pops up twice when the shared files not
received by the partner phone

Fix:
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.

Bug: 22028876
Change-Id: I3ad2f24be185c37355dff43009a5236bede0106a

9 years agoCheck for AVRCP handler validity before cleanup
Anubhav Gupta [Tue, 3 Feb 2015 06:30:00 +0000 (12:00 +0530)]
Check for AVRCP handler validity before cleanup

In stress testing of BT on-off usecase, crash was observed
due to triggering double clean-up. This fix introduces
additional Check for handler validity while clean-up to
avoid the crash.

Bug: 21896912
Change-Id: I14b1c35d1fa0345c59d61682d92795aa617436b5

9 years agoFix issue #20494208: Go out of device idle when headset button is pressed
Dianne Hackborn [Fri, 19 Jun 2015 23:23:28 +0000 (16:23 -0700)]
Fix issue #20494208: Go out of device idle when headset button is pressed

We tell the device idle controller to go out of idle before
starting the voice command activity.

Change-Id: I41900518af61f0cb477ec56eaebfe798c69512f9

9 years agoDO NOT MERGE: Remove DayNight theme
Alan Viverette [Thu, 18 Jun 2015 21:55:33 +0000 (14:55 -0700)]
DO NOT MERGE: Remove DayNight theme

Bug: 21854466
Change-Id: I85b8e78d0e6adf3ad2046c803ea45aba9eb2c3ca

9 years agoRevert "Disable Bluetooth profiles that are not used on Clockwork."
Andre Eisenbach [Wed, 17 Jun 2015 21:21:18 +0000 (14:21 -0700)]
Revert "Disable Bluetooth profiles that are not used on Clockwork."

Breaks every other platform... BAD AUTOMERGER, BAAAD...

This reverts commit 6675e069ec19582de75a754d57a0ff78306752dd.

9 years agoam 29acf6cd: am 6675e069: Disable Bluetooth profiles that are not used on Clockwork.
Sharvil Nanavati [Tue, 16 Jun 2015 21:49:52 +0000 (21:49 +0000)]
am 29acf6cd: am 6675e069: Disable Bluetooth profiles that are not used on Clockwork.

* commit '29acf6cd655486214a7bff44f27a1ad7e465cb75':
  Disable Bluetooth profiles that are not used on Clockwork.

9 years agoam 6675e069: Disable Bluetooth profiles that are not used on Clockwork.
Sharvil Nanavati [Tue, 16 Jun 2015 21:40:13 +0000 (21:40 +0000)]
am 6675e069: Disable Bluetooth profiles that are not used on Clockwork.

* commit '6675e069ec19582de75a754d57a0ff78306752dd':
  Disable Bluetooth profiles that are not used on Clockwork.

9 years agoMerge "Make address type agnostic in mac address scan filtering." into mnc-dev
Wei Wang [Tue, 16 Jun 2015 01:11:37 +0000 (01:11 +0000)]
Merge "Make address type agnostic in mac address scan filtering." into mnc-dev

9 years agoFix overflow in energy calculation
Adam Lesinski [Tue, 16 Jun 2015 00:42:28 +0000 (17:42 -0700)]
Fix overflow in energy calculation

The energy value can get quite high, so use longs.

Change-Id: Ib03c07160339c82a834ea94fe155a65f0efb03d2

9 years agoMake address type agnostic in mac address scan filtering.
Wei Wang [Sat, 13 Jun 2015 01:27:29 +0000 (18:27 -0700)]
Make address type agnostic in mac address scan filtering.

b/20187218

Change-Id: I2349c9ca2cd1186ceff98f3eb42b6ecba9da002e

9 years agoRemoved AVRCP-related log messages that could fill-up the log.
Pavlin Radoslavov [Sat, 13 Jun 2015 00:49:02 +0000 (17:49 -0700)]
Removed AVRCP-related log messages that could fill-up the log.

For some Bluetooth devices, the AVRCP interaction could trigger
periodic log messages at INFO level, and those messages can
fill-up the log file.

Bug: 21818725
Change-Id: I87aca499138b46a79f4251d8a5fe8552ae171205

9 years agoMerge "Enforce permission check in BLE scan only mode." into mnc-dev
Wei Wang [Fri, 12 Jun 2015 20:59:15 +0000 (20:59 +0000)]
Merge "Enforce permission check in BLE scan only mode." into mnc-dev

9 years agoEnforce permission check in BLE scan only mode.
Wei Wang [Thu, 11 Jun 2015 23:09:57 +0000 (16:09 -0700)]
Enforce permission check in BLE scan only mode.

Bug:21494402
Change-Id: I3d5d6e87bb8aef8760aa4087559abfeebabb42b1

9 years agoDisable Bluetooth profiles that are not used on Clockwork.
Sharvil Nanavati [Fri, 12 Jun 2015 18:19:18 +0000 (11:19 -0700)]
Disable Bluetooth profiles that are not used on Clockwork.

Change-Id: Ib46a5f6882712f6d5598e6d1a7165fc7737da832

9 years agoSAP: turn debugging and test flags off
Kim Schulz [Mon, 8 Jun 2015 13:37:04 +0000 (15:37 +0200)]
SAP: turn debugging and test flags off

Currently DEBUG, VERBOSE and PTS_TEST_MODE is on as a default.
There is no reason for that in production code (except for during test
where the code needs to go through PTS test)

Bug: 21692162
Change-Id: Id092a79959fa38608d06755cc43148eee9ec3e00

9 years agoSAP: Make it possible to enforce a 16-digit pin code (3/5)
Casper Bonde [Fri, 8 May 2015 12:21:12 +0000 (14:21 +0200)]
SAP: Make it possible to enforce a 16-digit pin code (3/5)

This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.

This is needed for the SIM access profile.

Change-Id: I42ada9b36d24d43697a2010eccbc0103f15af77d
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoHandle SLC in MultiHFPending state
Mallikarjuna GB [Thu, 4 Jun 2015 11:29:39 +0000 (16:59 +0530)]
Handle SLC in MultiHFPending state

Use case:
Connect 2 headsets one after another in quick
succession.

Failure:
SLC for first headset is not happening.

Root cause:
SLC for first headset is not handled when second
headset is connecting.

Fix:
Add handling for SLC event for HS1 in MultiHFPending state.

Change-Id: If0c2553c28e233bea4622fca10c94fddd913afa7

9 years agoAdd null checks
Mallikarjuna GB [Thu, 2 Apr 2015 11:17:15 +0000 (16:47 +0530)]
Add null checks

Added null checks identified by static analysis tool.

Change-Id: I5ff04775313b06d549c5ae97e497dd44e9231b04

9 years agoHandle SCO volume change in multihfpending state.
Mallikarjuna GB [Thu, 4 Jun 2015 11:45:40 +0000 (17:15 +0530)]
Handle SCO volume change in multihfpending state.

Use case:
1. Connect one headset.
2. Make MO/MT call.
3. While connecting second headset, change
   call volume on the phone.

Failure:
SCO volume changed is not updated to first headset.

Root cause:
Volume change is not handled in MultHFPending state.

Fix:
Added handling volume change in MultiHFPending state.

Change-Id: I6ac3cb2968b99de194fa7c0114d45f9d81dcb663

9 years agoHandle multiple BLDN commands from headset
Mallikarjuna GB [Fri, 22 May 2015 11:03:25 +0000 (16:33 +0530)]
Handle multiple BLDN commands from headset

When multiple AT+BLDN commands are received
from headset, return ERROR if dialling process
is started for the first AT+BLDN.

Change-Id: I603eb5c5ccdd5f8606a355e5d464e6493d1e7fd9

9 years agoCheck for A2dp SNK UUID supported by remote
Anubhav Gupta [Tue, 17 Sep 2013 05:50:27 +0000 (11:20 +0530)]
Check for A2dp SNK UUID supported by remote

Check for A2dp sNK UUID supported by remote before proceeding
with A2dp SNK connection when DUT acts as A2dp SRC.
This change addresses the issue where Host being A2dp SRC is
seen trying connecting to other A2dp SRC repeatedly.
This will ensure that DUT being A2dp SRC does not try to connect
to A2dp SRC only peers.

Change-Id: I0200582a69b3d4e9b7f92516ba92f34054a1f4dc

(cherry picked from commit 5b7325d795331a249a70fdfd20a9f29bed388f1d)
(cherry picked from commit 27f0077dde25b69442aff316e5c60d32f2275a65)
(cherry picked from commit c5b6b44414be53bbb75e064412a7d2d49ffe871f)

9 years agoMove A2dp State to Disconnected when BT is Turned OFF
Anubhav Gupta [Thu, 5 Sep 2013 13:50:25 +0000 (19:20 +0530)]
Move A2dp State to Disconnected when BT is Turned OFF

A2dp State gets Stuck in Connecting state If User tries to connect to
other paired device when device is already connected to one, and before
connection swap succeeds, power-cycles BT.
This change allows the state to move properly to disconnected for the
device pending connect when BT is turned off.

Change-Id: I17bc620551bf735f39327eff59102c14551bcf26

(cherry picked from commit 0ce6816d43761b838b65adbf1e636630e1047fcf)
(cherry picked from commit 51c4d0f1df682f3874915f99ef49ec5c3d9e74ed)
(cherry picked from commit 6583fca29318b3c8bc0b16d588fc939ffdde6142)

9 years agoDo not accept SCO without any active listener.
Mallikarjuna GB [Thu, 4 Jun 2015 12:37:04 +0000 (18:07 +0530)]
Do not accept SCO without any active listener.

Use case:
1. Connect to Motorola s305 headset.
2. start playing music on Phone.
3. Make an MO call for last dialled number from headset.
4. Accept and end the call from remote phone.

Failure:
After call ends, music resumes on headset for 1-2secs and
routed to speaker.

Root cause:
Headset is re-connecting SCO after call disconnection.

Fix:
 - Some HS re-connect SCO after call disconnection.
   Do not accept such incoming SCO connection requests.
 - Check for valid SCO listener(active CS or VOIP call, VR started)
   before accepting incoming SCO connection requests.

Change-Id: Ifcb1f760b3eabf52d9b507c5d25021b90bfec561

9 years agoHandle startScoUsingVirtualVoiceCall in HeadsetService
Mallikarjuna GB [Wed, 17 Sep 2014 08:31:39 +0000 (14:01 +0530)]
Handle startScoUsingVirtualVoiceCall in HeadsetService

Use case:
Connect headset while in VOIP call

Failure:
SCO is not established with headset

Root cause:
When HS is connected while in VOIP call, sometimes
startScoUsingVirtualVoiceCall() is called even before HSM is
transitioning from Disconnected/Pending to Connected state.

Fix:
Do not ignore startScoUsingVirtualVoiceCall in HeadsetService
if HeadsetStateMachine is still in process of transition to
Connected state.

Change-Id: I8a6c7f3e08b8a9dfc4c4efc6d1d041149874eab0

9 years agoSet correct callState for MT/MO call while in Voip Call.
Mallikarjuna GB [Thu, 4 Jun 2015 11:37:23 +0000 (17:07 +0530)]
Set correct callState for MT/MO call while in Voip Call.

Use case:
Start MO/MT call during VOIP call.

Failure:
Incorrect response sent to AT+CIND? to headset

Root cause:
terminateScoUsingVirtualVoiceCall() resets callState
from INCOMING/DIALING to IDLE. At the same time, if HS sends AT+CIND?
to read call indicators, it will get wrong value of callsetup. This case
is hit only when SCO for VOIP call is not terminated via SDK API call.

Fix:
When VOIP is ended, save current MO/MT call state to
HeadsetPhoneState class to be able to respond with
proper call states when queried by headset.

Change-Id: Ia3a0a2d67dbfffef474de48cab6ee63b82fa4572

9 years agoMerge "Update the roam status to headset" into mnc-dev
Andre Eisenbach [Thu, 4 Jun 2015 16:53:06 +0000 (16:53 +0000)]
Merge "Update the roam status to headset" into mnc-dev

9 years agoUpdate the roam status to headset
Mallikarjuna GB [Fri, 22 May 2015 10:51:04 +0000 (16:21 +0530)]
Update the roam status to headset

This change makes sure that roam status
change is updated to headset immediately
as soon as it is changed. With this, we will
not wait to update the roam status till network
service state changed.

This fixes a PTS test case. Notmally a roaming
state change would be accompanied by a service
state change.

Change-Id: Ib30a69e58ee81e67986ffde52093e5f37315f814

9 years agoSAP: Correct ResultCode for setTransportProtocolResp
Casper Bonde [Tue, 28 Apr 2015 09:24:17 +0000 (11:24 +0200)]
SAP: Correct ResultCode for setTransportProtocolResp

Changed to respond with "Error, not supported" according to
the SAP specification, to pass PTS tests.

Change-Id: If4f3ddf27468d13f1162c19ab6c0a712fc81fd92
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoSAP: Shorten long lines
Casper Bonde [Mon, 27 Apr 2015 14:37:04 +0000 (16:37 +0200)]
SAP: Shorten long lines

Change-Id: I89d5bf6d68b8aba9d9e86e891bfb1b79eb241432
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoSAP: Fix exception at shutdown
Casper Bonde [Fri, 17 Apr 2015 09:46:49 +0000 (11:46 +0200)]
SAP: Fix exception at shutdown

Restructures the disconnect/shutdown code, to avoid exception.
Also ensure cleanup of notifications and profile public state.
This also fixes the bug introduced when handling ACL_disconnect
intent, where the rfcomm-listener was not restarted.

Change-Id: I3b4561f610abc77011689b7cfb67a4b54c41500c
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoSAP: Dynamic use of wake locks
Casper Bonde [Wed, 22 Apr 2015 11:37:31 +0000 (13:37 +0200)]
SAP: Dynamic use of wake locks

This changes the way wake locks are used for SAP from acquiring
wake lock at connect, and releasint at disconnect to acquiting
a wake lock each time activity is detected, either between
Bluetooth and the RIL or between Bluetooth and the client.
The wake lock is released when there has been no activity for
one second.

This is the same scheme as for MAP, except using a lower timeout
value, based on analysis of the traffic when connected to a
Nokia 616 car-kit.

Change-Id: Ie4bcf7e991d81e88b64dc4ba20fa74b327fde3c6
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoAdd support for MITM for BluetoothSockets (2/4)
Casper Bonde [Tue, 21 Apr 2015 11:14:25 +0000 (13:14 +0200)]
Add support for MITM for BluetoothSockets (2/4)

This change enables use of the option to enforce Man-in-the-middle protection
for the authentication process for the Sim Acces Profile.

Change-Id: I98244d5e822c25f3f8f51833f38c79e13bb60e63
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoSAP: Change to use new SDP Api (2/4)
Casper Bonde [Thu, 16 Apr 2015 13:24:00 +0000 (15:24 +0200)]
SAP: Change to use new SDP Api (2/4)

Added support for Sim Access Profile (SAP) in the SDPManager.
To make it easier to test, both SDP record creation and seach
is added.

Change-Id: I871eb762389e3717b8bd6bc37a8ffc09fff6f589
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoAdd null checks in PanService
Hemant Gupta [Wed, 15 Oct 2014 13:26:30 +0000 (18:56 +0530)]
Add null checks in  PanService

This patch fixes issues identified by static analysis tool
in Bluetooth apk wrt PAN.

Change-Id: Icd65c87450c8a3c3e745b2820bfca1d1f49b98db

9 years agoMerge "Add unit test for commit "Support work contacts in HFP, PBAP, MAP"" into mnc-dev
Tony Mak [Mon, 1 Jun 2015 16:09:10 +0000 (16:09 +0000)]
Merge "Add unit test for commit "Support work contacts in HFP, PBAP, MAP"" into mnc-dev

9 years agoAdd unit test for commit "Support work contacts in HFP, PBAP, MAP"
Tony Mak [Mon, 1 Jun 2015 10:49:10 +0000 (11:49 +0100)]
Add unit test for commit "Support work contacts in HFP, PBAP, MAP"

1. In ag/674009, entire bluetooth is diabled temporarily.
This commits enable the test and just comment out test case that need the removed dependency.

2. Fixed a potential NPE in composeAndSendPhonebookOneVcard

3. Refactor the code a bit to allow testing

Bug: 19551175
Change-Id: I20e17d38cebdccc39c14e960503ac7d23a9bd928

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Sat, 30 May 2015 22:42:23 +0000 (15:42 -0700)]
Import translations. DO NOT MERGE

Change-Id: I5372787f7c703f7ede461757220ee7359372ee02
Auto-generated-cl: translation import

9 years agoAdd a missing check for a null pointer when processing an Intent
Pavlin Radoslavov [Sat, 9 May 2015 03:59:00 +0000 (20:59 -0700)]
Add a missing check for a null pointer when processing an Intent

This fixes Low severity vulnerability in Bluetooth: Denial of Service

Bug: 20952998
Change-Id: Ifec45568f0e7e158b96a2557a7e1eefcee5bb6f5

9 years agoUpdate Bluetooth app to use Material-themed dialogs
Alan Viverette [Fri, 29 May 2015 17:35:17 +0000 (10:35 -0700)]
Update Bluetooth app to use Material-themed dialogs

Change-Id: I9cec1d41bbf8e16e1d9db0b784584f24e74cff4f

9 years agoMerge "Increase the min LE connection interval to 11.25ms" into mnc-dev
Prerepa Viswanadham [Wed, 27 May 2015 01:03:37 +0000 (01:03 +0000)]
Merge "Increase the min LE connection interval to 11.25ms" into mnc-dev

9 years agoIncrease the min LE connection interval to 11.25ms
Prerepa Viswanadham [Wed, 27 May 2015 01:01:36 +0000 (18:01 -0700)]
Increase the min LE connection interval to 11.25ms

To reduce audio choppiness, increase the min LE connection interval
to 11.25ms from 7.5ms

Bug: 18776956
Change-Id: I4722a85f0d3204ec741f6a88142907a29bffe0bf

9 years agoMerge "Add unit test for bluetooth contacts sharing policy" into mnc-dev
Victor Chang [Thu, 21 May 2015 19:20:35 +0000 (19:20 +0000)]
Merge "Add unit test for bluetooth contacts sharing policy" into mnc-dev

9 years agoAdd unit test for bluetooth contacts sharing policy
Victor Chang [Thu, 23 Apr 2015 20:20:59 +0000 (21:20 +0100)]
Add unit test for bluetooth contacts sharing policy

Bug: 19990980
Change-Id: Iacd7a53f21500cd809759f5498d54ffd87a8c242

9 years agoMAP: Fix MAP server inter-op issues
Hemant Gupta [Tue, 12 May 2015 15:27:58 +0000 (20:57 +0530)]
MAP: Fix MAP server inter-op issues

 - Fix no recipient address info available when GETMessage
   and MessagesListing requested on Draft folder. Fetch
   Draft recipient address from "canonical_address" table
   based on threadId when no address available from regular
   "sms" table in telephony database.
-  Avoid dummy entry in sms database when requested to push a
   empty message. Reject empty SMS body and handle a possible
   exception from telephony stack for invalid message body.
-  Send MMS complete "size"  as attachment size fetched from
   database and subject or text length available.
-  Donot include "old_folder" info in MessageDeleted MNS event.
   As per Spec, only MessageShift event should use the later info.
-  Handle possible exception while processing  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: I5f2234ae7e50ed719a31f463e372d2026988539c

9 years agoMAP: Restart MAS servers after ACL disconnect
Casper Bonde [Mon, 27 Apr 2015 13:55:35 +0000 (15:55 +0200)]
MAP: Restart MAS servers after ACL disconnect

Code was introduced to remove MAP Access Request early at
ACL disconnect. By removing the notification as wall as the
UserTimeout timer caused the MAS instances not to be restarted,
to be able to accept a new conection. Hence if this occured
no connection to MAP was possible untill the phone or Bluetooth
was power cycled.

This fix causes the MAS instances to be restarted in
the event of a ACL disconnect before user accepts MAP req.

Also, applied some updates to the log messages:
 - Changed the VERBOSE flag to false
 - Changed some DEBUG messages to VERBOSE (for privacy reason)
 - Updated the message priorities to match their purpose. E.g.,
   "if (VERBOSE) Log.i(...)" -> "if (VERBOSE) Log.v(...)"

Bug: 19239028

Change-Id: Icf6d065a7a48c70a9bbc1593267f6a3605433af2
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoCatch an exception when updating incoming message status
Pavlin Radoslavov [Tue, 12 May 2015 01:39:47 +0000 (18:39 -0700)]
Catch an exception when updating incoming message status

Note: this change does not fix the root cause for Bug 16042763,
but addresses an issue that could be triggered within the
same context as Bug 16042763.

Bug: 16042763
Change-Id: Ib56894f3fa3b7754d1d3f3214a923d9d0a23eb80

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Thu, 14 May 2015 03:25:55 +0000 (20:25 -0700)]
Import translations. DO NOT MERGE

Change-Id: Ib2264185061f8e8874c26912cc5a5da8da033c0a
Auto-generated-cl: translation import

9 years agoFix JNI memory leak for onlost/onfound reporting
Prerepa Viswanadham [Tue, 12 May 2015 23:54:47 +0000 (16:54 -0700)]
Fix JNI memory leak for onlost/onfound reporting

Bug: 21080980
Change-Id: I7bded15aeccbf2f2fcfa2fe53b71614f1fd456ab

9 years agoMAP: Fix of cursor closed too early
Casper Bonde [Mon, 4 May 2015 19:54:46 +0000 (21:54 +0200)]
MAP: Fix of cursor closed too early

A cursor variable was reused for a new query, which lead to
the cursor being closed too early.
This fix introduces a second cursor variable and appropriate
close calls.

Bug: 20227071
Bug: 20565456

Change-Id: I1fa271497a9eb37bb3e435b61dc5daa2b9727af4
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoBluetooth native dumpsys logging support (4/5)
Andre Eisenbach [Fri, 5 Dec 2014 17:35:40 +0000 (09:35 -0800)]
Bluetooth native dumpsys logging support (4/5)

Bug: 18508263
Change-Id: Ib9546ff2cf64d2e085e27e691032749e869e0795

9 years agoCancel inquiry during the transition from Bluetooth off to LE on state
Nitin Arora [Thu, 30 Apr 2015 19:07:43 +0000 (12:07 -0700)]
Cancel inquiry during the transition from Bluetooth off to LE on state

This change cancels any inquiry or device discovery that is ongoing
while Bluetooth transitions from BT_ON state to BLE_ON state, before
disabling all core services.

Change-Id: I3f14b6a1f6629c60c897ab39e49c44516400d737

9 years agoWorkaround to increase onLost timeout.
Wei Wang [Wed, 6 May 2015 06:09:24 +0000 (23:09 -0700)]
Workaround to increase onLost timeout.

Change-Id: I9dfc24198be436f489b7c2f2051a7448478f6762

9 years agoMerge "Merge commit '4626db5' into master_merge" into mnc-dev
Prerepa Viswanadham [Tue, 5 May 2015 01:05:57 +0000 (01:05 +0000)]
Merge "Merge commit '4626db5' into master_merge" into mnc-dev

9 years agoTune onfound/onlost timeouts for platform
Prerepa Viswanadham [Fri, 1 May 2015 18:15:21 +0000 (11:15 -0700)]
Tune onfound/onlost timeouts for platform

Change-Id: Ieefcc7cbd94f698aabf8497b6db7182d28bde8e4

9 years agoMerge commit '4626db5' into master_merge
Prerepa Viswanadham [Fri, 1 May 2015 18:29:14 +0000 (11:29 -0700)]
Merge commit '4626db5' into master_merge

9 years agoRevert "Fix no resource tracking available for more than 2 filters."
Wei Wang [Fri, 1 May 2015 07:59:13 +0000 (07:59 +0000)]
Revert "Fix no resource tracking available for more than 2 filters."

This reverts commit d5a562fbd16db8b10daf3f4920166659f3ceaf03.

Revert the temp hack. We should think of a better solution.

Change-Id: Ibee3a060ca9ec21e91ceb0cc0e612d08745a9376

9 years agoFix no resource tracking available for more than 2 filters.
Wei Wang [Thu, 30 Apr 2015 08:28:47 +0000 (01:28 -0700)]
Fix no resource tracking available for more than 2 filters.

Change-Id: I29ddbe348134c673b6cce754033df165d6d40743

9 years agoWorkaround to fix Bluetooth crash when using onFound/onLost.
Wei Wang [Thu, 30 Apr 2015 07:09:17 +0000 (00:09 -0700)]
Workaround to fix Bluetooth crash when using onFound/onLost.

Bug:20694614
Change-Id: I87b9f58af53551f7b919e6db76ada516eac33176

9 years agoTake out TBD comments.
Prerepa Viswanadham [Wed, 29 Apr 2015 22:08:55 +0000 (15:08 -0700)]
Take out TBD comments.

Change-Id: I5e02b4874b6cbc25f2361226e48e4c879698d0c8

9 years agoLE low power scan feature
Satya Calloji [Tue, 31 Mar 2015 21:08:26 +0000 (14:08 -0700)]
LE low power scan feature

LE low power extended scan feature JNI changes
based on Google spec v0.95

Bug: 20029342
Change-Id: I5efd7ee3c644a51371bf250fca535e06c466640e

9 years agoMAP: Fix possible NullPointerException while GetMessagesListing
Hemant Gupta [Wed, 22 Apr 2015 12:38:10 +0000 (18:08 +0530)]
MAP: Fix possible NullPointerException while GetMessagesListing

Fix possible NullPointerException while processing GetMessagesListing
on a MSE without a valid SIM , case wherein invalid  messageType value
occurs on MAP SMS/MMS Instance. Now by default SMS type is set to GSM.

Following basic PTS test cases and also other PTS cases dependent on
GetMessagesListing functionality fail without this fix:
TC_MSE_MMB_BV_11_I
TC_MSE_MMB_BV_20_I
TC_MSE_MMU_BV_02_I

Change-Id: I8ed0a2787534159342af88ec413a1c0407961d91

9 years agoFix redial JNI crash
David Stevens [Wed, 15 Apr 2015 19:05:14 +0000 (12:05 -0700)]
Fix redial JNI crash

Redial is implemented as dial(null). On eng builds, passing null into
dial triggers a fatal assert. Add null checks to prevent the crash.

Change-Id: Ieb168a79647ef7d56a7c81e058f7269ed20c22b1

9 years agoFix crashes when calling numHwTrackFiltersAvailable.
Wei Wang [Tue, 28 Apr 2015 01:26:44 +0000 (18:26 -0700)]
Fix crashes when calling numHwTrackFiltersAvailable.

Initialize curUsedTrackableAdvertisements in constructor. Also remove
BLUETOOTH_PRIVILEGED permission check on onFound/onLost APIs.

Bug:20643021

Change-Id: I2de6afd31d7af6cb927bc532f6cd855e1a7f46a4

9 years agoam 60eb58c4: (-s ours) am d42ebb24: Merge "OnFound/OnLost feature JNI changes based...
Ed Heyl [Sun, 26 Apr 2015 18:39:28 +0000 (18:39 +0000)]
am 60eb58c4: (-s ours) am d42ebb24: Merge "OnFound/OnLost feature JNI changes based on BLE spec v0.90."

* commit '60eb58c4bfa9ef1d87e2a359eea81416ce5782b5':
  OnFound/OnLost feature JNI changes based on BLE spec v0.90.

9 years agoam 82431cec: am 2bc6e65d: Merge "Add hwp MIME type to transfer/receive over bluetooth"
Elliott Hughes [Sun, 26 Apr 2015 05:40:33 +0000 (05:40 +0000)]
am 82431cec: am 2bc6e65d: Merge "Add hwp MIME type to transfer/receive over bluetooth"

* commit '82431cecda9c1e68c58028ea49f0059aef0dab21':
  Add hwp MIME type to transfer/receive over bluetooth

9 years agoam d42ebb24: Merge "OnFound/OnLost feature JNI changes based on BLE spec v0.90."
Ed Heyl [Sat, 25 Apr 2015 23:50:00 +0000 (23:50 +0000)]
am d42ebb24: Merge "OnFound/OnLost feature JNI changes based on BLE spec v0.90."

* commit 'd42ebb241d264158499cb963c1d4cc0e3b02264c':
  OnFound/OnLost feature JNI changes based on BLE spec v0.90.

9 years agoam 2bc6e65d: Merge "Add hwp MIME type to transfer/receive over bluetooth"
Elliott Hughes [Sat, 25 Apr 2015 23:49:59 +0000 (23:49 +0000)]
am 2bc6e65d: Merge "Add hwp MIME type to transfer/receive over bluetooth"

* commit '2bc6e65d7ac443ac976aa7aac8c84bf601f85eaa':
  Add hwp MIME type to transfer/receive over bluetooth

9 years agoMerge "OnFound/OnLost feature JNI changes based on BLE spec v0.90."
Ed Heyl [Sat, 25 Apr 2015 23:26:39 +0000 (23:26 +0000)]
Merge "OnFound/OnLost feature JNI changes based on BLE spec v0.90."

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Sat, 25 Apr 2015 06:37:39 +0000 (23:37 -0700)]
Import translations. DO NOT MERGE

Change-Id: I2b7c46b89dce9f463bcf326b65a9f793e17e0867
Auto-generated-cl: translation import

9 years agoMerge commit 'ee92804' into merge2
Etan Cohen [Fri, 24 Apr 2015 21:34:30 +0000 (14:34 -0700)]
Merge commit 'ee92804' into merge2

9 years agoMerge commit '24181ab' into merge2
Etan Cohen [Fri, 24 Apr 2015 21:34:24 +0000 (14:34 -0700)]
Merge commit '24181ab' into merge2

9 years agoOnFound/OnLost feature JNI changes based on BLE spec v0.90.
Satya Calloji [Tue, 10 Feb 2015 17:18:49 +0000 (09:18 -0800)]
OnFound/OnLost feature JNI changes based on BLE spec v0.90.

Bug: 19609671
Change-Id: I2ac0687ea53616287d82fe47f256686619c0998a

9 years agoEnable back bluetooth test cases
Tony Mak [Thu, 23 Apr 2015 11:05:14 +0000 (12:05 +0100)]
Enable back bluetooth test cases

Removed testHeaderEncode as mmm-common is not used anymore and
this function is testing a third party library instead of bluetooth related function.

Bug: 20515454

Change-Id: Ib6a4a04b46f09db2b277ac23ffb038ea80f0f03e

9 years agoFix compile error due to extra brace
Andre Eisenbach [Thu, 23 Apr 2015 01:14:48 +0000 (18:14 -0700)]
Fix compile error due to extra brace

Change-Id: I467dcd31b97ed93e1a0f079ac02ee951c67ccac6

9 years agoReduce AdaperService and HeadsetStateMachine log levels
Andre Eisenbach [Thu, 23 Apr 2015 00:36:40 +0000 (17:36 -0700)]
Reduce AdaperService and HeadsetStateMachine log levels

Bug: 20460314
Change-Id: I6d1750845ccd0995800a8f82d2122cb1f3bc108d

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 22 Apr 2015 13:10:14 +0000 (06:10 -0700)]
Import translations. DO NOT MERGE

Change-Id: I10ea4f7dde24eaf1bfad98fa0844c5937c2857f6
Auto-generated-cl: translation import

9 years agoFix some nit's in previous comments
Prerepa Viswanadham [Tue, 21 Apr 2015 23:37:01 +0000 (16:37 -0700)]
Fix some nit's in previous comments

Change-Id: I47fe325daff6dd2dbe83a7491fedf06daa19f18f

9 years agoManage onfound/lost resources (2/2)
Prerepa Viswanadham [Fri, 10 Apr 2015 00:17:02 +0000 (17:17 -0700)]
Manage onfound/lost resources (2/2)

Provide error callback to app if advertisement tracking resources
can't be reserved

Change-Id: Iff545591b919bcf7ca6615072e942be3e56938c2

9 years agoMerge "Updating bluetooth share icon"
Sunny Goyal [Tue, 21 Apr 2015 19:06:10 +0000 (19:06 +0000)]
Merge "Updating bluetooth share icon"

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 20 Apr 2015 14:39:11 +0000 (07:39 -0700)]
Import translations. DO NOT MERGE

Change-Id: I42d2d7e06c9cc5935f0c57b2e8090fd94b2b1475
Auto-generated-cl: translation import

9 years agoAdd support for Bluetooth Sim Access Profile (3/4)
Casper Bonde [Thu, 19 Mar 2015 09:01:53 +0000 (10:01 +0100)]
Add support for Bluetooth Sim Access Profile (3/4)

Server side of the Sim Access Profile. Enables a Bluetooth device
to take over control of the SIM. This is usefull in cars where the
internal antenna in the phone can have a low signal level.

For this profile to work, the RIL driver must allow for this feature
to be used, and it must provide the API needed. The API is based on
protoBuf.

This change includes some SAP test cases.

Change-Id: Ia46493383efed6b8a89ca270bdafa60fc1a150c1

9 years agoBluetooth LE background operation mode (1/2)
Nitin Arora [Wed, 11 Mar 2015 22:45:26 +0000 (15:45 -0700)]
Bluetooth LE background operation mode (1/2)

Changes to BluetoothAdapter state machine for handling new
states BLE_STATE_ON and intermediate states BLE_TURNING_ON
and BLE_TURNING_OFF. Also includes the actions required
while migrating in and out of these states including
start and stop of GATT services and other profiles.

Change-Id: I08d6ff05c2cefe559d5bb5789a1a488afefbe544

9 years agoMAP: Change MMS to use new API to send message
kschulz [Fri, 6 Mar 2015 12:54:49 +0000 (13:54 +0100)]
MAP: Change MMS to use new API to send message

Removed the send MMS message intent, and replaced by
SmsManager.sendMultimediaMessage()

Change-Id: I226b7b0e8fdb101ab160563937ae6e7a1a13be41
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoFix build issues after the merge
Vinit Deshpande [Wed, 15 Apr 2015 21:11:52 +0000 (14:11 -0700)]
Fix build issues after the merge

This change temporarily disables bluetooth test because
we have code that depends upon mms-common which is removed
from the build.

Change-Id: Ia856311187a0b2168cb859bd8b2300ff59df6569

9 years agoAdd support for Bluetooth Sim Access Profile (3/4)
Casper Bonde [Thu, 19 Mar 2015 09:01:53 +0000 (10:01 +0100)]
Add support for Bluetooth Sim Access Profile (3/4)

Server side of the Sim Access Profile. Enables a Bluetooth device
to take over control of the SIM. This is usefull in cars where the
internal antenna in the phone can have a low signal level.

For this profile to work, the RIL driver must allow for this feature
to be used, and it must provide the API needed. The API is based on
protoBuf.

This change includes some SAP test cases.

Change-Id: Ia46493383efed6b8a89ca270bdafa60fc1a150c1

9 years agoBluetooth LE background operation mode (1/2)
Nitin Arora [Wed, 11 Mar 2015 22:45:26 +0000 (15:45 -0700)]
Bluetooth LE background operation mode (1/2)

Changes to BluetoothAdapter state machine for handling new
states BLE_STATE_ON and intermediate states BLE_TURNING_ON
and BLE_TURNING_OFF. Also includes the actions required
while migrating in and out of these states including
start and stop of GATT services and other profiles.

Change-Id: I08d6ff05c2cefe559d5bb5789a1a488afefbe544

9 years agoam bbb4110..165d7fa from mirror-m-wireless-internal-release
Vinit Deshpande [Tue, 14 Apr 2015 23:51:47 +0000 (16:51 -0700)]
am bbb4110..165d7fa from mirror-m-wireless-internal-release

165d7fa MAP: Errata service release 8 changes
5a60e47 Update to Bluetooth MAP 1.2 (server)
0dcecb2 MAP: fix exception when Email in SMS list request
a8873ca Merge "Handle response to AT+NREC command" into m-wireless-dev
345f1ee Add UUIDs to SDP JNI
d1fadc3 Handle response to AT+NREC command

Change-Id: If24e414fe3fd0c2f47147f2535296b92e8066d76

9 years agoMAP: Change MMS to use new API to send message
kschulz [Fri, 6 Mar 2015 12:54:49 +0000 (13:54 +0100)]
MAP: Change MMS to use new API to send message

Removed the send MMS message intent, and replaced by
SmsManager.sendMultimediaMessage()

Change-Id: I226b7b0e8fdb101ab160563937ae6e7a1a13be41
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoMerge "Declare that Bluetooth app does not use cleartext network traffic."
Alex Klyubin [Tue, 14 Apr 2015 20:53:10 +0000 (20:53 +0000)]
Merge "Declare that Bluetooth app does not use cleartext network traffic."

9 years agoAdd contact sharing policy checking
Ricky Wai [Fri, 27 Mar 2015 17:12:06 +0000 (17:12 +0000)]
Add contact sharing policy checking

Bug: 19990833

Change-Id: Ic9344cc78679930a388272165ee8db0ec56cbced