summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrint E. Kriebel <bekit@cyngn.com>2014-11-03 18:30:04 -0800
committerBrint E. Kriebel <bekit@cyngn.com>2014-11-03 18:30:04 -0800
commit218a00e09f73b749abfd7c824ce2218fdf88f35c (patch)
tree319f935e4dd480145ed3c8a5c550cff0b2f996a9
parentd82db3b4948bb44e21cb3b16861ea0f62ceb0a6f (diff)
parent2af0e0e6e5d6011292055f50351e296f77ceb07f (diff)
downloadandroid_packages_apps_Bluetooth-218a00e09f73b749abfd7c824ce2218fdf88f35c.tar.gz
android_packages_apps_Bluetooth-218a00e09f73b749abfd7c824ce2218fdf88f35c.tar.bz2
android_packages_apps_Bluetooth-218a00e09f73b749abfd7c824ce2218fdf88f35c.zip
-rw-r--r--jni/com_android_bluetooth_btservice_AdapterService.cpp14
-rw-r--r--res/values-az/cm_strings.xml22
-rw-r--r--res/values-gl/cm_strings.xml22
-rw-r--r--res/values-iw/cm_strings.xml22
-rw-r--r--res/values-ku/cm_strings.xml21
-rw-r--r--res/values-lb/cm_strings.xml22
-rw-r--r--res/values-lb/strings.xml51
-rw-r--r--res/values-lb/strings_pbap.xml1
-rw-r--r--res/values-lt/cm_strings.xml22
-rw-r--r--res/values-lv/cm_strings.xml22
-rw-r--r--res/values-pl/cm_strings.xml22
-rw-r--r--res/values-ug/strings.xml115
-rw-r--r--res/values-ug/strings_pbap.xml15
-rw-r--r--res/values-uk/cm_strings.xml22
-rw-r--r--res/values-zh-rTW/cm_strings.xml22
-rw-r--r--src/com/android/bluetooth/a2dp/A2dpStateMachine.java9
-rw-r--r--src/com/android/bluetooth/btservice/AdapterService.java42
-rw-r--r--src/com/android/bluetooth/btservice/AdapterState.java3
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppManager.java14
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppService.java89
20 files changed, 560 insertions, 12 deletions
diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp
index 6e5e1aa6f..dc6964f9e 100644
--- a/jni/com_android_bluetooth_btservice_AdapterService.cpp
+++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp
@@ -662,6 +662,19 @@ static bool cleanupNative(JNIEnv *env, jobject obj) {
return JNI_TRUE;
}
+static bool ssrcleanupNative(JNIEnv *env, jobject obj) {
+ ALOGV("%s:",__FUNCTION__);
+
+ jboolean result = JNI_FALSE;
+ if (!sBluetoothInterface) return result;
+
+ sBluetoothInterface->ssrcleanup();
+ ALOGI("%s: return from cleanup",__FUNCTION__);
+
+ env->DeleteGlobalRef(sJniCallbacksObj);
+ return JNI_TRUE;
+}
+
static jboolean enableNative(JNIEnv* env, jobject obj) {
ALOGV("%s:",__FUNCTION__);
@@ -1124,6 +1137,7 @@ static JNINativeMethod sMethods[] = {
{"classInitNative", "()V", (void *) classInitNative},
{"initNative", "()Z", (void *) initNative},
{"cleanupNative", "()V", (void*) cleanupNative},
+ {"ssrcleanupNative", "()V", (void*) ssrcleanupNative},
{"enableNative", "()Z", (void*) enableNative},
{"disableNative", "()Z", (void*) disableNative},
{"setAdapterPropertyNative", "(I[B)Z", (void*) setAdapterPropertyNative},
diff --git a/res/values-az/cm_strings.xml b/res/values-az/cm_strings.xml
new file mode 100644
index 000000000..b3d12bde6
--- /dev/null
+++ b/res/values-az/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">Bluetooth paylaşımı: Cihaz boş <xliff:g id="file">%1$s</xliff:g> faylını qəbul etmir</string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-gl/cm_strings.xml b/res/values-gl/cm_strings.xml
new file mode 100644
index 000000000..975b0b2ac
--- /dev/null
+++ b/res/values-gl/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">Bluetooth: rexeitouse o ficheiro baleiro <xliff:g id="file">%1$s</xliff:g></string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-iw/cm_strings.xml b/res/values-iw/cm_strings.xml
new file mode 100644
index 000000000..bc297d79c
--- /dev/null
+++ b/res/values-iw/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">שיתוף Bluetooth: נדחה קובץ עם אורך אפסי <xliff:g id="file"> %1$s </xliff:g></string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-ku/cm_strings.xml b/res/values-ku/cm_strings.xml
new file mode 100644
index 000000000..1ea164de7
--- /dev/null
+++ b/res/values-ku/cm_strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-lb/cm_strings.xml b/res/values-lb/cm_strings.xml
new file mode 100644
index 000000000..db7896134
--- /dev/null
+++ b/res/values-lb/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">Deelen iwwer Bluetooth: Den Empfänger huet den eidele Fichier <xliff:g id="file">%1$s</xliff:g> ofgeleent</string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-lb/strings.xml b/res/values-lb/strings.xml
index c057e4cdc..4628dd407 100644
--- a/res/values-lb/strings.xml
+++ b/res/values-lb/strings.xml
@@ -16,11 +16,17 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="permlab_bluetoothShareManager">Zougrëff op den Download-Manager.</string>
+ <string name="permdesc_bluetoothShareManager">Erlaabt der App op de BluetoothShare-Manager zouzegräifen an e fir Fichiersiwwerdroungen ze notzen.</string>
+ <string name="permlab_bluetoothWhitelist">Bluetooth-Apparat op d\'Zougrëffslëscht setzen.</string>
+ <string name="permdesc_bluetoothWhitelist">Erlaabt der App temporär e Bluetooth-Apparat op d\'wäiss Lëscht ze setzen, sou datt vun deem Apparat e Fichier kann empfaange ginn ouni datt de Benotzer d\'Iwwerdroung bestätege muss.</string>
+ <string name="permlab_handoverStatus">Bluetooth-Broadcasts fir d\'Iwwerdroung empfänken.</string>
+ <string name="permdesc_handoverStatus">Erméiglecht den Empfang vu Statusinformatioune fir d\'Iwwerdroung per Bluetooth.</string>
<string name="bt_share_picker_label">Bluetooth</string>
<string name="unknown_device">Onbekannten Apparat</string>
<string name="unknownNumber">Onbekannt</string>
<string name="airplane_error_title">Fligermodus</string>
<string name="airplane_error_msg">Du kanns Bluetooth net am Fligermodus benotzen.</string>
+ <string name="bt_enable_line1">Fir Bluetooth-Servicer ze benotze muss du fir d\'éischt Bluetooth uschalten.</string>
<string name="bt_enable_line2">Bluetooth elo uschalten?</string>
<string name="bt_enable_cancel">Ofbriechen</string>
<string name="bt_enable_ok">Uschalten</string>
@@ -29,36 +35,81 @@
<string name="incoming_file_confirm_cancel">Refuséieren</string>
<string name="incoming_file_confirm_ok">Acceptéieren</string>
<string name="incoming_file_confirm_timeout_ok">OK</string>
+ <string name="incoming_file_confirm_timeout_content">D\'Zäit ass beim Empfänke vun engem Fichier vum \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 ofgelaf</string>
+ <string name="incoming_file_confirm_Notification_title">Bluetooth-Fräigab: Erakommende Fichier</string>
<string name="incoming_file_confirm_Notification_caption">Wëlls du dëse Fichier emfänken?</string>
+ <string name="incoming_file_toast_msg">Et kënnt e Fichier vun engem aneren Apparat eran.
+ Bestäteg datt s du dëse Fichier empfänke wëlls.</string>
<string name="notification_receiving">Bluetooth-Fräigab: <xliff:g id="file">%1$s</xliff:g> gëtt emfaangen</string>
+ <string name="notification_received">Bluetooth-Fräigab: <xliff:g id="file">%1$s</xliff:g> emfaangen</string>
+ <string name="notification_received_fail">Bluetooth-Fräigab: Fichier <xliff:g id="file">%1$s</xliff:g> net empfaangen</string>
+ <string name="notification_sending">Bluetooth-Fräigab: <xliff:g id="file">%1$s</xliff:g> gëtt geschéckt</string>
+ <string name="notification_sent">Bluetooth-Fräigab: <xliff:g id="file">%1$s</xliff:g> geschéckt</string>
<string name="notification_sent_complete">100% ofgeschloss</string>
+ <string name="notification_sent_fail">Bluetooth-Fräigab: Fichier <xliff:g id="file">%1$s</xliff:g> net geschéckt</string>
<string name="download_title">Fichiersiwwerdroung</string>
+ <string name="download_line1">Vum: \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022</string>
<string name="download_line2">Fichier: <xliff:g id="file">%1$s</xliff:g></string>
+ <string name="download_line3">Fichiersgréisst: <xliff:g id="size">%1$s</xliff:g></string>
+ <string name="download_line5">Fichier gëtt emfaangen\u2026</string>
<string name="download_cancel">Stoppen</string>
<string name="download_ok">Verstoppen</string>
+ <string name="download_fail_line1">Fichier net empfaangen</string>
<string name="download_fail_line2">Fichier: <xliff:g id="file">%1$s</xliff:g></string>
<string name="download_fail_line3">Grond: <xliff:g id="reason">%1$s</xliff:g></string>
<string name="download_fail_ok">OK</string>
<string name="download_succ_line5">Fichier empfaangen</string>
<string name="download_succ_ok">Opmaachen</string>
+ <string name="upload_line1">Un: \u0022<xliff:g id="recipient">%1$s</xliff:g>\u0022</string>
+ <string name="upload_line3">Fichierstyp: <xliff:g id="type">%1$s</xliff:g> (<xliff:g id="size">%2$s</xliff:g>)</string>
+ <string name="upload_line5">Fichier gëtt geschéckt\u2026</string>
+ <string name="upload_succ_line5">Fichier geschéckt</string>
<string name="upload_succ_ok">OK</string>
+ <string name="upload_fail_line1">De Fichier gouf net un den/d\' \u0022<xliff:g id="recipient">%1$s</xliff:g>\u0022 geschéckt.</string>
<string name="upload_fail_line1_2">Fichier: <xliff:g id="file">%1$s</xliff:g></string>
<string name="upload_fail_ok">Probéier nees</string>
<string name="upload_fail_cancel">Zoumaachen</string>
<string name="bt_error_btn_ok">OK</string>
<string name="unknown_file">Onbekannte Fichier</string>
+ <string name="unknown_file_desc">Et gëtt keng App déi mat dësem Typ vu Fichier kann ëmgoen.\n</string>
<string name="not_exist_file">Kee Fichier</string>
<string name="not_exist_file_desc">De Fichier existéiert net. \n</string>
<string name="enabling_progress_title">Waart w.e.g.\u2026</string>
<string name="enabling_progress_content">Bluetooth gëtt ugemaach\u2026</string>
+ <string name="bt_toast_1">De Fichier gëtt empfaangen. De Fortschrëtt gëtt am Notifikatiouns-Panneau ugewisen.</string>
<string name="bt_toast_2">De Fichier kann net empfaange ginn.</string>
+ <string name="bt_toast_3">D\'Empfänke vum Fichier vum \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 gouf gestoppt</string>
+ <string name="bt_toast_4">Fichier gëtt un den Apparat \u0022<xliff:g id="recipient">%1$s</xliff:g>\u0022 geschéckt</string>
+ <string name="bt_toast_5"><xliff:g id="number">%1$s</xliff:g> Fichiere ginn un den Apparat \u0022<xliff:g id="recipient">%2$s</xliff:g>\u0022 geschéckt</string>
+ <string name="bt_toast_6">D\'Schécke vum Fichier un den Apparat \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 gouf gestoppt</string>
+ <string name="bt_sm_2_1" product="nosdcard">Et ass net genuch Plaz um USB-Späicher fir de Fichier vum \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 ze späicheren</string>
+ <string name="bt_sm_2_1" product="default">Et ass net genuch Späicherplaz op der SD-Kaart fir de Fichier vum \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 ze späicheren</string>
+ <string name="bt_sm_2_2">Néideg Plaz: <xliff:g id="size">%1$s</xliff:g></string>
+ <string name="ErrorTooManyRequests">Et ginn ze vill Ufroe beaarbecht. Probéier méi spéit nees.</string>
+ <string name="status_pending">Iwwerdroung vu Fichieren nach net gestart.</string>
+ <string name="status_running">Iwwerdroung vu Fichiere leeft.</string>
+ <string name="status_success">Iwwerdroung vu Fichieren erfollegräich ofgeschloss.</string>
<string name="status_not_accept">Inhalt net ënnerstëtzt.</string>
+ <string name="status_forbidden">Iwwerdroung duerch den Zilapparat verbueden.</string>
<string name="status_canceled">Iwwerdroung duerch de Benotzer ofgebrach.</string>
<string name="status_file_error">Späicherproblem.</string>
<string name="status_no_sd_card" product="nosdcard">Keen USB-Späicher.</string>
+ <string name="status_no_sd_card" product="default">Keng SD-Kaart. Schléiss eng SD-Kaart un, fir déi transferéiert Fichieren ze späicheren.</string>
+ <string name="status_connection_error">Connectioun feelgeschloen.</string>
+ <string name="status_protocol_error">D\'Ufro kann net korrekt behandelt ginn.</string>
<string name="status_unknown_error">Onbekannte Feeler.</string>
+ <string name="btopp_live_folder">Bluetooth empfaangen</string>
<string name="download_success"> <xliff:g id="file_size">%1$s</xliff:g> vollstänneg empfaangen.</string>
<string name="upload_success"> <xliff:g id="file_size">%1$s</xliff:g> vollstänneg geschéckt.</string>
+ <string name="inbound_history_title">Erakommend Iwwerdroungen</string>
+ <string name="outbound_history_title">Erausgoend Iwwerdroungen</string>
+ <string name="no_transfers">Den Iwwerdroungshistorique ass eidel.</string>
+ <string name="transfer_clear_dlg_msg">All d\'Elementer ginn aus der Lëscht erausgeholl.</string>
+ <string name="outbound_noti_title">Bluetooth-Fräigab: Geschéckt Fichieren</string>
+ <string name="inbound_noti_title">Bluetooth-Fräigab: Emfaange Fichieren</string>
+ <string name="noti_caption"> <xliff:g id="successful_number">%1$s</xliff:g> erfollegräich, <xliff:g id="unsuccessful_number">%2$s</xliff:g> feelgeschloen.</string>
+ <string name="transfer_menu_clear_all">Lëscht eidel maachen</string>
<string name="transfer_menu_open">Opmaachen</string>
+ <string name="transfer_menu_clear">Aus der Lëscht ewechhuelen</string>
<string name="transfer_clear_dlg_title">Eidel maachen</string>
</resources>
diff --git a/res/values-lb/strings_pbap.xml b/res/values-lb/strings_pbap.xml
index 6a71063c5..545d7831d 100644
--- a/res/values-lb/strings_pbap.xml
+++ b/res/values-lb/strings_pbap.xml
@@ -8,6 +8,7 @@
<string name="auth_notif_ticker">Obex-Authentifizéierungs-Ufro</string>
<string name="auth_notif_title">Sëtzungsschlëssel</string>
<string name="auth_notif_message">Tipp de Sëtzungsschlëssel fir %1$s an</string>
+ <string name="defaultname">Fräispriechanlag</string>
<string name="unknownName">Onbekannten Numm</string>
<string name="localPhoneName">Mäin Numm</string>
<string name="defaultnumber">000000</string>
diff --git a/res/values-lt/cm_strings.xml b/res/values-lt/cm_strings.xml
new file mode 100644
index 000000000..fe2089f85
--- /dev/null
+++ b/res/values-lt/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">„Bluetooth“ bendrinimas: gavėjas atmetė tuščią failą <xliff:g id="file">%1$s</xliff:g></string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-lv/cm_strings.xml b/res/values-lv/cm_strings.xml
new file mode 100644
index 000000000..cb75a9937
--- /dev/null
+++ b/res/values-lv/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">Bluetooth kopīgošana: attālinātā vieta noraidīja nulles garuma failu <xliff:g id="file">%1$s</xliff:g></string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-pl/cm_strings.xml b/res/values-pl/cm_strings.xml
new file mode 100644
index 000000000..36b1d4135
--- /dev/null
+++ b/res/values-pl/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">Udostępnianie Bluetooth: Odrzucono plik o zerowej długości <xliff:g id="file">%1$s</xliff:g></string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-ug/strings.xml b/res/values-ug/strings.xml
new file mode 100644
index 000000000..84928c251
--- /dev/null
+++ b/res/values-ug/strings.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!-- Copyright (C) 2007 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="permlab_bluetoothShareManager">چۈشۈرۈش باشقۇرغۇچنى زىيارەت.</string>
+ <string name="permdesc_bluetoothShareManager">ئەپنىڭ كۆكچىش ھەمبەھىر باشقۇرغۇچنى زىيارەت قىلىشقا يول قويىدۇ ھەمدە شۇ باشقۇرغۇچنى ئىشلىتىپ ھۆججەت يوللايدۇ.</string>
+ <string name="permlab_bluetoothWhitelist">ئاق تىزىمدىكى كۆكچىش ئۈسكۈنە زىيارىتى.</string>
+ <string name="permdesc_bluetoothWhitelist">كۆكچىش ئۈسكۈنىسىنى زىيارەت ھوقۇقى ئاق تىزىملىكىگە كىرگۈزۈشكە يول قويىدۇ، شۇ ئارقىلىق ئىشلەتكۈچىنىڭ جەزملىشى بولمىغان ئەھۋالدا ھۆججەتنى بۇ ئۈسكۈنىگە يوللايدۇ.</string>
+ <string name="permlab_handoverStatus">كۆكچىش كىرىشتۈرۈپ ئۇزاتقان تارقىتىشنى قوبۇل قىلىدۇ.</string>
+ <string name="permdesc_handoverStatus">كۆكچىش ئارقىلىق كىرىشتۈرۈپ ئۇزىتىش ھالەت ئۇچۇرىنى قوبۇل قىلىشقا يول قويىدۇ.</string>
+ <string name="bt_share_picker_label">كۆكچىش</string>
+ <string name="unknown_device">يوچۇن ئۈسكۈنە</string>
+ <string name="unknownNumber">يوچۇن</string>
+ <string name="airplane_error_title">ئايروپىلان ھالىتى</string>
+ <string name="airplane_error_msg">ئايروپىلان ھالىتىدە كۆكچىش ئىشلىتەلمەيسىز.</string>
+ <string name="bt_enable_line1">كۆكچىش مۇلازىمىتى ئىشلىتىشتە ئالدى بىلەن كۆكچىشنى ئېچىشىڭىز لازىم.</string>
+ <string name="bt_enable_line2">ھازىر كۆكچىشنى ئاچامدۇ؟</string>
+ <string name="bt_enable_cancel">ۋاز كەچ</string>
+ <string name="bt_enable_ok">ئاچ</string>
+ <string name="incoming_file_confirm_title">ھۆججەت يوللاش</string>
+ <string name="incoming_file_confirm_content">\"<xliff:g id="SENDER">%1$s</xliff:g>" سىزگە <xliff:g id="FILE">%2$s</xliff:g> (<xliff:g id="SIZE">%3$s</xliff:g>) نى يوللىماقچى. \n\n ھۆججەتنى قوبۇل قىلامسىز؟</string>
+ <string name="incoming_file_confirm_cancel">قوشۇلما</string>
+ <string name="incoming_file_confirm_ok">قوشۇل</string>
+ <string name="incoming_file_confirm_timeout_ok">جەزملە</string>
+ <string name="incoming_file_confirm_timeout_content">\"<xliff:g id="SENDER">%1$s</xliff:g>\" دىن كەلگەن ھۆججەتنى قوبۇل قىلىۋاتقاندا ۋاقىت ھالقىدى</string>
+ <string name="incoming_file_confirm_Notification_title">كۆكچىش ھەمبەھىر: ئەكىرگەن ھۆججەت</string>
+ <string name="incoming_file_confirm_Notification_caption">بۇ ھۆججەتنى قوبۇل قىلامسىز؟</string>
+ <string name="incoming_file_toast_msg">كەلگەن ھۆججەت باشقا بىر ئۈسكۈنىدىن كەلگەن. بۇ ھۆججەتنى قوبۇل قىلىشنى جەزملەڭ.</string>
+ <string name="notification_receiving">كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> قوبۇللاۋاتىدۇ</string>
+ <string name="notification_received">كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> قوبۇللىدى</string>
+ <string name="notification_received_fail">كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> ھۆججەتنى قوبۇللىمىدى</string>
+ <string name="notification_sending">كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> يوللاۋاتىدۇ</string>
+ <string name="notification_sent">كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> يوللاندى</string>
+ <string name="notification_sent_complete">100% تامام</string>
+ <string name="notification_sent_fail">كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> ھۆججەت يوللانمىدى</string>
+ <string name="download_title">ھۆججەت يوللاش</string>
+ <string name="download_line1">ئورنى: \"<xliff:g id="SENDER">%1$s</xliff:g></string>
+ <string name="download_line2">ھۆججەت: <xliff:g id="FILE">%1$s</xliff:g></string>
+ <string name="download_line3">ھۆججەت چوڭلۇقى: <xliff:g id="SIZE">%1$s</xliff:g></string>
+ <string name="download_line5">ھۆججەت قوبۇللاۋاتىدۇ…</string>
+ <string name="download_cancel">توختا</string>
+ <string name="download_ok">يوشۇر</string>
+ <string name="download_fail_line1">ھۆججەت قوبۇللانمىدى</string>
+ <string name="download_fail_line2">ھۆججەت: <xliff:g id="FILE">%1$s</xliff:g></string>
+ <string name="download_fail_line3">سەۋەب: <xliff:g id="REASON">%1$s</xliff:g></string>
+ <string name="download_fail_ok">جەزملە</string>
+ <string name="download_succ_line5">ھۆججەت قوبۇللاندى</string>
+ <string name="download_succ_ok">ئاچ</string>
+ <string name="upload_line1">ئورنى: \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\"</string>
+ <string name="upload_line3">ھۆججەت تىپى: <xliff:g id="TYPE">%1$s</xliff:g> (<xliff:g id="SIZE">%2$s</xliff:g>)</string>
+ <string name="upload_line5">ھۆججەت يوللاۋاتىدۇ…</string>
+ <string name="upload_succ_line5">ھۆججەت يوللاندى</string>
+ <string name="upload_succ_ok">جەزملە</string>
+ <string name="upload_fail_line1">بۇ ھۆججەتنى \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\" غا يوللىيالمىدى.</string>
+ <string name="upload_fail_line1_2">ھۆججەت: <xliff:g id="FILE">%1$s</xliff:g></string>
+ <string name="upload_fail_ok">قايتا سىنا</string>
+ <string name="upload_fail_cancel">ياپ</string>
+ <string name="bt_error_btn_ok">جەزملە</string>
+ <string name="unknown_file">يوچۇن ھۆججەت</string>
+ <string name="unknown_file_desc">بۇ تىپتىكى ھۆججەتنى بىر تەرەپ قىلىدىغان ئەپ تېپىلمىدى. \n</string>
+ <string name="not_exist_file"> ھۆججەت يوق</string>
+ <string name="not_exist_file_desc">ھۆججەت مەۋجۇت ئەمەس. \n</string>
+ <string name="enabling_progress_title">سەل كۈتۈڭ…</string>
+ <string name="enabling_progress_content">كۆكچىشنى ئېچىۋاتىدۇ…</string>
+ <string name="bt_toast_1">ھۆججەت قوبۇل قىلماقچى. ئۇقتۇرۇش تاختىسىدىن جەريانىنى تەكشۈرۈڭ.</string>
+ <string name="bt_toast_2">بۇ ھۆججەتنى قوبۇل قىلالمايدۇ.</string>
+ <string name="bt_toast_3">\"<xliff:g id="SENDER">%1$s</xliff:g>\" دىن ھۆججەت قوبۇللاشنى توختاتتى</string>
+ <string name="bt_toast_4">\"<xliff:g id="RECIPIENT">%1$s</xliff:g>\" غا ھۆججەت يوللاۋاتىدۇ</string>
+ <string name="bt_toast_5"><xliff:g id="NUMBER">%1$s</xliff:g> ھۆججەتنى "<xliff:g id="RECIPIENT">%2$s</xliff:g>\" غا يوللاۋاتىدۇ</string>
+ <string name="bt_toast_6">\"<xliff:g id="RECIPIENT">%1$s</xliff:g>\" غا ھۆججەت يوللاش توختىدى</string>
+ <string name="bt_sm_2_1" product="nosdcard">بۇ USB ساقلىغۇچتا \"<xliff:g id="SENDER">%1$s</xliff:g>\" دىن كەلگەن ھۆججەتنى ساقلاشقا يېتەرلىك بوشلۇق يوق</string>
+ <string name="bt_sm_2_1" product="default">SD كارتادا \"<xliff:g id="SENDER">%1$s</xliff:g>\" دىن كەلگەن ھۆججەتنى ساقلاشقا يېتەرلىك بوشلۇق يوق</string>
+ <string name="bt_sm_2_2">كېتەرلىك بوشلۇق: <xliff:g id="SIZE">%1$s</xliff:g></string>
+ <string name="ErrorTooManyRequests">بىر تەرەپ قىلىۋاتقان ئىلتىماس بەك كۆپ. سەل تۇرۇپ قايتا سىناڭ.</string>
+ <string name="status_pending">ھۆججەت يوللاش باشلانمىدى</string>
+ <string name="status_running">ھۆججەت يوللىنىۋاتىدۇ.</string>
+ <string name="status_success">ھۆججەت يوللاش مۇۋەپپەقىيەتلىك تاماملاندى.</string>
+ <string name="status_not_accept">مەزمۇننى قوللىمايدۇ.</string>
+ <string name="status_forbidden">نىشان ئۈسكۈنە يوللاشنى چەكلەيدۇ.</string>
+ <string name="status_canceled">ئىشلەتكۈچى يوللاشتىن ۋاز كەچتى.</string>
+ <string name="status_file_error">ساقلاش مەسىلىسى</string>
+ <string name="status_no_sd_card" product="nosdcard">USB ساقلىغۇچ يوق.</string>
+ <string name="status_no_sd_card" product="default">SD كارتا يوق. يوللىغان ھۆججەتنى ساقلايدىغان SD كارتىنى قىستۇرۇڭ.</string>
+ <string name="status_connection_error">مۇۋەپپەقىيەتلىك باغلىنالمىدى.</string>
+ <string name="status_protocol_error">ئىلتىماسنى توغرا بىر تەرەپ قىلالمايدۇ.</string>
+ <string name="status_unknown_error">يوچۇن خاتالىق.</string>
+ <string name="btopp_live_folder">كۆكچىش قوبۇللىدى</string>
+ <string name="download_success"><xliff:g id="FILE_SIZE">%1$s</xliff:g> قوبۇللاش تاماملاندى.</string>
+ <string name="upload_success"><xliff:g id="FILE_SIZE">%1$s</xliff:g> يوللاش تاماملاندى.</string>
+ <string name="inbound_history_title">يوللاشنىڭ كىرگەن ئىزلىرى</string>
+ <string name="outbound_history_title">يوللاشنىڭ چىققان ئىزلىرى</string>
+ <string name="no_transfers">توركۆرگۈ تارىخ خاتىرىسى بوش.</string>
+ <string name="transfer_clear_dlg_msg">ھەممە تۈرلەر تىزىملىكتىن ئۆچۈرۈلىدۇ.</string>
+ <string name="outbound_noti_title">كۆكچىش ھەمبەھىر: يوللانغان ھۆججەتلەر</string>
+ <string name="inbound_noti_title">كۆكچىش ھەمبەھىر: قوبۇللىغان ھۆججەتلەر</string>
+ <string name="noti_caption"><xliff:g id="SUCCESSFUL_NUMBER_0">%1$s</xliff:g> مۇۋەپپەقىيەتلىك، <xliff:g id="UNSUCCESSFUL_NUMBER">%2$s</xliff:g> مەغلۇپ بولدى.</string>
+ <string name="transfer_menu_clear_all">تىزىملىكنى تازىلا</string>
+ <string name="transfer_menu_open">ئاچ</string>
+ <string name="transfer_menu_clear">تىزىملىكتىن تازىلا</string>
+ <string name="transfer_clear_dlg_title">تازىلا</string>
+ <string name="bluetooth_share_file_name" translate="false">bluetooth_content_share</string>
+</resources>
diff --git a/res/values-ug/strings_pbap.xml b/res/values-ug/strings_pbap.xml
new file mode 100644
index 000000000..65a7d471e
--- /dev/null
+++ b/res/values-ug/strings_pbap.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="pbap_session_key_dialog_title">%1$s سۆزلىشىش ئاچقۇچىنى كىرگۈزۈڭ</string>
+ <string name="pbap_session_key_dialog_header">كۆكچىش سۆزلىشىش ئاچقۇچى زۆرۈر</string>
+ <string name="pbap_acceptance_timeout_message">%1$s نىڭ بىلەن بولغان باغلىنىشقا قوشۇلۇش ۋاقىت ھالقىدى</string>
+ <string name="pbap_authentication_timeout_message">%1$s سۆزلىشىش ئاچقۇچىنى كىرگۈزۈشتە ۋاقىت ھالقىدى</string>
+ <string name="auth_notif_ticker">Obex سالاھىيەت دەلىللەش ئىلتىماسى</string>
+ <string name="auth_notif_title">سۆزلىشىش ئاچقۇچى</string>
+ <string name="auth_notif_message">%1$s سۆزلىشىش ئاچقۇچىنى كىرگۈزۈڭ</string>
+ <string name="defaultname">ماشىنا يۈرۈشلۈكى</string>
+ <string name="unknownName">يوچۇن ئات</string>
+ <string name="localPhoneName">ئاتىم</string>
+ <string name="defaultnumber">000000</string>
+</resources>
diff --git a/res/values-uk/cm_strings.xml b/res/values-uk/cm_strings.xml
new file mode 100644
index 000000000..1f6ca49d1
--- /dev/null
+++ b/res/values-uk/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">Надсилання по Bluetooth: пристрій не приймає файл нульової довжини <xliff:g id="file">%1$s</xliff:g></string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/res/values-zh-rTW/cm_strings.xml b/res/values-zh-rTW/cm_strings.xml
new file mode 100644
index 000000000..a43c23bff
--- /dev/null
+++ b/res/values-zh-rTW/cm_strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+ Copyright (C) 2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="empty_file_notification_sent">藍芽分享:遠端拒絕了長度為零的檔案 <xliff:g id="file">%1$s</xliff:g></string>
+ <string name="format_progress_text">%1$d%%</string>
+</resources>
diff --git a/src/com/android/bluetooth/a2dp/A2dpStateMachine.java b/src/com/android/bluetooth/a2dp/A2dpStateMachine.java
index 7648acd90..dd70eb19b 100644
--- a/src/com/android/bluetooth/a2dp/A2dpStateMachine.java
+++ b/src/com/android/bluetooth/a2dp/A2dpStateMachine.java
@@ -188,6 +188,8 @@ final class A2dpStateMachine extends StateMachine {
@Override
public void enter() {
log("Enter Disconnected: " + getCurrentMessage().what);
+ // Remove Timeout msg when moved to stable state
+ removeMessages(CONNECT_TIMEOUT);
}
@Override
@@ -320,6 +322,7 @@ final class A2dpStateMachine extends StateMachine {
deferMessage(message);
break;
case CONNECT_TIMEOUT:
+ disconnectA2dpNative(getByteAddress(mTargetDevice));
onConnectionStateChanged(CONNECTION_STATE_DISCONNECTED,
getByteAddress(mTargetDevice));
break;
@@ -342,7 +345,6 @@ final class A2dpStateMachine extends StateMachine {
log("Stack Event: " + event.type);
switch (event.type) {
case EVENT_TYPE_CONNECTION_STATE_CHANGED:
- removeMessages(CONNECT_TIMEOUT);
processConnectionEvent(event.valueInt, event.device);
break;
default:
@@ -509,6 +511,7 @@ final class A2dpStateMachine extends StateMachine {
@Override
public void enter() {
log("Enter Connected: " + getCurrentMessage().what);
+ removeMessages(CONNECT_TIMEOUT);
// Upon connected, the audio starts out as stopped
broadcastAudioState(mCurrentDevice, BluetoothA2dp.STATE_NOT_PLAYING,
BluetoothA2dp.STATE_PLAYING);
@@ -663,6 +666,7 @@ final class A2dpStateMachine extends StateMachine {
}
break;
case AUDIO_STATE_STOPPED:
+ case AUDIO_STATE_REMOTE_SUSPEND:
if (mPlayingA2dpDevice != null) {
mPlayingA2dpDevice = null;
mService.setAvrcpAudioState(BluetoothA2dp.STATE_NOT_PLAYING);
@@ -722,7 +726,8 @@ final class A2dpStateMachine extends StateMachine {
List<BluetoothDevice> getConnectedDevices() {
List<BluetoothDevice> devices = new ArrayList<BluetoothDevice>();
synchronized(this) {
- if (getCurrentState() == mConnected) {
+ /* If connected and mCurrentDevice is not null*/
+ if ((getCurrentState() == mConnected) && (mCurrentDevice != null)) {
devices.add(mCurrentDevice);
}
}
diff --git a/src/com/android/bluetooth/btservice/AdapterService.java b/src/com/android/bluetooth/btservice/AdapterService.java
index 2bb78bcf5..8e7decc2a 100644
--- a/src/com/android/bluetooth/btservice/AdapterService.java
+++ b/src/com/android/bluetooth/btservice/AdapterService.java
@@ -27,6 +27,7 @@ import android.app.Service;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
+import android.bluetooth.BluetoothUuid;
import android.bluetooth.IBluetooth;
import android.bluetooth.IBluetoothCallback;
import android.bluetooth.IBluetoothManager;
@@ -78,6 +79,7 @@ public class AdapterService extends Service {
private static final String TAG = "BluetoothAdapterService";
private static final boolean DBG = true;
private static final boolean TRACE_REF = true;
+ private static final String delayConnectTimeoutDevice[] = {"00:23:3D"}; // volkswagen carkit
//For Debugging only
private static int sRefCount=0;
@@ -89,6 +91,10 @@ public class AdapterService extends Service {
public static final int PROFILE_CONN_CONNECTED = 1;
public static final int PROFILE_CONN_REJECTED = 2;
+ static final ParcelUuid[] A2DP_SOURCE_SINK_UUIDS = {
+ BluetoothUuid.AudioSource,
+ BluetoothUuid.AudioSink
+ };
static final String BLUETOOTH_ADMIN_PERM =
android.Manifest.permission.BLUETOOTH_ADMIN;
static final String BLUETOOTH_PERM = android.Manifest.permission.BLUETOOTH;
@@ -414,12 +420,13 @@ public class AdapterService extends Service {
if (DBG)debugLog("cleanup() done");
}
- private static final int MESSAGE_PROFILE_SERVICE_STATE_CHANGED =1;
- private static final int MESSAGE_PROFILE_CONNECTION_STATE_CHANGED=20;
+ private static final int MESSAGE_PROFILE_SERVICE_STATE_CHANGED = 1;
+ private static final int MESSAGE_PROFILE_CONNECTION_STATE_CHANGED = 20;
private static final int MESSAGE_CONNECT_OTHER_PROFILES = 30;
- private static final int CONNECT_OTHER_PROFILES_TIMEOUT= 6000;
+ private static final int CONNECT_OTHER_PROFILES_TIMEOUT = 6000;
+ private static final int CONNECT_OTHER_PROFILES_TIMEOUT_DEYALED = 10000;
private static final int MESSAGE_AUTO_CONNECT_PROFILES = 50;
- private static final int AUTO_CONNECT_PROFILES_TIMEOUT= 500;
+ private static final int AUTO_CONNECT_PROFILES_TIMEOUT = 500;
private final Handler mHandler = new Handler() {
@Override
@@ -488,6 +495,7 @@ public class AdapterService extends Service {
Intent intent = new Intent(this,services[i]);
intent.putExtra(EXTRA_ACTION,ACTION_SERVICE_STATE_CHANGED);
intent.putExtra(BluetoothAdapter.EXTRA_STATE,state);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
startService(intent);
}
}
@@ -1218,12 +1226,31 @@ public class AdapterService extends Service {
}
public void connectOtherProfile(BluetoothDevice device, int firstProfileStatus){
- if ((mHandler.hasMessages(MESSAGE_CONNECT_OTHER_PROFILES) == false) &&
- (isQuietModeEnabled()== false)){
+ String deviceAddress = device.getAddress();
+ boolean isConnectionTimeoutDelayed = false;
+
+ for (int i = 0; i < delayConnectTimeoutDevice.length;i++) {
+ if (deviceAddress.indexOf(delayConnectTimeoutDevice[i]) == 0) {
+ isConnectionTimeoutDelayed = true;
+ }
+ }
+ if (mHandler.hasMessages(MESSAGE_CONNECT_OTHER_PROFILES) == false) {
+ ParcelUuid[] featureUuids = device.getUuids();
+ // Some Carkits disconnect just after pairing,Initiate SDP for missing UUID's support
+ if ((!(BluetoothUuid.containsAnyUuid(featureUuids, A2DP_SOURCE_SINK_UUIDS))) ||
+ (!(BluetoothUuid.isUuidPresent(featureUuids, BluetoothUuid.Handsfree)))) {
+ Log.v(TAG,"Initiate SDP for Missing UUID's support in remote");
+ device.fetchUuidsWithSdp();
+ }
Message m = mHandler.obtainMessage(MESSAGE_CONNECT_OTHER_PROFILES);
m.obj = device;
m.arg1 = (int)firstProfileStatus;
- mHandler.sendMessageDelayed(m,CONNECT_OTHER_PROFILES_TIMEOUT);
+ if (isConnectionTimeoutDelayed) {
+ mHandler.sendMessageDelayed(m,CONNECT_OTHER_PROFILES_TIMEOUT_DEYALED);
+ }
+ else {
+ mHandler.sendMessageDelayed(m,CONNECT_OTHER_PROFILES_TIMEOUT);
+ }
}
}
@@ -1556,6 +1583,7 @@ public class AdapterService extends Service {
private native static void classInitNative();
private native boolean initNative();
private native void cleanupNative();
+ /*package*/ native void ssrcleanupNative();
/*package*/ native boolean enableNative();
/*package*/ native boolean disableNative();
/*package*/ native boolean setAdapterPropertyNative(int type, byte[] val);
diff --git a/src/com/android/bluetooth/btservice/AdapterState.java b/src/com/android/bluetooth/btservice/AdapterState.java
index 585f5ae86..a0ec83865 100644
--- a/src/com/android/bluetooth/btservice/AdapterState.java
+++ b/src/com/android/bluetooth/btservice/AdapterState.java
@@ -342,11 +342,14 @@ final class AdapterState extends StateMachine {
mPendingCommandState.setTurningOff(false);
transitionTo(mOffState);
notifyAdapterStateChange(BluetoothAdapter.STATE_OFF);
+ errorLog("STOP_TIMEOUT:Killing the process to force a restart as part cleanup");
+ android.os.Process.killProcess(android.os.Process.myPid());
break;
case DISABLE_TIMEOUT:
if (DBG) Log.d(TAG,"CURRENT_STATE=PENDING, MESSAGE = DISABLE_TIMEOUT, isTurningOn=" + isTurningOn + ", isTurningOff=" + isTurningOff);
errorLog("Error disabling Bluetooth");
mPendingCommandState.setTurningOff(false);
+ adapterService.ssrcleanupNative();
transitionTo(mOffState);
notifyAdapterStateChange(BluetoothAdapter.STATE_OFF);
errorLog("Killing the process to force a restart as part cleanup");
diff --git a/src/com/android/bluetooth/opp/BluetoothOppManager.java b/src/com/android/bluetooth/opp/BluetoothOppManager.java
index 849abf36a..b9c0a8a60 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppManager.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppManager.java
@@ -77,6 +77,8 @@ public class BluetoothOppManager {
private String mUriOfSendingFile;
+ private String mNameOfSendingFile;
+
private String mMimeTypeOfSendingFiles;
private ArrayList<Uri> mUrisOfSendingFiles;
@@ -260,6 +262,7 @@ public class BluetoothOppManager {
uri = BluetoothOppUtility.generateUri(uri, sendFileInfo);
BluetoothOppUtility.putSendFileInfo(uri, sendFileInfo);
mUriOfSendingFile = uri.toString();
+ mNameOfSendingFile = sendFileInfo.mFileName;
storeApplicationData();
}
}
@@ -357,7 +360,7 @@ public class BluetoothOppManager {
return;
}
insertThread = new InsertShareInfoThread(device, mMultipleFlag, mMimeTypeOfSendingFile,
- mUriOfSendingFile, mMimeTypeOfSendingFiles, mUrisOfSendingFiles,
+ mUriOfSendingFile, mNameOfSendingFile, mMimeTypeOfSendingFiles, mUrisOfSendingFiles,
mIsHandoverInitiated);
if (mMultipleFlag) {
mfileNumInBatch = mUrisOfSendingFiles.size();
@@ -382,6 +385,8 @@ public class BluetoothOppManager {
private final String mUri;
+ private final String mNameOfSingleFile;
+
private final String mTypeOfMultipleFiles;
private final ArrayList<Uri> mUris;
@@ -391,13 +396,15 @@ public class BluetoothOppManager {
private final boolean mIsHandoverInitiated;
public InsertShareInfoThread(BluetoothDevice device, boolean multiple,
- String typeOfSingleFile, String uri, String typeOfMultipleFiles,
- ArrayList<Uri> uris, boolean handoverInitiated) {
+ String typeOfSingleFile, String uri, String nameOfSingleFile,
+ String typeOfMultipleFiles, ArrayList<Uri> uris,
+ boolean handoverInitiated) {
super("Insert ShareInfo Thread");
this.mRemoteDevice = device;
this.mIsMultiple = multiple;
this.mTypeOfSingleFile = typeOfSingleFile;
this.mUri = uri;
+ this.mNameOfSingleFile = nameOfSingleFile;
this.mTypeOfMultipleFiles = typeOfMultipleFiles;
this.mUris = uris;
this.mIsHandoverInitiated = handoverInitiated;
@@ -467,6 +474,7 @@ public class BluetoothOppManager {
private void insertSingleShare() {
ContentValues values = new ContentValues();
values.put(BluetoothShare.URI, mUri);
+ values.put(BluetoothShare.FILENAME_HINT, mNameOfSingleFile);
values.put(BluetoothShare.MIMETYPE, mTypeOfSingleFile);
values.put(BluetoothShare.DESTINATION, mRemoteDevice.getAddress());
if (mIsHandoverInitiated) {
diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java
index 945d5475c..f38736513 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppService.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppService.java
@@ -393,6 +393,7 @@ public class BluetoothOppService extends Service {
break;
case BluetoothAdapter.STATE_TURNING_OFF:
if (V) Log.v(TAG, "Receiver DISABLED_ACTION ");
+ removePendingTransfer();
mNotifier.updateNotifier();
//FIX: Don't block main thread
/*
@@ -867,6 +868,94 @@ public class BluetoothOppService extends Service {
}
}
+ private void removePendingTransfer() {
+ if (V) Log.v(TAG, "Remove pending share");
+ Cursor cursor = null;
+ try {
+ cursor = getContentResolver().query(BluetoothShare.CONTENT_URI, null, null,
+ null, BluetoothShare._ID);
+ } catch (SQLiteException e) {
+ if (cursor != null){
+ cursor.close();
+ }
+ cursor = null;
+ Log.e(TAG, "UpdateThread: " + e);
+ } catch (CursorWindowAllocationException e) {
+ cursor = null;
+ Log.e(TAG, "UpdateThread: " + e);
+ }
+
+ if (cursor == null) {
+ return;
+ }
+
+ cursor.moveToFirst();
+ int arrayPos = 0;
+ boolean isAfterLast = cursor.isAfterLast();
+
+ while (!isAfterLast || arrayPos < mShares.size()) {
+ String uriString = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.URI));
+ Uri uri;
+ if (uriString != null) {
+ uri = Uri.parse(uriString);
+ Log.d(TAG, "removeShare parsed URI: " + uri);
+ } else {
+ uri = null;
+ Log.e(TAG, "removeShare found null URI at cursor!");
+ }
+ BluetoothOppShareInfo info = new BluetoothOppShareInfo(
+ cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID)),
+ uri,
+ cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT)),
+ cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare._DATA)),
+ cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.MIMETYPE)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION)),
+ cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare.DESTINATION)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.VISIBILITY)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.STATUS)),
+ cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)),
+ cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES)),
+ cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(Constants.MEDIA_SCANNED)) != Constants.MEDIA_SCANNED_NOT_SCANNED);
+
+ if (V) {
+ Log.v(TAG, "Service remove entry");
+ Log.v(TAG, "ID : " + info.mId);
+ // Log.v(TAG, "URI : " + ((info.mUri != null) ? "yes" : "no"));
+ Log.v(TAG, "URI : " + info.mUri);
+ Log.v(TAG, "HINT : " + info.mHint);
+ Log.v(TAG, "FILENAME: " + info.mFilename);
+ Log.v(TAG, "MIMETYPE: " + info.mMimetype);
+ Log.v(TAG, "DIRECTION: " + info.mDirection);
+ Log.v(TAG, "DESTINAT: " + info.mDestination);
+ Log.v(TAG, "VISIBILI: " + info.mVisibility);
+ Log.v(TAG, "CONFIRM : " + info.mConfirm);
+ Log.v(TAG, "STATUS : " + info.mStatus);
+ Log.v(TAG, "TOTAL : " + info.mTotalBytes);
+ Log.v(TAG, "CURRENT : " + info.mCurrentBytes);
+ Log.v(TAG, "TIMESTAMP : " + info.mTimestamp);
+ Log.v(TAG, "SCANNED : " + info.mMediaScanned);
+ }
+
+ if (info.isReadyToStart()) {
+ if (info.mDirection == BluetoothShare.DIRECTION_OUTBOUND) {
+ BluetoothOppSendFileInfo sendFileInfo = BluetoothOppUtility.getSendFileInfo(
+ info.mUri);
+ Constants.updateShareStatus(this, info.mId, BluetoothShare.STATUS_BAD_REQUEST);
+ BluetoothOppUtility.closeSendFileInfo(info.mUri);
+ }
+ }
+
+ ++arrayPos;
+ cursor.moveToNext();
+ isAfterLast = cursor.isAfterLast();
+ }
+ cursor.close();
+ if (V) Log.v(TAG, "Freeing cursor: " + cursor);
+ cursor = null;
+ }
+
/**
* Removes the local copy of the info about a share.
*/