History log of /packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a169df6d977b08b6ad20f38f111665abac44199c 21-Sep-2017 Jack He <siyuanh@google.com> SAP: Initialize mIntentReceiver to null

* When SAP server quits, it uses mIntentReceiver to determin whether it
has be registered or not. However, it won't be null if it is
initialized to an instance of BroadcastReceiver
* This change creates SapServerBroadcastReceiver class and only assign
mIntentReceiver to its instance in the constructor.

Bug: 66230053
Fixes: 66230053
Test: build
Change-Id: I65e587f98ffcc334372c5f8770a499f9ae265358
(cherry picked from commit 7553e937b3769e07e5f189666370211061849b6a)
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
83955a5b052c70a080dac6b185170b3ba65d82e1 16-May-2017 Hemant Gupta <hemantg@codeaurora.org> Settings: Convert notifications to use NotificationChannel (1/2)

Test Setup:
===========
HW DUT: Pixel O
Remote: MecApp (SAP Client)

Usecase:
1) Connect from MecApp.
2) Accept SAP connection on DUT.

Expected Behaviour:
Notification popup for SAP connected should be displayed on UI
which provide option for user to disconnect SAP connection.

Observed Behaviour:
Notification popup for SAP connected is not displayed on UI so user
is not able to initiate disconnection from SAP server.

Root cause:
In Android O, notifications are hidden by default.
This must be changed to use notification channels so that the
priority of the notifications can be updated.

Fix:
Add notification channel before building notification from SAP.

Test: Checked if now notification for SAP connect can be seen in
notification bar when SAP is connected allowing user to disconnect.

Bug: 38331825
Change-Id: I67b0a3fd7f1df857c6288150edbef80d4a953490
(cherry picked from commit c5c434b205948c7bf6bea50fc55521904c896ce6)
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
73a32dfbd2f283341b86385b58ac4f3761c83f7b 22-Mar-2017 Amit Mahajan <amitmahajan@google.com> Remove SAP socket

Test: Basic SAP sanity
Bug: 32020264
Change-Id: I57d34f1cb36e4a63848ebf0dda9795fc75352a37
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
af64b66d0705f8e1f5b7d20a56f8f6997b60093a 13-Feb-2017 Amit Mahajan <amitmahajan@google.com> Exception and death notification handling for ISap.

Test: Basic telephony sanity
Bug: 32020264
Change-Id: I3d710fc59a397fe0054b286d422066f9ff149262
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
549c5a7e95c7934d8d3ab10a8653564e42b0c937 11-Dec-2016 Amit Mahajan <amitmahajan@google.com> Client changes for BT SAP hidl.

Test: Basic SAP sanity.

Bug: 32020264
Change-Id: If001ff221e3240a31cfbb08df11cbf6188ebd07e
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
eb7b90f5b93db1230a5b64caa3d8d05a642e33a6 10-May-2016 Marie Janssen <jamuraa@google.com> Cleanup unused requires in java files

Change-Id: I7b055c1d3d3f6a69e9f49c077853ab45fcad7106
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
987a8cdbdc36548f76ad63fc5ab33f8b3ce2f69a 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Update UI connection and notifications properly

Update connection state to upper layers only when SAP SLC is connected
i.e. status indication is sent to SAP Client.
Also notification to disconnect SAP Server from UI is shown only when SAP
is successfully connected, and not when SapServer object is created.

Change-Id: Iaf40584220b51f6193bed9a54d159cffd32698e9
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
b8984f61f6fd31fd25e37745e8ba505ca287b274 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Handle disconnect request during call ongoing state

Handle disconnect request during call ongoing state properly.
Previously if disconnect was received from SAP client while in
call ongoing state, it was not handled properly, leading to
Server not sending the DISCONNECT response thereby violating
Bluetooth SAP Specification.

Change-Id: I666fab4b4513abfa00df4be5b3a7aab95d5f0331
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
faf199e456dbb987f343c829c603c035df10add7 29-Sep-2015 Hemant Gupta <hemantg@codeaurora.org> SAP: Fix missing connect response when call ongoing at connect

The CALL_ONGOING_STATE was set twice, causing the connect
response not to be sent to the peer device when there was an
ongoing call on DUT. This was violating the SAP Spec.

Bug: 24520367
Change-Id: I290d924870381a82a4abd8b6c42a6d0ebf55652f
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
471e023da5f39d21ebcb1d3fad43a591c15f6be3 28-Aug-2015 Casper Bonde <c.bonde@samsung.com> SAP: Fix missing attribute in disconnect_ind

The internal TEST flag was removing too much code.
To make it easier to run test, and avoid future issues
with removing needed code, the TEST flag is no longer used
to remove code.

This bug was noticed when running the PTS testcases without the
PTS_TEST flag set. It is assumed that this fix will make
TC_SERVER_DCN_BV_02_I work without the PTS flag, but unless PTS
have updated their test case to accept both a gracefull disconnect
and a forced disconnect, TC_SERVER_DCN_BV_03_I will still fail in
a production build. The SAP spec suggest to use a gracefull disconnect
when initiating a disconnect from a server, hence it is not a good
idea to expose a force disconnect option to the used without first
having tried a gracefull disconnect. Hence the PTS test case
implementation is in conflict with the intented use specified in
the SAP specification.

Without this fix a build with PTS_TEST=false will not work as
intented.

PTS_TEST replaced with system property bt.sap.pts. Set it to true
to enable the force disconnect button.

Bug: 23614694
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Change-Id: I776a53d6e786c21000ef62094f9a9948ee5880b8
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
e377aae948e58f974c3af14360d2f6ce09b868aa 28-Aug-2015 Casper Bonde <c.bonde@samsung.com> SAP: Fix logic to skip padding bytes for requests received

As per SAP spec, padding bytes can be 0-3 bytes, but the current code
has incorrect logic, that would lead to calculation of padding bytes
as 4 in case the APDU length was multiple of 4, which would lead to
incorrect parsing logic in SAP Server and can lead to issues of no
response for APDU request from SAP Server as it keeps waiting for
reading more bytes from rfcomm which are not present.

Also check added in code not to send msg to RIL if socket is null to
prevent crash in BT Sap module.

Bug: 23024598
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Change-Id: I24e4a6b850709c9c32b7e0992626a0219dacef03
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
b6791189b3c8be04b521b8520aed006f012304d1 27-Apr-2015 Casper Bonde <c.bonde@samsung.com> SAP: Shorten long lines

Change-Id: I89d5bf6d68b8aba9d9e86e891bfb1b79eb241432
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
a49b4e45faf378e3848c4f6eb468e0a14565aa6c 17-Apr-2015 Casper Bonde <c.bonde@samsung.com> 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>
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
bbb071e6d73df46230ec654e3066a46f6e35a88d 22-Apr-2015 Casper Bonde <c.bonde@samsung.com> 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>
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java
cee0d1b1f13b4401a895be650605fa307e70bdb6 19-Mar-2015 Casper Bonde <c.bonde@samsung.com> 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
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/SapServer.java