diff options
author | Martijn Coenen <maco@google.com> | 2012-07-11 12:24:11 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-08-01 12:34:55 -0700 |
commit | 721d01960285314178c9026f4cbca449a5f385a6 (patch) | |
tree | 42d0c4cd8840e03d43943fb68de80c5ed5be5c95 /src/com/android/nfc/handover/BluetoothOppHandover.java | |
parent | 4b33b45ed7880968f9836213e2395dbd55e17b31 (diff) | |
download | packages_apps_nfc-721d01960285314178c9026f4cbca449a5f385a6.zip packages_apps_nfc-721d01960285314178c9026f4cbca449a5f385a6.tar.gz packages_apps_nfc-721d01960285314178c9026f4cbca449a5f385a6.tar.bz2 |
Implement connection handover LLCP service. (DO NOT MERGE)
The Connection Handover specification dictates that we should
exchange Hr/Hs records over a dedicated LLCP service. This adds
the service, and starts using it by default. It will fall back
to the SNEP GET method to remain compatible with Android 4.1
devices. SNEP GET on these devices will return "Not Implemented",
also per the SNEP spec.
Also fixed a bug in endianness of the OOB record.
Bug: 6759842
Change-Id: Ifd360f556bf0e1757eb8bbaadf11efa094aefcf6
Diffstat (limited to 'src/com/android/nfc/handover/BluetoothOppHandover.java')
-rw-r--r-- | src/com/android/nfc/handover/BluetoothOppHandover.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/com/android/nfc/handover/BluetoothOppHandover.java b/src/com/android/nfc/handover/BluetoothOppHandover.java index ece6a7b..ceb3c62 100644 --- a/src/com/android/nfc/handover/BluetoothOppHandover.java +++ b/src/com/android/nfc/handover/BluetoothOppHandover.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.android.nfc.handover; import android.bluetooth.BluetoothAdapter; @@ -33,7 +49,7 @@ public class BluetoothOppHandover implements Handler.Callback { static final int MSG_START_SEND = 0; - static final int REMOTE_BT_ENABLE_DELAY_MS = 3000; + static final int REMOTE_BT_ENABLE_DELAY_MS = 5000; static final String ACTION_HANDOVER_SEND = "android.btopp.intent.action.HANDOVER_SEND"; |