diff options
68 files changed, 1582 insertions, 568 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4fad501c1..d33f2dae7 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -28,6 +28,7 @@ <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> + <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> @@ -76,7 +77,7 @@ android:exported="true" android:process="@string/process"> <path-permission - android:path="/btopp" + android:pathPrefix="/btopp" android:permission="android.permission.ACCESS_BLUETOOTH_SHARE" /> </provider> <service diff --git a/jni/com_android_bluetooth_avrcp.cpp b/jni/com_android_bluetooth_avrcp.cpp index 46c1c8fd5..9d5950575 100644 --- a/jni/com_android_bluetooth_avrcp.cpp +++ b/jni/com_android_bluetooth_avrcp.cpp @@ -75,6 +75,7 @@ static void btavrcp_remote_features_callback(bt_bdaddr_t* bd_addr, btrc_remote_f sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte*) bd_addr); sCallbackEnv->CallVoidMethod(mCallbacksObj, method_getRcFeatures, addr, (jint)features); checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); + sCallbackEnv->DeleteLocalRef(addr); } static void btavrcp_get_play_status_callback() { diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp index 65b15780c..6e5e1aa6f 100644 --- a/jni/com_android_bluetooth_btservice_AdapterService.cpp +++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp @@ -53,7 +53,7 @@ static const btsock_interface_t *sBluetoothSocketInterface = NULL; static const btmce_interface_t *sBluetoothMceInterface = NULL; static JNIEnv *callbackEnv = NULL; -static jobject sJniCallbacksObj; +static jobject sJniCallbacksObj = NULL; static jfieldID sJniCallbacksField; @@ -89,9 +89,11 @@ static void adapter_state_change_callback(bt_state_t status) { return; } ALOGV("%s: Status is: %d", __FUNCTION__, status); - - callbackEnv->CallVoidMethod(sJniCallbacksObj, method_stateChangeCallback, (jint)status); - + if(sJniCallbacksObj) { + callbackEnv->CallVoidMethod(sJniCallbacksObj, method_stateChangeCallback, (jint)status); + } else { + ALOGE("JNI ERROR : JNI reference already cleaned : adapter_state_change_callback", __FUNCTION__); + } checkAndClearExceptionFromCallback(callbackEnv, __FUNCTION__); } @@ -656,6 +658,7 @@ static bool cleanupNative(JNIEnv *env, jobject obj) { ALOGI("%s: return from cleanup",__FUNCTION__); env->DeleteGlobalRef(sJniCallbacksObj); + sJniCallbacksObj = NULL; return JNI_TRUE; } diff --git a/jni/com_android_bluetooth_gatt.cpp b/jni/com_android_bluetooth_gatt.cpp index 854a92500..1ffac4e08 100644 --- a/jni/com_android_bluetooth_gatt.cpp +++ b/jni/com_android_bluetooth_gatt.cpp @@ -158,7 +158,7 @@ static jmethodID method_onGetDescriptor; static jmethodID method_onGetIncludedService; static jmethodID method_onRegisterForNotifications; static jmethodID method_onReadRemoteRssi; -static jmethodID method_onClientListen; +static jmethodID method_onAdvertiseCallback; /** * Server callback methods @@ -423,11 +423,10 @@ void btgattc_remote_rssi_cb(int client_if,bt_bdaddr_t* bda, int rssi, int status checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); } -void btgattc_listen_cb(int status, int client_if) +void btgattc_advertise_cb(int status, int client_if) { CHECK_CALLBACK_ENV - sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onClientListen - , status, client_if); + sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onAdvertiseCallback, status, client_if); checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); } @@ -449,7 +448,7 @@ static const btgatt_client_callbacks_t sGattClientCallbacks = { btgattc_write_descriptor_cb, btgattc_execute_write_cb, btgattc_remote_rssi_cb, - btgattc_listen_cb + btgattc_advertise_cb }; @@ -680,7 +679,7 @@ static void classInitNative(JNIEnv* env, jclass clazz) { method_onAttributeRead= env->GetMethodID(clazz, "onAttributeRead", "(Ljava/lang/String;IIIIZ)V"); method_onAttributeWrite= env->GetMethodID(clazz, "onAttributeWrite", "(Ljava/lang/String;IIIIIZZ[B)V"); method_onExecuteWrite= env->GetMethodID(clazz, "onExecuteWrite", "(Ljava/lang/String;III)V"); - method_onClientListen = env->GetMethodID(clazz, "onClientListen", "(II)V"); + method_onAdvertiseCallback = env->GetMethodID(clazz, "onAdvertiseCallback", "(II)V"); info("classInitNative: Success!"); } @@ -1058,7 +1057,7 @@ static void gattClientReadRemoteRssiNative(JNIEnv* env, jobject object, jint cli sGattIf->client->read_remote_rssi(clientif, &bda); } -static void gattClientListenNative(JNIEnv *env, jobject object, +static void gattAdvertiseNative(JNIEnv *env, jobject object, jint client_if, jboolean start) { if (!sGattIf) return; @@ -1066,17 +1065,28 @@ static void gattClientListenNative(JNIEnv *env, jobject object, } static void gattSetAdvDataNative(JNIEnv *env, jobject object, jint client_if, jboolean setScanRsp, - jboolean inclName, jboolean inclTxPower, jint minInterval, jint maxInterval, jint appearance, - jbyteArray manufacturerData) + jboolean inclName, jboolean inclTxPower, jint minInterval, jint maxInterval, + jint appearance, jbyteArray manufacturerData, jbyteArray serviceData, + jbyteArray serviceUuid) { if (!sGattIf) return; - jbyte* arr_data = env->GetByteArrayElements(manufacturerData, 0); + jbyte* arr_data = env->GetByteArrayElements(manufacturerData, NULL); uint16_t arr_len = (uint16_t) env->GetArrayLength(manufacturerData); + jbyte* service_data = env->GetByteArrayElements(serviceData, NULL); + uint16_t service_data_len = (uint16_t) env->GetArrayLength(serviceData); + + jbyte* service_uuid = env->GetByteArrayElements(serviceUuid, NULL); + uint16_t service_uuid_len = (uint16_t) env->GetArrayLength(serviceUuid); + sGattIf->client->set_adv_data(client_if, setScanRsp, inclName, inclTxPower, - minInterval, maxInterval, appearance, arr_len, (char*)arr_data); + minInterval, maxInterval, appearance, arr_len, (char*)arr_data, + service_data_len, (char*)service_data, service_uuid_len, + (char*)service_uuid); env->ReleaseByteArrayElements(manufacturerData, arr_data, JNI_ABORT); + env->ReleaseByteArrayElements(serviceData, service_data, JNI_ABORT); + env->ReleaseByteArrayElements(serviceUuid, service_uuid, JNI_ABORT); } @@ -1292,7 +1302,7 @@ static JNINativeMethod sMethods[] = { {"gattClientExecuteWriteNative", "(IZ)V", (void *) gattClientExecuteWriteNative}, {"gattClientRegisterForNotificationsNative", "(ILjava/lang/String;IIJJIJJZ)V", (void *) gattClientRegisterForNotificationsNative}, {"gattClientReadRemoteRssiNative", "(ILjava/lang/String;)V", (void *) gattClientReadRemoteRssiNative}, - {"gattClientListenNative", "(IZ)V", (void *) gattClientListenNative}, + {"gattAdvertiseNative", "(IZ)V", (void *) gattAdvertiseNative}, {"gattServerRegisterAppNative", "(JJ)V", (void *) gattServerRegisterAppNative}, {"gattServerUnregisterAppNative", "(I)V", (void *) gattServerUnregisterAppNative}, @@ -1309,7 +1319,7 @@ static JNINativeMethod sMethods[] = { {"gattServerSendNotificationNative", "(III[B)V", (void *) gattServerSendNotificationNative}, {"gattServerSendResponseNative", "(IIIIII[BI)V", (void *) gattServerSendResponseNative}, - {"gattSetAdvDataNative", "(IZZZIII[B)V", (void *) gattSetAdvDataNative}, + {"gattSetAdvDataNative", "(IZZZIII[B[B[B)V", (void *) gattSetAdvDataNative}, {"gattTestNative", "(IJJLjava/lang/String;IIIII)V", (void *) gattTestNative}, }; diff --git a/res/values-ar/cm_caf.xml b/res/values-ar/cm_caf.xml new file mode 100644 index 000000000..4237f17fa --- /dev/null +++ b/res/values-ar/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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/res/values-ca/cm_caf.xml b/res/values-ca/cm_caf.xml new file mode 100644 index 000000000..b7e957229 --- /dev/null +++ b/res/values-ca/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Compartició Bluetooth: La part remota ha rebutjat el fitxer de longitud zero <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-el/cm_strings.xml b/res/values-cs/cm_caf.xml index 383c1b2d0..9059bfe4d 100644 --- a/res/values-el/cm_strings.xml +++ b/res/values-cs/cm_caf.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> <!-- Copyright (C) 2014 The CyanogenMod Project @@ -15,5 +16,6 @@ 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="empty_file_notification_sent">Sdílení Bluetooth: vzdálená strana odmítla prázdný soubor <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> </resources> diff --git a/res/values-da/cm_caf.xml b/res/values-da/cm_caf.xml new file mode 100644 index 000000000..9d917a9ca --- /dev/null +++ b/res/values-da/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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-deling: Fjernenhed afviste nullængde fil <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index 9649bc4fc..ef515d314 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -78,7 +78,7 @@ <string name="not_exist_file_desc" msgid="4059531573790529229">"Filen findes ikke. \n"</string> <string name="enabling_progress_title" msgid="436157952334723406">"Vent..."</string> <string name="enabling_progress_content" msgid="4601542238119927904">"Aktiverer Bluetooth..."</string> - <string name="bt_toast_1" msgid="972182708034353383">"Filen modtages. Se status i meddelelsespanelet."</string> + <string name="bt_toast_1" msgid="972182708034353383">"Filen modtages. Se status i underretningspanelet."</string> <string name="bt_toast_2" msgid="8602553334099066582">"Filen kan ikke modtages."</string> <string name="bt_toast_3" msgid="6707884165086862518">"Modtagelse af fil fra \"<xliff:g id="SENDER">%1$s</xliff:g>\" stoppet"</string> <string name="bt_toast_4" msgid="4678812947604395649">"Sender filen til \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\""</string> diff --git a/res/values-de/cm_caf.xml b/res/values-de/cm_caf.xml new file mode 100644 index 000000000..24574690b --- /dev/null +++ b/res/values-de/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Teilen über Bluetooth: Gegenseite hat die Datei <xliff:g id="file">%1$s</xliff:g> mit Null-Länge abgelehnt</string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-el/cm_caf.xml b/res/values-el/cm_caf.xml new file mode 100644 index 000000000..b6616f841 --- /dev/null +++ b/res/values-el/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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-es-rXA/cm_caf.xml b/res/values-es-rXA/cm_caf.xml new file mode 100644 index 000000000..ec82faabc --- /dev/null +++ b/res/values-es-rXA/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Compartición Bluetooth: La parte remota refugó\'l ficheru de tamañu cero <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-es-rXA/cm_strings.xml b/res/values-es-rXA/cm_strings.xml deleted file mode 100644 index 54841138c..000000000 --- a/res/values-es-rXA/cm_strings.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 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: Refugóse\'l ficheru baleru <xliff:g id="file">%1$s</xliff:g></string> -</resources> diff --git a/res/values-es-rXA/strings.xml b/res/values-es-rXA/strings.xml index 79f5b78ea..0454c2325 100644 --- a/res/values-es-rXA/strings.xml +++ b/res/values-es-rXA/strings.xml @@ -1,5 +1,7 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright (C) 2007 The Android Open Source Project +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- Copyright (C) 2007 The Android Open Source Project + Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,105 +14,103 @@ 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" msgid="311492132450338925">Accesu al alministrador de descargues</string> - <string name="permdesc_bluetoothShareManager" msgid="8930572979123190223">Permite que l\'aplicación acceda al alministrador BluetoothShare y lu use pa tresferir ficheros.</string> - <string name="permlab_bluetoothWhitelist" msgid="7091552898592306386">Accesu de preseos Bluetooth autorizaos</string> - <string name="permdesc_bluetoothWhitelist" msgid="5494513855192170109">Permite que l\'aplicación autorice temporalmente a un preséu Bluetooth pa que pueda unviar ficheros a esti preséu ensin la confirmación del usuariu.</string> - <string name="permlab_handoverStatus" msgid="7316032998801933554">Recibe emisiones de tresferencies Bluetooth.</string> - <string name="permdesc_handoverStatus" msgid="4752738070064786310">Permite que se reciba información sobre l\'estáu de la tresferencia del ficheru Bluetooth.</string> - <string name="bt_share_picker_label" msgid="6268100924487046932">Bluetooth</string> - <string name="unknown_device" msgid="9221903979877041009">Preséu desconocíu</string> - <string name="unknownNumber" msgid="4994750948072751566">Desconocíu</string> - <string name="airplane_error_title" msgid="2683839635115739939">Mou avión</string> - <string name="airplane_error_msg" msgid="8698965595254137230">Nun pues usar el Bluetooth nel mou avión.</string> - <string name="bt_enable_title" msgid="8657832550503456572"></string> - <string name="bt_enable_line1" msgid="7203551583048149">Pa utilizar los servicios de Bluetooth, primero tienes d\'activar la función Bluetooth.</string> - <string name="bt_enable_line2" msgid="4341936569415937994">¿Quies activar la función Bluetooth agora?</string> - <string name="bt_enable_cancel" msgid="1988832367505151727">Encaboxar</string> - <string name="bt_enable_ok" msgid="3432462749994538265">Activar</string> - <string name="incoming_file_confirm_title" msgid="8139874248612182627">Tresferencia de ficheros</string> - <string name="incoming_file_confirm_content" msgid="6673812334377911289">\"<xliff:g id="SENDER">%1$s</xliff:g>\" quier unviate <xliff:g id="FILE">%2$s</xliff:g>(<xliff:g id="SIZE">%3$s</xliff:g>). \n\n ¿Aceutes el ficheru?</string> - <string name="incoming_file_confirm_cancel" msgid="2973321832477704805">Refugar</string> - <string name="incoming_file_confirm_ok" msgid="281462442932231475">Aceutar</string> - <string name="incoming_file_confirm_timeout_ok" msgid="1414676773249857278">Aceutar</string> - <string name="incoming_file_confirm_timeout_content" msgid="172779756093975981">Escosó\'l tiempu p\'aceutar el ficheru entrante de \"<xliff:g id="SENDER">%1$s</xliff:g>\".</string> - <string name="incoming_file_confirm_Notification_title" msgid="2958227698135117210">Bluetooth: ficheru entrante</string> - <string name="incoming_file_confirm_Notification_caption" msgid="6671081128475981157">¿Quies recibir esti ficheru?</string> - <string name="incoming_file_toast_msg" msgid="1733710749992901811">Otru preséu quier unviate un ficheru. Confirma que quies recibilu.</string> - <string name="notification_receiving" msgid="4674648179652543984">Bluetooth: recibiendo <xliff:g id="FILE">%1$s</xliff:g></string> - <string name="notification_received" msgid="3324588019186687985">Compartir con Bluetooth: <xliff:g id="FILE">%1$s</xliff:g> recibíu</string> - <string name="notification_received_fail" msgid="3619350997285714746">Bluetooth: <xliff:g id="FILE">%1$s</xliff:g> non recibíu</string> - <string name="notification_sending" msgid="3035748958534983833">Bluetooth: unviando <xliff:g id="FILE">%1$s</xliff:g></string> - <string name="notification_sent" msgid="9218710861333027778">Bluetooth: <xliff:g id="FILE">%1$s</xliff:g> unviáu</string> - <string name="notification_sent_complete" msgid="302943281067557969">100% completáu</string> - <string name="notification_sent_fail" msgid="6696082233774569445">Bluetooth: ficheru <xliff:g id="FILE">%1$s</xliff:g> non unviáu</string> - <string name="download_title" msgid="3353228219772092586">Tresferencia de ficheros</string> - <string name="download_line1" msgid="4926604799202134144">De: \"<xliff:g id="SENDER">%1$s</xliff:g>\"</string> - <string name="download_line2" msgid="5876973543019417712">Ficheru: <xliff:g id="FILE">%1$s</xliff:g></string> - <string name="download_line3" msgid="4384821622908676061">Tamañu de ficheru: <xliff:g id="SIZE">%1$s</xliff:g></string> - <string name="download_line4" msgid="8535996869722666525"></string> - <string name="download_line5" msgid="3069560415845295386">Recibiendo ficheru…</string> - <string name="download_cancel" msgid="9177305996747500768">Detener</string> - <string name="download_ok" msgid="5000360731674466039">Anubrir</string> - <string name="download_fail_line1" msgid="3846450148862894552">Ficheru non recibíu</string> - <string name="download_fail_line2" msgid="8950394574689971071">Ficheru: <xliff:g id="FILE">%1$s</xliff:g></string> - <string name="download_fail_line3" msgid="3451040656154861722">Motivu: <xliff:g id="REASON">%1$s</xliff:g></string> - <string name="download_fail_ok" msgid="1521733664438320300">Aceutar</string> - <string name="download_succ_line5" msgid="4509944688281573595">Ficheru recibíu</string> - <string name="download_succ_ok" msgid="7053688246357050216">Abrir</string> - <string name="upload_line1" msgid="2055952074059709052">Pa: \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\"</string> - <string name="upload_line3" msgid="4920689672457037437">Triba de ficheru: <xliff:g id="TYPE">%1$s</xliff:g> (<xliff:g id="SIZE">%2$s</xliff:g>)</string> - <string name="upload_line5" msgid="7759322537674229752">Unviando ficheru…</string> - <string name="upload_succ_line5" msgid="5687317197463383601">Ficheru unviáu</string> - <string name="upload_succ_ok" msgid="7705428476405478828">Aceutar</string> - <string name="upload_fail_line1" msgid="7899394672421491701">Nun s\'unvió\'l ficheru a \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\".</string> - <string name="upload_fail_line1_2" msgid="2108129204050841798">Ficheru: <xliff:g id="FILE">%1$s</xliff:g></string> - <string name="upload_fail_ok" msgid="5807702461606714296">Volver a intentalo</string> - <string name="upload_fail_cancel" msgid="9118496285835687125">Zarrar</string> - <string name="bt_error_btn_ok" msgid="5965151173011534240">Aceutar</string> - <string name="unknown_file" msgid="6092727753965095366">Ficheru desconocíu</string> - <string name="unknown_file_desc" msgid="480434281415453287">Nun hai denguna aplicación que pueda procesar esta triba de ficheru. \n</string> - <string name="not_exist_file" msgid="3489434189599716133">Nun hai ficheros.</string> - <string name="not_exist_file_desc" msgid="4059531573790529229">El ficheru nun esiste. \n</string> - <string name="enabling_progress_title" msgid="436157952334723406">Por favor, espera...</string> - <string name="enabling_progress_content" msgid="4601542238119927904">Activando Bluetooth...</string> - <string name="bt_toast_1" msgid="972182708034353383">Va recibise\'l ficheru. Comprueba\'l progresu na barra de notificaciones.</string> - <string name="bt_toast_2" msgid="8602553334099066582">Nun pue recibise\'l ficheru.</string> - <string name="bt_toast_3" msgid="6707884165086862518">Detúvose la receición del ficheru de \"<xliff:g id="SENDER">%1$s</xliff:g>\"</string> - <string name="bt_toast_4" msgid="4678812947604395649">Unviando ficheru a \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\"</string> - <string name="bt_toast_5" msgid="2846870992823019494">Unviando <xliff:g id="NUMBER">%1$s</xliff:g> ficheros a \"<xliff:g id="RECIPIENT">%2$s</xliff:g>\"</string> - <string name="bt_toast_6" msgid="1855266596936622458">Detúvose l\'unviu del ficheru a \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\"</string> - <string name="bt_sm_2_1" product="nosdcard" msgid="352165168004521000">Nun hai abondu espaciu nel almacenamientu USB pa guardar el ficheru de \"<xliff:g id="SENDER">%1$s</xliff:g>\".</string> - <string name="bt_sm_2_1" product="default" msgid="1989018443456803630">Nun hai abondu espaciu na tarxeta SD pa guardar el ficheru de \"<xliff:g id="SENDER">%1$s</xliff:g>\".</string> - <string name="bt_sm_2_2" msgid="2965243265852680543">Espaciu necesariu: <xliff:g id="SIZE">%1$s</xliff:g></string> - <string name="ErrorTooManyRequests" msgid="8578277541472944529">Tán procesándose munches solicitúes. Vuelvi a intentalo dempués.</string> - <string name="status_pending" msgid="2503691772030877944">Entá nun s\'anició la tresferencia de ficheros.</string> - <string name="status_running" msgid="6562808920311008696">Tresferencia de ficheros en cursu</string> - <string name="status_success" msgid="239573225847565868">La tresferencia de ficheros completóse correcho.</string> - <string name="status_not_accept" msgid="1695082417193780738">Conteníu non almitíu</string> - <string name="status_forbidden" msgid="613956401054050725">El preséu de destín nun permite la tresferencia.</string> - <string name="status_canceled" msgid="6664490318773098285">Tresferencia encaboxada pol usuariu</string> - <string name="status_file_error" msgid="3671917770630165299">Fallu rellacionáu col almacenamientu</string> - <string name="status_no_sd_card" product="nosdcard" msgid="1112125377088421469">Ensin almacenamientu USB</string> - <string name="status_no_sd_card" product="default" msgid="5760944071743325592">Nun se deteuta denguna tarxeta SD. Inxerta una tarxeta SD y guarda los ficheros tresferíos.</string> - <string name="status_connection_error" msgid="947681831523219891">Conexón incorreuta</string> - <string name="status_protocol_error" msgid="3245444473429269539">Nun pue procesase la solicitú correchamente.</string> - <string name="status_unknown_error" msgid="8156660554237824912">Fallu desconocíu</string> - <string name="btopp_live_folder" msgid="7967791481444474554">Recibido por Bluetooth</string> - <string name="download_success" msgid="7036160438766730871">Receición de <xliff:g id="FILE_SIZE">%1$s</xliff:g> completada</string> - <string name="upload_success" msgid="4014469387779648949">Unviu de <xliff:g id="FILE_SIZE">%1$s</xliff:g> completáu</string> - <string name="inbound_history_title" msgid="6940914942271327563">Tresferencies entrantes</string> - <string name="outbound_history_title" msgid="4279418703178140526">Tresferencies salientes</string> - <string name="no_transfers" msgid="3482965619151865672">L\'historial de tresferencies ta baleru.</string> - <string name="transfer_clear_dlg_msg" msgid="1712376797268438075">Van desaniciase tolos elementos de la llista.</string> - <string name="outbound_noti_title" msgid="8051906709452260849">Bluetooth: ficheros unviaos</string> - <string name="inbound_noti_title" msgid="4143352641953027595">Bluetooth: ficheros recibíos</string> - <string name="noti_caption" msgid="7508708288885707365">Correutos: <xliff:g id="SUCCESSFUL_NUMBER_0">%1$s</xliff:g>; fallu en <xliff:g id="UNSUCCESSFUL_NUMBER">%2$s</xliff:g></string> - <string name="transfer_menu_clear_all" msgid="790017462957873132">Desaniciar llista</string> - <string name="transfer_menu_open" msgid="3368984869083107200">Abrir</string> - <string name="transfer_menu_clear" msgid="5854038118831427492">Desaniciar de la llista</string> - <string name="transfer_clear_dlg_title" msgid="2953444575556460386">Desaniciar</string> + <string name="permlab_bluetoothShareManager">Accesu al alministrador de descargues</string> + <string name="permdesc_bluetoothShareManager">Permite que l\'aplicación acceda al alministrador BluetoothShare y lu use pa tresferir ficheros.</string> + <string name="permlab_bluetoothWhitelist">Accesu de preseos Bluetooth autorizaos</string> + <string name="permdesc_bluetoothWhitelist">Permíte-y a l’aplicación autorizar temporalmente un preséu Bluetooth pa poder unviar ficheros a esti preséu ensin la confirmación del usuariu.</string> + <string name="permlab_handoverStatus">Recibe emisiones de tresferencies Bluetooth.</string> + <string name="permdesc_handoverStatus">Permite recibir información sobre l\'estáu de la tresferencia del ficheru Bluetooth.</string> + <string name="bt_share_picker_label">Bluetooth</string> + <string name="unknown_device">Preséu desconocíu</string> + <string name="unknownNumber">Desconocíu</string> + <string name="airplane_error_title">Mou avión</string> + <string name="airplane_error_msg">Nun pues usar el Bluetooth nel mou avión.</string> + <string name="bt_enable_line1">Pa utilizar los servicios de Bluetooth, primero tienes d\'activar la función Bluetooth.</string> + <string name="bt_enable_line2">¿Quies activar la función Bluetooth agora?</string> + <string name="bt_enable_cancel">Encaboxar</string> + <string name="bt_enable_ok">Activar</string> + <string name="incoming_file_confirm_title">Tresferencia de ficheros</string> + <string name="incoming_file_confirm_content">\u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 quier unviate <xliff:g id="file">%2$s</xliff:g> (<xliff:g id="size">%3$s</xliff:g>). \n\n Aceutes el ficheru? </string> + <string name="incoming_file_confirm_cancel">Refugar</string> + <string name="incoming_file_confirm_ok">Aceutar</string> + <string name="incoming_file_confirm_timeout_ok">Aceutar</string> + <string name="incoming_file_confirm_timeout_content">Escosó\'l tiempu p\'aceutar el ficheru entrante de \"<xliff:g id="SENDER">%1$s</xliff:g>\".</string> + <string name="incoming_file_confirm_Notification_title">Bluetooth: ficheru entrante</string> + <string name="incoming_file_confirm_Notification_caption">¿Quies recibir esti ficheru?</string> + <string name="incoming_file_toast_msg">Otru preséu quier unviate un ficheru. Confirma que quies recibilu.</string> + <string name="notification_receiving">Bluetooth: recibiendo <xliff:g id="FILE">%1$s</xliff:g></string> + <string name="notification_received">Compartir con Bluetooth: <xliff:g id="FILE">%1$s</xliff:g> recibíu</string> + <string name="notification_received_fail">Bluetooth: <xliff:g id="FILE">%1$s</xliff:g> non recibíu</string> + <string name="notification_sending">Bluetooth: unviando <xliff:g id="FILE">%1$s</xliff:g></string> + <string name="notification_sent">Bluetooth: <xliff:g id="FILE">%1$s</xliff:g> unviáu</string> + <string name="notification_sent_complete">100% completáu</string> + <string name="notification_sent_fail">Bluetooth: ficheru <xliff:g id="FILE">%1$s</xliff:g> non unviáu</string> + <string name="download_title">Tresferencia de ficheros</string> + <string name="download_line1">De: \"<xliff:g id="SENDER">%1$s</xliff:g>\"</string> + <string name="download_line2">Ficheru: <xliff:g id="FILE">%1$s</xliff:g></string> + <string name="download_line3">Tamañu de ficheru: <xliff:g id="SIZE">%1$s</xliff:g></string> + <string name="download_line5">Recibiendo ficheru…</string> + <string name="download_cancel">Detener</string> + <string name="download_ok">Anubrir</string> + <string name="download_fail_line1">Ficheru non recibíu</string> + <string name="download_fail_line2">Ficheru: <xliff:g id="FILE">%1$s</xliff:g></string> + <string name="download_fail_line3">Motivu: <xliff:g id="REASON">%1$s</xliff:g></string> + <string name="download_fail_ok">Aceutar</string> + <string name="download_succ_line5">Ficheru recibíu</string> + <string name="download_succ_ok">Abrir</string> + <string name="upload_line1">Pa: \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\"</string> + <string name="upload_line3">Triba de ficheru: <xliff:g id="TYPE">%1$s</xliff:g> (<xliff:g id="SIZE">%2$s</xliff:g>)</string> + <string name="upload_line5">Unviando ficheru…</string> + <string name="upload_succ_line5">Ficheru unviáu</string> + <string name="upload_succ_ok">Aceutar</string> + <string name="upload_fail_line1">Nun s\'unvió\'l ficheru a \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\".</string> + <string name="upload_fail_line1_2">Ficheru: <xliff:g id="FILE">%1$s</xliff:g></string> + <string name="upload_fail_ok">Volver a intentalo</string> + <string name="upload_fail_cancel">Zarrar</string> + <string name="bt_error_btn_ok">Aceutar</string> + <string name="unknown_file">Ficheru desconocíu</string> + <string name="unknown_file_desc">Nun hai nenguna aplicación que pueda procesar esta triba de ficheru. \n</string> + <string name="not_exist_file">Nun hai ficheros.</string> + <string name="not_exist_file_desc">El ficheru nun esiste. \n</string> + <string name="enabling_progress_title">Por favor, espera...</string> + <string name="enabling_progress_content">Activando Bluetooth...</string> + <string name="bt_toast_1">Va recibise\'l ficheru. Comprueba\'l progresu na barra de notificaciones.</string> + <string name="bt_toast_2">Nun pue recibise\'l ficheru.</string> + <string name="bt_toast_3">Detúvose la receición del ficheru de \"<xliff:g id="SENDER">%1$s</xliff:g>\"</string> + <string name="bt_toast_4">Unviando ficheru a \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\"</string> + <string name="bt_toast_5">Unviando <xliff:g id="NUMBER">%1$s</xliff:g> ficheros a "<xliff:g id="RECIPIENT">%2$s</xliff:g>\"</string> + <string name="bt_toast_6">Detúvose l\'unviu del ficheru a \"<xliff:g id="RECIPIENT">%1$s</xliff:g>\"</string> + <string name="bt_sm_2_1" product="nosdcard">Nun hai espaciu abondu nel almacenamientu USB pa guardar el ficheru de \"<xliff:g id="SENDER">%1$s</xliff:g>\".</string> + <string name="bt_sm_2_1" product="default">Nun hai espaciu abondu na tarxeta SD pa guardar el ficheru de \"<xliff:g id="SENDER">%1$s</xliff:g>\".</string> + <string name="bt_sm_2_2">Espaciu necesariu: <xliff:g id="SIZE">%1$s</xliff:g></string> + <string name="ErrorTooManyRequests">Tán procesándose munches solicitúes. Vuelvi a intentalo dempués.</string> + <string name="status_pending">Entá nun s\'anició la tresferencia de ficheros.</string> + <string name="status_running">Tresferencia de ficheros en cursu</string> + <string name="status_success">La tresferencia de ficheros completóse correcho.</string> + <string name="status_not_accept">Conteníu non almitíu</string> + <string name="status_forbidden">El preséu de destín nun permite la tresferencia.</string> + <string name="status_canceled">Tresferencia encaboxada pol usuariu</string> + <string name="status_file_error">Fallu rellacionáu col almacenamientu</string> + <string name="status_no_sd_card" product="nosdcard">Ensin almacenamientu USB</string> + <string name="status_no_sd_card" product="default">Nun se deteuta nenguna tarxeta SD. Inxerta una tarxeta SD y guarda los ficheros tresferíos.</string> + <string name="status_connection_error">Conexón incorreuta</string> + <string name="status_protocol_error">Nun pue procesase la solicitú correchamente.</string> + <string name="status_unknown_error">Fallu desconocíu</string> + <string name="btopp_live_folder">Recibío per Bluetooth</string> + <string name="download_success">Receición de <xliff:g id="FILE_SIZE">%1$s</xliff:g> completada</string> + <string name="upload_success">Unviu de <xliff:g id="FILE_SIZE">%1$s</xliff:g> completáu</string> + <string name="inbound_history_title">Tresferencies entrantes</string> + <string name="outbound_history_title">Tresferencies salientes</string> + <string name="no_transfers">L\'historial de tresferencies ta baleru.</string> + <string name="transfer_clear_dlg_msg">Van desaniciase tolos elementos de la llista.</string> + <string name="outbound_noti_title">Bluetooth: ficheros unviaos</string> + <string name="inbound_noti_title">Bluetooth: ficheros recibíos</string> + <string name="noti_caption"> Correutos: <xliff:g id="SUCCESSFUL_NUMBER_0">%1$s</xliff:g>; fallu en <xliff:g id="UNSUCCESSFUL_NUMBER">%2$s</xliff:g>.</string> + <string name="transfer_menu_clear_all">Desaniciar llista</string> + <string name="transfer_menu_open">Abrir</string> + <string name="transfer_menu_clear">Desaniciar de la llista</string> + <string name="transfer_clear_dlg_title">Desaniciar</string> + <string name="bluetooth_share_file_name" translate="false">bluetooth_content_share</string> </resources> diff --git a/res/values-es-rXA/strings_pbap.xml b/res/values-es-rXA/strings_pbap.xml index 64499a11e..fdc782b9d 100644 --- a/res/values-es-rXA/strings_pbap.xml +++ b/res/values-es-rXA/strings_pbap.xml @@ -1,14 +1,15 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="pbap_session_key_dialog_title" msgid="3580996574333882561">Introducir clave de sesión pa %1$s</string> - <string name="pbap_session_key_dialog_header" msgid="2772472422782758981">Necesítase la clave de sesión de Bluetooth.</string> - <string name="pbap_acceptance_timeout_message" msgid="1107401415099814293">Escosó\'l tiempu p\'aceutar la conexón con %1$s.</string> - <string name="pbap_authentication_timeout_message" msgid="4166979525521902687">Escosó\'l tiempu pa introducir la clave de sesión con %1$s.</string> - <string name="auth_notif_ticker" msgid="1575825798053163744">Solicitú d\'autenticación de Obex</string> - <string name="auth_notif_title" msgid="7599854855681573258">Clave de sesión</string> - <string name="auth_notif_message" msgid="6667218116427605038">Introducir clave de sesión pa %1$s</string> - <string name="defaultname" msgid="4821590500649090078">Carkit</string> - <string name="unknownName" msgid="2841414754740600042">Nome desconocíu</string> - <string name="localPhoneName" msgid="2349001318925409159">El mio nome</string> - <string name="defaultnumber" msgid="8520116145890867338">000000</string> + <string name="pbap_session_key_dialog_title">Escribi clave de sesión pa %1$s</string> + <string name="pbap_session_key_dialog_header">Necesítase la clave de sesión de Bluetooth.</string> + <string name="pbap_acceptance_timeout_message">Escosó\'l tiempu p\'aceutar la conexón con %1$s.</string> + <string name="pbap_authentication_timeout_message">Escosó\'l tiempu pa inxertar la clave de sesión con %1$s.</string> + <string name="auth_notif_ticker">Solicitú d\'autenticación de Obex</string> + <string name="auth_notif_title">Clave de sesión</string> + <string name="auth_notif_message">Escribi clave de sesión pa %1$s</string> + <string name="defaultname">Kit d\'automóvil</string> + <string name="unknownName">Nome desconocíu</string> + <string name="localPhoneName">El mio nome</string> + <string name="defaultnumber">000000</string> </resources> diff --git a/res/values-af/cm_strings.xml b/res/values-es/cm_caf.xml index 0fd1caebd..dd62bc3fb 100644 --- a/res/values-af/cm_strings.xml +++ b/res/values-es/cm_caf.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> <!-- - Copyright (C) 2013 The CyanogenMod Project + 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. @@ -15,5 +16,6 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="empty_file_notification_sent">Bluetooth-deel: Ander toestel verwerp nul lengte lêer <xliff:g id="file">%1$s</xliff:g></string> + <string name="empty_file_notification_sent">Bluetooth: Ha sido rechazado el archivo vacío <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> </resources> diff --git a/res/values-et/cm_caf.xml b/res/values-et/cm_caf.xml new file mode 100644 index 000000000..c2f6eb0ef --- /dev/null +++ b/res/values-et/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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 jagamine: null-suurusega fail hüljatud <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-fi/cm_caf.xml b/res/values-fi/cm_caf.xml new file mode 100644 index 000000000..18f2b679c --- /dev/null +++ b/res/values-fi/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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-jako: etälaite hylkäsi tyhjän tiedoston <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-fr/cm_caf.xml b/res/values-fr/cm_caf.xml new file mode 100644 index 000000000..3281cc4a7 --- /dev/null +++ b/res/values-fr/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Partage Bluetooth : le fichier <xliff:g id="file">%1$s</xliff:g> de taille nulle a été rejeté par le destinataire</string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-hu/cm_caf.xml b/res/values-hu/cm_caf.xml new file mode 100644 index 000000000..f15b7118c --- /dev/null +++ b/res/values-hu/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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 megosztás: A távoli eszköz elutasította a következő üres fájlt: <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-in/cm_caf.xml b/res/values-in/cm_caf.xml new file mode 100644 index 000000000..ed9e67485 --- /dev/null +++ b/res/values-in/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Berbagi Bluetooth: Remote menolak file dengan panjang nol <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-it/cm_caf.xml b/res/values-it/cm_caf.xml new file mode 100644 index 000000000..4e8c439d4 --- /dev/null +++ b/res/values-it/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Condivisione Bluetooth: il dispositivo remoto ha rifiutato il file vuoto <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-it/cm_strings.xml b/res/values-it/cm_strings.xml deleted file mode 100644 index dda311eb7..000000000 --- a/res/values-it/cm_strings.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2012-2013 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">Condivisione bluetooth: il dispositivo remoto ha rifiutato il file di 0 byte <xliff:g id="file">%1$s</xliff:g></string> -</resources> diff --git a/res/values-iw/cm_caf.xml b/res/values-iw/cm_caf.xml new file mode 100644 index 000000000..e7c1a15a8 --- /dev/null +++ b/res/values-iw/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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_caf.xml b/res/values-ku/cm_caf.xml new file mode 100644 index 000000000..a3f5a319b --- /dev/null +++ b/res/values-ku/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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/res/values-ku/strings.xml b/res/values-ku/strings.xml new file mode 100644 index 000000000..7ffbd7ad0 --- /dev/null +++ b/res/values-ku/strings.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- Copyright (C) 2007 The Android Open Source Project + Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. + + 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">\u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 ئەیەوێت بینێرێت <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">کاتەکە بەسەر چووکاتێک پەڕگەکەت قبولکردن هات \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022</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">بەشداریکردنی بلوتوس: File <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">١٠٠% تەواوبوو</string> + <string name="notification_sent_fail">بەشداری بلوتوس: فایل<xliff:g id="file">%1$s</xliff:g> نەگەیشت</string> + <string name="download_title">گواستنهوهی فایل</string> + <string name="download_line1">لە: \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022</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">وەرگرتنی فایل\u2026</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">بۆ: \u0022<xliff:g id="recipient">%1$s</xliff:g>\u0022</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">ناردنی فایل\u2026</string> + <string name="upload_succ_line5">فایلەکە نێردرا</string> + <string name="upload_succ_ok">باشه</string> + <string name="upload_fail_line1">فایلەکە نەنێردرا بۆ \u0022<xliff:g id="recipient">%1$s</xliff:g>\u0022.</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">تکایە چاوەڕێبکە\u2026</string> + <string name="enabling_progress_content">کردنەوەی بلوتوس\u2026</string> + <string name="bt_toast_1">فەیلەکە ئەگەیەت. پشکنینی تێبینی.</string> + <string name="bt_toast_2">فایلەکە ناتوانرێت بنێردرێت.</string> + <string name="bt_toast_3">گەیشتنی فایلەکە وەستا لە \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022</string> + <string name="bt_toast_4">ناردنی بەرنامەکە بۆ \u0022<xliff:g id="recipient">%1$s</xliff:g>\u0022</string> + <string name="bt_toast_5">ناردن <xliff:g id="number">%1$s</xliff:g> فایل بۆ \u0022<xliff:g id="recipient">%2$s</xliff:g>\u0022</string> + <string name="bt_toast_6">وەستاندنی فایل ناردن بۆ \u0022<xliff:g id="recipient">%1$s</xliff:g>\u0022</string> + <string name="bt_sm_2_1" product="nosdcard">بیرگەی تەواو لەبەردەست نیە بۆ پاشەکەوتکردنی فایلەکە لە \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022</string> + <string name="bt_sm_2_1" product="default">بیرگەی تەواو لەبەردەست نیە بۆ پاشەکەوتکردنی فایلەکە لە \u0022<xliff:g id="sender">%1$s</xliff:g>\u0022</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">بیرگەی ناوەکی نیە.</string> + <string name="status_no_sd_card" product="default">بیرگەی دەرەکی نیە. بیرگەیەکی تێبکە بۆ گواستنەوەی فایلەکان.</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">%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">بەشداری_ناوەڕۆکی_بلوتوس</string> +</resources> diff --git a/res/values-ku/strings_pbap.xml b/res/values-ku/strings_pbap.xml new file mode 100644 index 000000000..64c495a99 --- /dev/null +++ b/res/values-ku/strings_pbap.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<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">داواکاری ناساندنی ئۆبیکس</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-lb/strings.xml b/res/values-lb/strings.xml new file mode 100644 index 000000000..a84ba7afd --- /dev/null +++ b/res/values-lb/strings.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- Copyright (C) 2007 The Android Open Source Project + Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. + + 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="bt_share_picker_label">Bluetooth</string> + <string name="bt_enable_cancel">Ofbriechen</string> + <string name="incoming_file_confirm_timeout_ok">OK</string> + <string name="download_fail_ok">OK</string> + <string name="download_succ_ok">Opmaachen</string> + <string name="upload_succ_ok">OK</string> + <string name="bt_error_btn_ok">OK</string> + <string name="transfer_menu_open">Opmaachen</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 new file mode 100644 index 000000000..d2c0ee15e --- /dev/null +++ b/res/values-lb/strings_pbap.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="pbap_session_key_dialog_title">Tipp de Sëtzungsschlëssel fir %1$s an</string> + <string name="pbap_session_key_dialog_header">Bluetooth-Sëtzungsschlëssel néideg</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="unknownName">Onbekannten Numm</string> + <string name="localPhoneName">Mäin Numm</string> + <string name="defaultnumber">000000</string> +</resources> diff --git a/res/values-lt/cm_caf.xml b/res/values-lt/cm_caf.xml new file mode 100644 index 000000000..5f484f3fd --- /dev/null +++ b/res/values-lt/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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-lt/cm_strings.xml b/res/values-lt/cm_strings.xml deleted file mode 100644 index a52e21fa1..000000000 --- a/res/values-lt/cm_strings.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2012-2013 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“ dalijimasis: gavėjas atmetė tuščią failą <xliff:g id="file">%1$s</xliff:g>"</string> -</resources> diff --git a/res/values-nl/cm_caf.xml b/res/values-nl/cm_caf.xml new file mode 100644 index 000000000..24cad6180 --- /dev/null +++ b/res/values-nl/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Delen via Bluetooth: ontvanger weigert leeg bestand <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-nl/cm_strings.xml b/res/values-nl/cm_strings.xml deleted file mode 100644 index d76995879..000000000 --- a/res/values-nl/cm_strings.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2012-2013 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"> - <!-- CAF --> - <string name="empty_file_notification_sent">Delen via Bluetooth: ontvanger weigert leeg bestand <xliff:g id="file">%1$s</xliff:g></string> -</resources> diff --git a/res/values-pt-rBR/cm_caf.xml b/res/values-pt-rBR/cm_caf.xml new file mode 100644 index 000000000..0031731d8 --- /dev/null +++ b/res/values-pt-rBR/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Compartilhamento Bluetooth: O dispositivo remoto rejeitou o arquivo <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-pt-rPT/cm_caf.xml b/res/values-pt-rPT/cm_caf.xml new file mode 100644 index 000000000..0031731d8 --- /dev/null +++ b/res/values-pt-rPT/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Compartilhamento Bluetooth: O dispositivo remoto rejeitou o arquivo <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-ro/cm_caf.xml b/res/values-ro/cm_caf.xml new file mode 100644 index 000000000..16d8b0c3d --- /dev/null +++ b/res/values-ro/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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">Partajare Bluetooth: Dispozitivul îndepărtat a respins fișierul de lungime zero <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d %%</string> +</resources> diff --git a/res/values-es/cm_strings.xml b/res/values-ru/cm_caf.xml index fd5c66295..db11783cb 100644 --- a/res/values-es/cm_strings.xml +++ b/res/values-ru/cm_caf.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> <!-- - Copyright (C) 2013 The CyanogenMod Project + 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. @@ -15,5 +16,6 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="empty_file_notification_sent">Bluetooth: Ha sido rechazado el archivo vacío <xliff:g id="file">%1$s</xliff:g></string> + <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-si/cm_caf.xml b/res/values-si/cm_caf.xml new file mode 100644 index 000000000..0412821b1 --- /dev/null +++ b/res/values-si/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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/res/values-hu/cm_strings.xml b/res/values-sk/cm_caf.xml index f2732fbd1..394b75fd1 100644 --- a/res/values-hu/cm_strings.xml +++ b/res/values-sk/cm_caf.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> <!-- - Copyright (C) 2013 The CyanogenMod Project + 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. @@ -15,5 +16,6 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="empty_file_notification_sent">Bluetooth megosztás: A cél visszautasította a következő üres fájlt: <xliff:g id="file">%1$s</xliff:g></string> + <string name="empty_file_notification_sent">Zdieľanie cez Bluetooth: Vzdialene odmietnutý súbor s nulovou veľkosťou <xliff:g id="file">%1$s</xliff:g></string> + <string name="format_progress_text">%1$d%%</string> </resources> diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index 7e3522f2e..198bbb78b 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -16,7 +16,7 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="permlab_bluetoothShareManager" msgid="311492132450338925">"Získať prístup k správcovi preberania."</string> + <string name="permlab_bluetoothShareManager" msgid="311492132450338925">"Získať prístup k správcovi sťahovania."</string> <string name="permdesc_bluetoothShareManager" msgid="8930572979123190223">"Umožňuje aplikácii pristupovať k Správcovi BluetoothShare a použiť ho na prenos súborov."</string> <string name="permlab_bluetoothWhitelist" msgid="7091552898592306386">"Prístup povoleného zariadenia Bluetooth."</string> <string name="permdesc_bluetoothWhitelist" msgid="5494513855192170109">"Umožňuje aplikácii dočasne povoliť zariadenie Bluetooth, čím sa povolí zariadeniu odosielať súbory do tohto zariadenia bez potvrdenia používateľa."</string> diff --git a/res/values-sr/cm_caf.xml b/res/values-sr/cm_caf.xml new file mode 100644 index 000000000..c7cd9ebb1 --- /dev/null +++ b/res/values-sr/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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-cs/cm_strings.xml b/res/values-ta/strings.xml index 3fe376824..887f407b9 100644 --- a/res/values-cs/cm_strings.xml +++ b/res/values-ta/strings.xml @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2012-2013 The CyanogenMod Project +<!--Generated by crowdin.net--> +<!-- Copyright (C) 2007 The Android Open Source Project + Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <!-- AOSP specific translation - from strings.xml--> - <string name="empty_file_notification_sent">Sdílení Bluetooth: byl odmítnut soubor o nulové délce <xliff:g id="file">%1$s</xliff:g></string> + <string name="bt_share_picker_label">Bluetooth</string> + <string name="incoming_file_confirm_title">கோப்பு இடமாற்றம்</string> + <string name="download_title">கோப்பு இடமாற்றம்</string> </resources> diff --git a/res/values-ta/strings_pbap.xml b/res/values-ta/strings_pbap.xml new file mode 100644 index 000000000..6c51ca49d --- /dev/null +++ b/res/values-ta/strings_pbap.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="pbap_session_key_dialog_title">%1$s அமர்வு குறியீட்டை தட்டச்சு செய்யவும்</string> + <string name="auth_notif_message">%1$s அமர்வு குறியீட்டை தட்டச்சு செய்யவும்</string> +</resources> diff --git a/res/values-th/cm_caf.xml b/res/values-th/cm_caf.xml new file mode 100644 index 000000000..7e7fb3232 --- /dev/null +++ b/res/values-th/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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/res/values-tr/cm_caf.xml b/res/values-tr/cm_caf.xml new file mode 100644 index 000000000..4c7d276d7 --- /dev/null +++ b/res/values-tr/cm_caf.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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ı: Karşı taraf boş <xliff:g id="file">%1$s</xliff:g> dosyasını reddetti</string> + <string name="format_progress_text">%1$d%%</string> +</resources> diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 820b29b02..49083b352 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -78,7 +78,6 @@ <string name="not_exist_file_desc" msgid="4059531573790529229">"Dosya mevcut değil. \n"</string> <string name="enabling_progress_title" msgid="436157952334723406">"Lütfen bekleyin..."</string> <string name="enabling_progress_content" msgid="4601542238119927904">"Bluetooth açılıyor..."</string> - <string name="format_progress_text">%%%1$d</string> <string name="bt_toast_1" msgid="972182708034353383">"Dosya alınacak. İlerlemeyi Bildirimler panelinden izleyebilirsiniz."</string> <string name="bt_toast_2" msgid="8602553334099066582">"Dosya alınamıyor."</string> <string name="bt_toast_3" msgid="6707884165086862518">"\"<xliff:g id="SENDER">%1$s</xliff:g>\" kaynağından dosya alımı durduruldu"</string> diff --git a/res/values-ug/strings.xml b/res/values-ug/strings.xml deleted file mode 100644 index 699361df5..000000000 --- a/res/values-ug/strings.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="permlab_bluetoothShareManager" msgid="311492132450338925">"چۈشۈرۈش باشقۇرغۇچنى زىيارەت."</string> - <string name="permdesc_bluetoothShareManager" msgid="8930572979123190223">"ئەپنىڭ كۆكچىش ھەمبەھىر باشقۇرغۇچنى زىيارەت قىلىشقا يول قويىدۇ ھەمدە شۇ باشقۇرغۇچنى ئىشلىتىپ ھۆججەت يوللايدۇ."</string> - <string name="permlab_bluetoothWhitelist" msgid="7091552898592306386">"ئاق تىزىمدىكى كۆكچىش ئۈسكۈنە زىيارىتى."</string> - <string name="permdesc_bluetoothWhitelist" msgid="5494513855192170109">"كۆكچىش ئۈسكۈنىسىنى زىيارەت ھوقۇقى ئاق تىزىملىكىگە كىرگۈزۈشكە يول قويىدۇ، شۇ ئارقىلىق ئىشلەتكۈچىنىڭ جەزملىشى بولمىغان ئەھۋالدا ھۆججەتنى بۇ ئۈسكۈنىگە يوللايدۇ."</string> - <string name="permlab_handoverStatus" msgid="7316032998801933554">"كۆكچىش كىرىشتۈرۈپ ئۇزاتقان تارقىتىشنى قوبۇل قىلىدۇ."</string> - <string name="permdesc_handoverStatus" msgid="4752738070064786310">"كۆكچىش ئارقىلىق كىرىشتۈرۈپ ئۇزىتىش ھالەت ئۇچۇرىنى قوبۇل قىلىشقا يول قويىدۇ."</string> - <string name="bt_share_picker_label" msgid="6268100924487046932">"كۆكچىش"</string> - <string name="unknown_device" msgid="9221903979877041009">"يوچۇن ئۈسكۈنە"</string> - <string name="unknownNumber" msgid="4994750948072751566">"يوچۇن"</string> - <string name="airplane_error_title" msgid="2683839635115739939">"ئايروپىلان ھالىتى"</string> - <string name="airplane_error_msg" msgid="8698965595254137230">"ئايروپىلان ھالىتىدە كۆكچىش ئىشلىتەلمەيسىز."</string> - <string name="bt_enable_title" msgid="8657832550503456572"/> - <string name="bt_enable_line1" msgid="7203551583048149">"كۆكچىش مۇلازىمىتى ئىشلىتىشتە ئالدى بىلەن كۆكچىشنى ئېچىشىڭىز لازىم."</string> - <string name="bt_enable_line2" msgid="4341936569415937994">"ھازىر كۆكچىشنى ئاچامدۇ؟"</string> - <string name="bt_enable_cancel" msgid="1988832367505151727">"ۋاز كەچ"</string> - <string name="bt_enable_ok" msgid="3432462749994538265">"ئاچ"</string> - <string name="incoming_file_confirm_title" msgid="8139874248612182627">"ھۆججەت يوللاش"</string> - <string name="incoming_file_confirm_content" msgid="6673812334377911289">""<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" msgid="2973321832477704805">"قوشۇلما"</string> - <string name="incoming_file_confirm_ok" msgid="281462442932231475">"قوشۇل"</string> - <string name="incoming_file_confirm_timeout_ok" msgid="1414676773249857278">"جەزملە"</string> - <string name="incoming_file_confirm_timeout_content" msgid="172779756093975981">""<xliff:g id="SENDER">%1$s</xliff:g>" دىن كەلگەن ھۆججەتنى قوبۇل قىلىۋاتقاندا ۋاقىت ھالقىدى"</string> - <string name="incoming_file_confirm_Notification_title" msgid="2958227698135117210">"كۆكچىش ھەمبەھىر: ئەكىرگەن ھۆججەت"</string> - <string name="incoming_file_confirm_Notification_caption" msgid="6671081128475981157">"بۇ ھۆججەتنى قوبۇل قىلامسىز؟"</string> - <string name="incoming_file_toast_msg" msgid="1733710749992901811">"كەلگەن ھۆججەت باشقا بىر ئۈسكۈنىدىن كەلگەن. بۇ ھۆججەتنى قوبۇل قىلىشنى جەزملەڭ."</string> - <string name="notification_receiving" msgid="4674648179652543984">"كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> قوبۇللاۋاتىدۇ"</string> - <string name="notification_received" msgid="3324588019186687985">"كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> قوبۇللىدى"</string> - <string name="notification_received_fail" msgid="3619350997285714746">"كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> ھۆججەتنى قوبۇللىمىدى"</string> - <string name="notification_sending" msgid="3035748958534983833">"كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> يوللاۋاتىدۇ"</string> - <string name="notification_sent" msgid="9218710861333027778">"كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> يوللاندى"</string> - <string name="notification_sent_complete" msgid="302943281067557969">"100% تامام"</string> - <string name="notification_sent_fail" msgid="6696082233774569445">"كۆكچىش ھەمبەھىر: <xliff:g id="FILE">%1$s</xliff:g> ھۆججەت يوللانمىدى"</string> - <string name="download_title" msgid="3353228219772092586">"ھۆججەت يوللاش"</string> - <string name="download_line1" msgid="4926604799202134144">"ئورنى: "<xliff:g id="SENDER">%1$s</xliff:g>"</string> - <string name="download_line2" msgid="5876973543019417712">"ھۆججەت: <xliff:g id="FILE">%1$s</xliff:g>"</string> - <string name="download_line3" msgid="4384821622908676061">"ھۆججەت چوڭلۇقى: <xliff:g id="SIZE">%1$s</xliff:g>"</string> - <string name="download_line4" msgid="8535996869722666525"/> - <string name="download_line5" msgid="3069560415845295386">"ھۆججەت قوبۇللاۋاتىدۇ…"</string> - <string name="download_cancel" msgid="9177305996747500768">"توختا"</string> - <string name="download_ok" msgid="5000360731674466039">"يوشۇر"</string> - <string name="download_fail_line1" msgid="3846450148862894552">"ھۆججەت قوبۇللانمىدى"</string> - <string name="download_fail_line2" msgid="8950394574689971071">"ھۆججەت: <xliff:g id="FILE">%1$s</xliff:g>"</string> - <string name="download_fail_line3" msgid="3451040656154861722">"سەۋەب: <xliff:g id="REASON">%1$s</xliff:g>"</string> - <string name="download_fail_ok" msgid="1521733664438320300">"جەزملە"</string> - <string name="download_succ_line5" msgid="4509944688281573595">"ھۆججەت قوبۇللاندى"</string> - <string name="download_succ_ok" msgid="7053688246357050216">"ئاچ"</string> - <string name="upload_line1" msgid="2055952074059709052">"ئورنى: "<xliff:g id="RECIPIENT">%1$s</xliff:g>""</string> - <string name="upload_line3" msgid="4920689672457037437">"ھۆججەت تىپى: <xliff:g id="TYPE">%1$s</xliff:g> (<xliff:g id="SIZE">%2$s</xliff:g>)"</string> - <string name="upload_line5" msgid="7759322537674229752">"ھۆججەت يوللاۋاتىدۇ…"</string> - <string name="upload_succ_line5" msgid="5687317197463383601">"ھۆججەت يوللاندى"</string> - <string name="upload_succ_ok" msgid="7705428476405478828">"جەزملە"</string> - <string name="upload_fail_line1" msgid="7899394672421491701">"بۇ ھۆججەتنى "<xliff:g id="RECIPIENT">%1$s</xliff:g>" غا يوللىيالمىدى."</string> - <string name="upload_fail_line1_2" msgid="2108129204050841798">"ھۆججەت: <xliff:g id="FILE">%1$s</xliff:g>"</string> - <string name="upload_fail_ok" msgid="5807702461606714296">"قايتا سىنا"</string> - <string name="upload_fail_cancel" msgid="9118496285835687125">"ياپ"</string> - <string name="bt_error_btn_ok" msgid="5965151173011534240">"جەزملە"</string> - <string name="unknown_file" msgid="6092727753965095366">"يوچۇن ھۆججەت"</string> - <string name="unknown_file_desc" msgid="480434281415453287">"بۇ تىپتىكى ھۆججەتنى بىر تەرەپ قىلىدىغان ئەپ تېپىلمىدى. \n"</string> - <string name="not_exist_file" msgid="3489434189599716133">" ھۆججەت يوق"</string> - <string name="not_exist_file_desc" msgid="4059531573790529229">"ھۆججەت مەۋجۇت ئەمەس. \n"</string> - <string name="enabling_progress_title" msgid="436157952334723406">"سەل كۈتۈڭ…"</string> - <string name="enabling_progress_content" msgid="4601542238119927904">"كۆكچىشنى ئېچىۋاتىدۇ…"</string> - <string name="bt_toast_1" msgid="972182708034353383">"ھۆججەت قوبۇل قىلماقچى. ئۇقتۇرۇش تاختىسىدىن جەريانىنى تەكشۈرۈڭ."</string> - <string name="bt_toast_2" msgid="8602553334099066582">"بۇ ھۆججەتنى قوبۇل قىلالمايدۇ."</string> - <string name="bt_toast_3" msgid="6707884165086862518">""<xliff:g id="SENDER">%1$s</xliff:g>" دىن ھۆججەت قوبۇللاشنى توختاتتى"</string> - <string name="bt_toast_4" msgid="4678812947604395649">""<xliff:g id="RECIPIENT">%1$s</xliff:g>" غا ھۆججەت يوللاۋاتىدۇ"</string> - <string name="bt_toast_5" msgid="2846870992823019494">"<xliff:g id="NUMBER">%1$s</xliff:g> ھۆججەتنى "<xliff:g id="RECIPIENT">%2$s</xliff:g>" غا يوللاۋاتىدۇ"</string> - <string name="bt_toast_6" msgid="1855266596936622458">""<xliff:g id="RECIPIENT">%1$s</xliff:g>" غا ھۆججەت يوللاش توختىدى"</string> - <string name="bt_sm_2_1" product="nosdcard" msgid="352165168004521000">"بۇ USB ساقلىغۇچتا "<xliff:g id="SENDER">%1$s</xliff:g>" دىن كەلگەن ھۆججەتنى ساقلاشقا يېتەرلىك بوشلۇق يوق"</string> - <string name="bt_sm_2_1" product="default" msgid="1989018443456803630">"SD كارتادا "<xliff:g id="SENDER">%1$s</xliff:g>" دىن كەلگەن ھۆججەتنى ساقلاشقا يېتەرلىك بوشلۇق يوق"</string> - <string name="bt_sm_2_2" msgid="2965243265852680543">"كېتەرلىك بوشلۇق: <xliff:g id="SIZE">%1$s</xliff:g>"</string> - <string name="ErrorTooManyRequests" msgid="8578277541472944529">"بىر تەرەپ قىلىۋاتقان ئىلتىماس بەك كۆپ. سەل تۇرۇپ قايتا سىناڭ."</string> - <string name="status_pending" msgid="2503691772030877944">"ھۆججەت يوللاش باشلانمىدى"</string> - <string name="status_running" msgid="6562808920311008696">"ھۆججەت يوللىنىۋاتىدۇ."</string> - <string name="status_success" msgid="239573225847565868">"ھۆججەت يوللاش مۇۋەپپەقىيەتلىك تاماملاندى."</string> - <string name="status_not_accept" msgid="1695082417193780738">"مەزمۇننى قوللىمايدۇ."</string> - <string name="status_forbidden" msgid="613956401054050725">"نىشان ئۈسكۈنە يوللاشنى چەكلەيدۇ."</string> - <string name="status_canceled" msgid="6664490318773098285">"ئىشلەتكۈچى يوللاشتىن ۋاز كەچتى."</string> - <string name="status_file_error" msgid="3671917770630165299">"ساقلاش مەسىلىسى"</string> - <string name="status_no_sd_card" product="nosdcard" msgid="1112125377088421469">"USB ساقلىغۇچ يوق."</string> - <string name="status_no_sd_card" product="default" msgid="5760944071743325592">"SD كارتا يوق. يوللىغان ھۆججەتنى ساقلايدىغان SD كارتىنى قىستۇرۇڭ."</string> - <string name="status_connection_error" msgid="947681831523219891">"مۇۋەپپەقىيەتلىك باغلىنالمىدى."</string> - <string name="status_protocol_error" msgid="3245444473429269539">"ئىلتىماسنى توغرا بىر تەرەپ قىلالمايدۇ."</string> - <string name="status_unknown_error" msgid="8156660554237824912">"يوچۇن خاتالىق."</string> - <string name="btopp_live_folder" msgid="7967791481444474554">"كۆكچىش قوبۇللىدى"</string> - <string name="download_success" msgid="7036160438766730871">"<xliff:g id="FILE_SIZE">%1$s</xliff:g> قوبۇللاش تاماملاندى."</string> - <string name="upload_success" msgid="4014469387779648949">"<xliff:g id="FILE_SIZE">%1$s</xliff:g> يوللاش تاماملاندى."</string> - <string name="inbound_history_title" msgid="6940914942271327563">"يوللاشنىڭ كىرگەن ئىزلىرى"</string> - <string name="outbound_history_title" msgid="4279418703178140526">"يوللاشنىڭ چىققان ئىزلىرى"</string> - <string name="no_transfers" msgid="3482965619151865672">"توركۆرگۈ تارىخ خاتىرىسى بوش."</string> - <string name="transfer_clear_dlg_msg" msgid="1712376797268438075">"ھەممە تۈرلەر تىزىملىكتىن ئۆچۈرۈلىدۇ."</string> - <string name="outbound_noti_title" msgid="8051906709452260849">"كۆكچىش ھەمبەھىر: يوللانغان ھۆججەتلەر"</string> - <string name="inbound_noti_title" msgid="4143352641953027595">"كۆكچىش ھەمبەھىر: قوبۇللىغان ھۆججەتلەر"</string> - <string name="noti_caption" msgid="7508708288885707365">"<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" msgid="790017462957873132">"تىزىملىكنى تازىلا"</string> - <string name="transfer_menu_open" msgid="3368984869083107200">"ئاچ"</string> - <string name="transfer_menu_clear" msgid="5854038118831427492">"تىزىملىكتىن تازىلا"</string> - <string name="transfer_clear_dlg_title" msgid="2953444575556460386">"تازىلا"</string> -</resources>
\ No newline at end of file diff --git a/res/values-ug/strings_pbap.xml b/res/values-ug/strings_pbap.xml deleted file mode 100644 index 32263c4ad..000000000 --- a/res/values-ug/strings_pbap.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="pbap_session_key_dialog_title" msgid="3580996574333882561">"%1$s سۆزلىشىش ئاچقۇچىنى كىرگۈزۈڭ"</string> - <string name="pbap_session_key_dialog_header" msgid="2772472422782758981">"كۆكچىش سۆزلىشىش ئاچقۇچى زۆرۈر"</string> - <string name="pbap_acceptance_timeout_message" msgid="1107401415099814293">"%1$s نىڭ بىلەن بولغان باغلىنىشقا قوشۇلۇش ۋاقىت ھالقىدى"</string> - <string name="pbap_authentication_timeout_message" msgid="4166979525521902687">"%1$s سۆزلىشىش ئاچقۇچىنى كىرگۈزۈشتە ۋاقىت ھالقىدى"</string> - <string name="auth_notif_ticker" msgid="1575825798053163744">"Obex سالاھىيەت دەلىللەش ئىلتىماسى"</string> - <string name="auth_notif_title" msgid="7599854855681573258">"سۆزلىشىش ئاچقۇچى"</string> - <string name="auth_notif_message" msgid="6667218116427605038">"%1$s سۆزلىشىش ئاچقۇچىنى كىرگۈزۈڭ"</string> - <string name="defaultname" msgid="4821590500649090078">"ماشىنا يۈرۈشلۈكى"</string> - <string name="unknownName" msgid="2841414754740600042">"يوچۇن ئات"</string> - <string name="localPhoneName" msgid="2349001318925409159">"ئاتىم"</string> - <string name="defaultnumber" msgid="8520116145890867338">"000000"</string> -</resources>
\ No newline at end of file diff --git a/res/values-de/cm_strings.xml b/res/values-zh-rCN/cm_caf.xml index db862f78e..dea007268 100644 --- a/res/values-de/cm_strings.xml +++ b/res/values-zh-rCN/cm_caf.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> <!-- Copyright (C) 2014 The CyanogenMod Project @@ -15,5 +16,6 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="empty_file_notification_sent">>Bluetooth-Freigabe: Gegenseite hat die leere Datei <xliff:g id="file">%1$s</xliff:g> abgewiesen</string> + <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/res/values-da/cm_strings.xml b/res/values-zh-rTW/cm_caf.xml index a068c51cc..43026904f 100644 --- a/res/values-da/cm_strings.xml +++ b/res/values-zh-rTW/cm_caf.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> <!-- Copyright (C) 2014 The CyanogenMod Project @@ -15,5 +16,5 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="empty_file_notification_sent">Deling med Bluetooth: Modtager afviste nullængde-fil <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/A2dpService.java b/src/com/android/bluetooth/a2dp/A2dpService.java index 22c6081b9..7c5721b60 100644 --- a/src/com/android/bluetooth/a2dp/A2dpService.java +++ b/src/com/android/bluetooth/a2dp/A2dpService.java @@ -37,7 +37,7 @@ import java.util.Map; * @hide */ public class A2dpService extends ProfileService { - private static final boolean DBG = false; + private static final boolean DBG = true; private static final String TAG="A2dpService"; private A2dpStateMachine mStateMachine; @@ -60,8 +60,8 @@ public class A2dpService extends ProfileService { } protected boolean start() { - mStateMachine = A2dpStateMachine.make(this, this); mAvrcp = Avrcp.make(this); + mStateMachine = A2dpStateMachine.make(this, this); setA2dpService(this); return true; } @@ -236,6 +236,10 @@ public class A2dpService extends ProfileService { mAvrcp.setAbsoluteVolume(volume); } + public void setAvrcpAudioState(int state) { + mAvrcp.setA2dpAudioState(state); + } + synchronized boolean isA2dpPlaying(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); diff --git a/src/com/android/bluetooth/a2dp/A2dpStateMachine.java b/src/com/android/bluetooth/a2dp/A2dpStateMachine.java index b88e7b11c..7648acd90 100644 --- a/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +++ b/src/com/android/bluetooth/a2dp/A2dpStateMachine.java @@ -62,7 +62,7 @@ import java.util.List; import java.util.Set; final class A2dpStateMachine extends StateMachine { - private static final boolean DBG = false; + private static final boolean DBG = true; static final int CONNECT = 1; static final int DISCONNECT = 2; @@ -656,14 +656,16 @@ final class A2dpStateMachine extends StateMachine { switch (state) { case AUDIO_STATE_STARTED: if (mPlayingA2dpDevice == null) { - mPlayingA2dpDevice = device; - broadcastAudioState(device, BluetoothA2dp.STATE_PLAYING, - BluetoothA2dp.STATE_NOT_PLAYING); + mPlayingA2dpDevice = device; + mService.setAvrcpAudioState(BluetoothA2dp.STATE_PLAYING); + broadcastAudioState(device, BluetoothA2dp.STATE_PLAYING, + BluetoothA2dp.STATE_NOT_PLAYING); } break; case AUDIO_STATE_STOPPED: if (mPlayingA2dpDevice != null) { mPlayingA2dpDevice = null; + mService.setAvrcpAudioState(BluetoothA2dp.STATE_NOT_PLAYING); broadcastAudioState(device, BluetoothA2dp.STATE_NOT_PLAYING, BluetoothA2dp.STATE_PLAYING); } diff --git a/src/com/android/bluetooth/a2dp/Avrcp.java b/src/com/android/bluetooth/a2dp/Avrcp.java index f2d559801..6ad7d28b9 100644 --- a/src/com/android/bluetooth/a2dp/Avrcp.java +++ b/src/com/android/bluetooth/a2dp/Avrcp.java @@ -20,6 +20,7 @@ import java.util.Timer; import java.util.TimerTask; import android.app.PendingIntent; +import android.bluetooth.BluetoothA2dp; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; @@ -124,8 +125,9 @@ final class Avrcp { private static final int MESSAGE_FAST_FORWARD = 10; private static final int MESSAGE_REWIND = 11; private static final int MESSAGE_CHANGE_PLAY_POS = 12; + private static final int MESSAGE_SET_A2DP_AUDIO_STATE = 13; - private static final int MESSAGE_SET_ADDR_PLAYER_REQ_TIMEOUT = 13; + private static final int MESSAGE_SET_ADDR_PLAYER_REQ_TIMEOUT = 14; private static final int SET_ADDR_PLAYER_TIMEOUT = 2000; private int mAddressedPlayerChangedNT; @@ -777,10 +779,24 @@ final class Avrcp { int isAvailable = msg.arg2; processRCCStateChange(callingPackageName, isFocussed, isAvailable); break; + + case MESSAGE_SET_A2DP_AUDIO_STATE: + if (DEBUG) Log.v(TAG, "MESSAGE_SET_A2DP_AUDIO_STATE:" + msg.arg1); + updateA2dpAudioState(msg.arg1); + break; } } } + private void updateA2dpAudioState(int state) { + boolean isPlaying = (state == BluetoothA2dp.STATE_PLAYING); + if (isPlaying != isPlayingState(mCurrentPlayState)) { + updatePlayPauseState(isPlaying ? RemoteControlClient.PLAYSTATE_PLAYING : + RemoteControlClient.PLAYSTATE_PAUSED, + RemoteControlClient.PLAYBACK_POSITION_INVALID); + } + } + private void updatePlayPauseState(int state, long currentPosMs) { if (DEBUG) Log.v(TAG,"updatePlayPauseState"); boolean oldPosValid = (mCurrentPosMs != @@ -951,9 +967,6 @@ final class Avrcp { while (rccIterator.hasNext()) { final MediaPlayerInfo di = rccIterator.next(); if (di.GetPlayerFocus()) { - if (DEBUG) Log.v(TAG, "incrementing TrackNumber:" + mTrackNumber + "by 1"); - mTrackNumber = di.GetTrackNumber(); - mTrackNumber ++; di.SetTrackNumber(mTrackNumber); break; } @@ -978,6 +991,7 @@ final class Avrcp { mMetadata.trackTitle = getMdString(data, MediaMetadataRetriever.METADATA_KEY_TITLE); mMetadata.albumTitle = getMdString(data, MediaMetadataRetriever.METADATA_KEY_ALBUM); mMetadata.genre = getMdString(data, MediaMetadataRetriever.METADATA_KEY_GENRE); + mTrackNumber = getMdLong(data, MediaMetadataRetriever.METADATA_KEY_NUM_TRACKS); mMetadata.tracknum = getMdLong(data, MediaMetadataRetriever.METADATA_KEY_CD_TRACK_NUMBER); Log.v(TAG,"mMetadata.toString() = " + mMetadata.toString()); @@ -1399,6 +1413,20 @@ final class Avrcp { return playStatus; } + private boolean isPlayingState(int playState) { + boolean isPlaying = false; + switch (playState) { + case RemoteControlClient.PLAYSTATE_PLAYING: + case RemoteControlClient.PLAYSTATE_BUFFERING: + isPlaying = true; + break; + default: + isPlaying = false; + break; + } + return isPlaying; + } + /** * This is called from AudioService. It will return whether this device supports abs volume. * NOT USED AT THE MOMENT. @@ -1445,7 +1473,7 @@ final class Avrcp { private int convertToAudioStreamVolume(int volume) { // Rescale volume to match AudioSystem's volume - return (int) Math.ceil((double) volume*mAudioStreamMax/AVRCP_MAX_VOL); + return (int) Math.round((double) volume*mAudioStreamMax/AVRCP_MAX_VOL); } private int convertToAvrcpVolume(int volume) { @@ -1587,6 +1615,14 @@ private void updateLocalPlayerSettings( byte[] data) { mHandler.sendMessageDelayed(msg, 130); } + /** + * This is called from A2dpStateMachine to set A2dp audio state. + */ + public void setA2dpAudioState(int state) { + Message msg = mHandler.obtainMessage(MESSAGE_SET_A2DP_AUDIO_STATE, state, 0); + mHandler.sendMessage(msg); + } + // Do not modify without updating the HAL bt_rc.h files. // match up with btrc_play_status_t enum of bt_rc.h diff --git a/src/com/android/bluetooth/btservice/AdapterService.java b/src/com/android/bluetooth/btservice/AdapterService.java index a62a20729..2bb78bcf5 100644 --- a/src/com/android/bluetooth/btservice/AdapterService.java +++ b/src/com/android/bluetooth/btservice/AdapterService.java @@ -504,7 +504,7 @@ public class AdapterService extends Service { /** * The Binder implementation must be declared to be a static class, with * the AdapterService instance passed in the constructor. Furthermore, - * when the AdapterService shuts down, the reference to the AdapterService + * when the AdapterService shuts down, the reference to the AdapterService * must be explicitly removed. * * Otherwise, a memory leak can occur from repeated starting/stopping the @@ -1279,7 +1279,7 @@ public class AdapterService extends Service { } else if((a2dpConnDevList.isEmpty()) && (a2dpService.getPriority(device) >= BluetoothProfile.PRIORITY_ON) && - (a2dpService.getLastConnectedA2dpSepType(device) == BluetoothProfile.PROFILE_A2DP_SNK)&& + (a2dpService.getLastConnectedA2dpSepType(device) != BluetoothProfile.PROFILE_A2DP_SRC)&& (hsConnected || (hsService.getPriority(device) == BluetoothProfile.PRIORITY_OFF))) { a2dpService.connect(device); } diff --git a/src/com/android/bluetooth/btservice/AdapterState.java b/src/com/android/bluetooth/btservice/AdapterState.java index 1d5eff99f..585f5ae86 100644 --- a/src/com/android/bluetooth/btservice/AdapterState.java +++ b/src/com/android/bluetooth/btservice/AdapterState.java @@ -25,6 +25,7 @@ import android.util.Log; import com.android.internal.util.State; import com.android.internal.util.StateMachine; import android.os.SystemProperties; +import java.lang.RuntimeException; /** * This state machine handles Bluetooth Adapter State. @@ -375,15 +376,19 @@ final class AdapterState extends StateMachine { } void stateChangeCallback(int status) { - if (status == AbstractionLayer.BT_STATE_OFF) { - SystemProperties.set("bluetooth.isEnabled","false"); - sendMessage(DISABLED); - } else if (status == AbstractionLayer.BT_STATE_ON) { - // We should have got the property change for adapter and remote devices. - SystemProperties.set("bluetooth.isEnabled","true"); - sendMessage(ENABLED_READY); - } else { - errorLog("Incorrect status in stateChangeCallback"); + try { + if (status == AbstractionLayer.BT_STATE_OFF) { + SystemProperties.set("bluetooth.isEnabled","false"); + sendMessage(DISABLED); + } else if (status == AbstractionLayer.BT_STATE_ON) { + // We should have got the property change for adapter and remote devices. + SystemProperties.set("bluetooth.isEnabled","true"); + sendMessage(ENABLED_READY); + } else { + errorLog("Incorrect status in stateChangeCallback"); + } + } catch (RuntimeException e) { + Log.e(TAG,"Error setting system prop " + e); } } diff --git a/src/com/android/bluetooth/btservice/ProfileService.java b/src/com/android/bluetooth/btservice/ProfileService.java index e3d9196fe..0c1b70e3f 100644 --- a/src/com/android/bluetooth/btservice/ProfileService.java +++ b/src/com/android/bluetooth/btservice/ProfileService.java @@ -38,6 +38,8 @@ public abstract class ProfileService extends Service { public static final String BLUETOOTH_ADMIN_PERM = android.Manifest.permission.BLUETOOTH_ADMIN; public static final String BLUETOOTH_PERM = android.Manifest.permission.BLUETOOTH; + public static final String BLUETOOTH_PRIVILEGED = + android.Manifest.permission.BLUETOOTH_PRIVILEGED; public static interface IProfileServiceBinder extends IBinder { public boolean cleanup(); diff --git a/src/com/android/bluetooth/btservice/RemoteDevices.java b/src/com/android/bluetooth/btservice/RemoteDevices.java index 2898145df..fbd8ecd90 100644 --- a/src/com/android/bluetooth/btservice/RemoteDevices.java +++ b/src/com/android/bluetooth/btservice/RemoteDevices.java @@ -308,6 +308,8 @@ final class RemoteDevices { intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, pin); intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN); + // Make intent as foreground + intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM); // Release wakelock to allow the LCD to go off after the PIN popup notification. mWakeLock.release(); @@ -448,6 +450,8 @@ final class RemoteDevices { intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, BluetoothDevice.PAIRING_VARIANT_PIN); intent.putExtra(BluetoothDevice.EXTRA_SECURE_PAIRING, secure); + //Make intent as foreground + intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); mAdapterService.sendOrderedBroadcast(intent, mAdapterService.BLUETOOTH_ADMIN_PERM); // Release wakelock to allow the LCD to go off after the PIN popup notification. mWakeLock.release(); @@ -491,6 +495,8 @@ final class RemoteDevices { Intent intent = new Intent(BluetoothDevice.ACTION_PAIRING_REQUEST); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); + //Make intent as foreground + intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); if (displayPasskey) { intent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, passkey); } diff --git a/src/com/android/bluetooth/gatt/GattService.java b/src/com/android/bluetooth/gatt/GattService.java index 8c94e5285..fa05c984d 100644 --- a/src/com/android/bluetooth/gatt/GattService.java +++ b/src/com/android/bluetooth/gatt/GattService.java @@ -20,28 +20,29 @@ import android.app.Service; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothProfile; +import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetoothGatt; import android.bluetooth.IBluetoothGattCallback; import android.bluetooth.IBluetoothGattServerCallback; import android.content.Intent; import android.os.IBinder; -import android.os.IBinder.DeathRecipient; import android.os.ParcelUuid; import android.os.RemoteException; import android.util.Log; +import com.android.bluetooth.btservice.ProfileService; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; import com.android.bluetooth.LeScanRequestArbitrator; -import com.android.bluetooth.btservice.ProfileService; -import com.android.bluetooth.btservice.ProfileService.IProfileServiceBinder; /** * Provides Bluetooth Gatt profile, as a service in @@ -51,7 +52,30 @@ import com.android.bluetooth.btservice.ProfileService.IProfileServiceBinder; public class GattService extends ProfileService { private static final boolean DBG = GattServiceConfig.DBG; private static final String TAG = GattServiceConfig.TAG_PREFIX + "GattService"; - BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter(); + private static final int DEFAULT_SCAN_INTERVAL_MILLIS = 200; + + /** + * Max packet size for ble advertising, defined in Bluetooth Specification Version 4.0 [Vol 3]. + */ + private static final int ADVERTISING_PACKET_MAX_BYTES = 31; + /** + * Size overhead for advertising flag. + */ + private static final int ADVERTISING_FLAGS_BYTES = 3; + /** + * Size overhead per field. Usually it's just one byte of field length and one byte of + * field type. + */ + private static final int FIELD_OVERHEAD_BYTES = 2; + + /** + * Byte size of 16 bit service uuid. + */ + private static final int SHORT_UUID_BYTES = 2; + /** + * Byte size of 128 bit service uuid. + */ + private static final int FULL_UUID_BYTES = 16; /** * Search queue to serialize remote onbject inspection. @@ -75,6 +99,15 @@ public class GattService extends ProfileService { * Server handle map. */ HandleMap mHandleMap = new HandleMap(); + private List<UUID> mAdvertisingServiceUuids = new ArrayList<UUID>(); + + private int mAdvertisingClientIf = 0; + + private byte[] mServiceData = new byte[0]; + private int mManufacturerCode = -1; + private byte[] mManufacturerData = new byte[0]; + private Integer mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STOPPED; + private final Object mLock = new Object(); /** * Pending service declaration queue @@ -112,7 +145,7 @@ public class GattService extends ProfileService { } /** - * List of clients intereste in scan results. + * List of clients interested in scan results. */ private List<ScanClient> mScanQueue = new ArrayList<ScanClient>(); @@ -127,7 +160,7 @@ public class GattService extends ProfileService { private void removeScanClient(int appIf, boolean isServer) { for(ScanClient client : mScanQueue) { - if (client.appIf == appIf && client.isServer == isServer) { + if (client.appIf == appIf && client.isServer == isServer) { mScanQueue.remove(client); break; } @@ -197,7 +230,11 @@ public class GattService extends ProfileService { public void binderDied() { if (DBG) Log.d(TAG, "Binder is dead - unregistering client (" + mAppIf + ")!"); - stopScan(mAppIf, false); + if (mAdvertisingClientIf == mAppIf) { + stopAdvertising(true); // force stop advertising. + } else { + stopScan(mAppIf, false); + } unregisterClient(mAppIf); } } @@ -288,12 +325,6 @@ public class GattService extends ProfileService { service.clientDisconnect(clientIf, address); } - public void clientListen(int clientIf, boolean start) { - GattService service = getService(); - if (service == null) return; - service.clientListen(clientIf, start); - } - public void refreshDevice(int clientIf, String address) { GattService service = getService(); if (service == null) return; @@ -412,11 +443,11 @@ public class GattService extends ProfileService { public void beginServiceDeclaration(int serverIf, int srvcType, int srvcInstanceId, int minHandles, - ParcelUuid srvcId) { + ParcelUuid srvcId, boolean advertisePreferred) { GattService service = getService(); if (service == null) return; service.beginServiceDeclaration(serverIf, srvcType, srvcInstanceId, - minHandles, srvcId.getUuid()); + minHandles, srvcId.getUuid(), advertisePreferred); } public void addIncludedService(int serverIf, int srvcType, @@ -479,13 +510,68 @@ public class GattService extends ProfileService { srvcId.getUuid(), charInstanceId, charId.getUuid(), confirm, value); } - public void setAdvData(int serverIf, boolean setScanRsp, boolean inclName, - boolean inclTxPower, int minInterval, int maxInterval, - int appearance, byte[] manufacturerData) { + @Override + public void startAdvertising(int appIf) throws RemoteException { + GattService service = getService(); + if (service == null) return; + service.startAdvertising(appIf); + } + + @Override + public boolean isAdvertising() { + GattService service = getService(); + if (service == null) return false; + return service.isAdvertising(); + } + + @Override + public void stopAdvertising() throws RemoteException { GattService service = getService(); if (service == null) return; - service.setAdvData(serverIf, setScanRsp, inclName, inclTxPower, - minInterval, maxInterval, appearance, manufacturerData); + service.stopAdvertising(); + } + + @Override + public boolean setAdvServiceData(byte[] serviceData) throws RemoteException { + GattService service = getService(); + if (service == null) return false; + return service.setAdvServiceData(serviceData); + } + + @Override + public byte[] getAdvServiceData() throws RemoteException { + GattService service = getService(); + if (service == null) return null; + return service.getAdvServiceData(); + } + + @Override + public boolean setAdvManufacturerCodeAndData(int manufactureCode, byte[] manufacturerData) + throws RemoteException { + GattService service = getService(); + if (service == null) return false; + return service.setAdvManufacturerCodeAndData(manufactureCode, manufacturerData); + } + + @Override + public byte[] getAdvManufacturerData() throws RemoteException { + GattService service = getService(); + if (service == null) return null; + return service.getAdvManufacturerData(); + } + + @Override + public List<ParcelUuid> getAdvServiceUuids() throws RemoteException { + GattService service = getService(); + if (service == null) return null; + return service.getAdvServiceUuids(); + } + + @Override + public void removeAdvManufacturerCodeAndData(int manufacturerCode) throws RemoteException { + GattService service = getService(); + if (service == null) return; + service.removeAdvManufacturerCodeAndData(manufacturerCode); } }; @@ -836,14 +922,52 @@ public class GattService extends ProfileService { } } - void onClientListen(int status, int clientIf) - throws RemoteException { + void onAdvertiseCallback(int status, int clientIf) throws RemoteException { if (DBG) Log.d(TAG, "onClientListen() status=" + status); + synchronized (mLock) { + if (DBG) Log.d(TAG, "state" + mAdvertisingState); + // Invalid advertising state + if (mAdvertisingState == BluetoothAdapter.STATE_ADVERTISE_STARTED || + mAdvertisingState == BluetoothAdapter.STATE_ADVERTISE_STOPPED) { + Log.e(TAG, "invalid callback state " + mAdvertisingState); + return; + } - ClientMap.App app = mClientMap.getById(clientIf); - if (app == null) return; + // Force stop advertising, no callback. + if (mAdvertisingState == BluetoothAdapter.STATE_ADVERTISE_FORCE_STOPPING) { + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STOPPED; + mAdvertisingClientIf = 0; + sendBroadcast(new Intent( + BluetoothAdapter.ACTION_BLUETOOTH_ADVERTISING_STOPPED)); + return; + } - app.callback.onListen(status); + if (mAdvertisingState == BluetoothAdapter.STATE_ADVERTISE_STARTING) { + if (status == 0) { + mAdvertisingClientIf = clientIf; + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STARTED; + sendBroadcast(new Intent( + BluetoothAdapter.ACTION_BLUETOOTH_ADVERTISING_STARTED)); + } else { + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STOPPED; + } + } else if (mAdvertisingState == BluetoothAdapter.STATE_ADVERTISE_STOPPING) { + if (status == 0) { + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STOPPED; + sendBroadcast(new Intent( + BluetoothAdapter.ACTION_BLUETOOTH_ADVERTISING_STOPPED)); + mAdvertisingClientIf = 0; + } else { + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STARTED; + } + } + } + ClientMap.App app = mClientMap.getById(clientIf); + if (app == null || app.callback == null) { + Log.e(TAG, "app or callback is null"); + return; + } + app.callback.onAdvertiseStateChange(mAdvertisingState, status); } /************************************************************************** @@ -987,9 +1111,137 @@ public class GattService extends ProfileService { gattClientDisconnectNative(clientIf, address, connId != null ? connId : 0); } - void clientListen(int clientIf, boolean start) { - if (DBG) Log.d(TAG, "clientListen() - start=" + start); - gattClientListenNative(clientIf, start); + synchronized boolean setAdvServiceData(byte[] serviceData) { + enforcePrivilegedPermission(); + if (serviceData == null) return false; + // Calculate how many more bytes are needed for advertising service data field. + int extraBytes = (mServiceData == null) ? + FIELD_OVERHEAD_BYTES + serviceData.length : + serviceData.length - mServiceData.length; + if (getAvailableSize() < extraBytes) { + Log.e(TAG, "cannot set service data, available size " + getAvailableSize()); + return false; + } + mServiceData = serviceData; + return true; + } + + byte[] getAdvServiceData() { + enforcePrivilegedPermission(); + return mServiceData; + } + + synchronized boolean setAdvManufacturerCodeAndData( + int manufacturerCode, byte[] manufacturerData) { + enforcePrivilegedPermission(); + if (manufacturerCode <= 0 || manufacturerData == null) { + return false; + } + if (mManufacturerCode > 0 && mManufacturerData != null) { + Log.e(TAG, "manufacture data is already set"); + return false; + } + if (getAvailableSize() < + FIELD_OVERHEAD_BYTES + manufacturerData.length) { + Log.e(TAG, "cannot set manu data, available size " + getAvailableSize()); + return false; + } + this.mManufacturerCode = manufacturerCode; + this.mManufacturerData = manufacturerData; + return true; + } + + void removeAdvManufacturerCodeAndData(int manufacturerCode) { + enforcePrivilegedPermission(); + if (mManufacturerCode != manufacturerCode) { + return; + } + mManufacturerCode = -1; + mManufacturerData = new byte[0]; + } + + byte[] getAdvManufacturerData() { + enforcePrivilegedPermission(); + return mManufacturerData; + } + + synchronized List<ParcelUuid> getAdvServiceUuids() { + enforcePrivilegedPermission();; + boolean fullUuidFound = false; + List<ParcelUuid> serviceUuids = new ArrayList<ParcelUuid>(); + for (HandleMap.Entry entry : mHandleMap.mEntries) { + if (entry.advertisePreferred) { + ParcelUuid parcelUuid = new ParcelUuid(entry.uuid); + if (BluetoothUuid.isShortUuid(parcelUuid)) { + serviceUuids.add(parcelUuid); + } else { + // Allow at most one 128 bit service uuid to be advertised. + if (!fullUuidFound) { + fullUuidFound = true; + serviceUuids.add(parcelUuid); + } + } + } + } + return serviceUuids; + } + + boolean isAdvertising() { + enforcePrivilegedPermission(); + return mAdvertisingState != BluetoothAdapter.STATE_ADVERTISE_STOPPED; + } + + void startAdvertising(int clientIf) { + enforcePrivilegedPermission(); + if (DBG) Log.d(TAG, "start advertising for app - " + clientIf); + List<ParcelUuid> serviceUuids = getAdvServiceUuids(); + int advertisingServiceUuidLength = serviceUuids == null ? 0 : serviceUuids.size(); + + // Note according to Bluetooth Spec Version 4.0, for advertising and scan response data + // "all numerical multi-byte entities and values shall use little-endian byte order". + ByteBuffer advertisingUuidBytes = ByteBuffer.allocate(advertisingServiceUuidLength * 16) + .order(ByteOrder.LITTLE_ENDIAN); + for (ParcelUuid parcelUuid : serviceUuids) { + UUID uuid = parcelUuid.getUuid(); + // Least signifcant bits first as the advertising uuid should be in little-endian. + advertisingUuidBytes.putLong(uuid.getLeastSignificantBits()) + .putLong(uuid.getMostSignificantBits()); + } + + // Set advertising data. + gattSetAdvDataNative(clientIf, + false, // not scan response data + false, // no device name + false, // no tx power included + DEFAULT_SCAN_INTERVAL_MILLIS, + DEFAULT_SCAN_INTERVAL_MILLIS, + 0, // no appearance limit + mManufacturerData, + mServiceData, + advertisingUuidBytes.array()); + + // Start advertising if advertising is not already started. + if (!isAdvertising()) { + gattAdvertiseNative(clientIf, true); + mAdvertisingClientIf = clientIf; + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STARTING; + } + } + + void stopAdvertising() { + stopAdvertising(false); + } + + void stopAdvertising(boolean forceStop) { + enforcePrivilegedPermission(); + gattAdvertiseNative(mAdvertisingClientIf, false); + synchronized (mLock) { + if (forceStop) { + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_FORCE_STOPPING; + } else { + mAdvertisingState = BluetoothAdapter.STATE_ADVERTISE_STOPPING; + } + } } List<String> getConnectedDevices() { @@ -1151,15 +1403,6 @@ public class GattService extends ProfileService { gattClientReadRemoteRssiNative(clientIf, address); } - void setAdvData(int serverIf, boolean setScanRsp, boolean inclName, - boolean inclTxPower, int minInterval, int maxInterval, - int appearance, byte[] manufacturerData) { - if (DBG) Log.d(TAG, "setAdvData() - setScanRsp=" + setScanRsp); - if (minInterval == 0) maxInterval = 0; - gattSetAdvDataNative(serverIf, setScanRsp, inclName, inclTxPower, - minInterval, maxInterval, appearance, manufacturerData); - } - /************************************************************************** * Callback functions - SERVER *************************************************************************/ @@ -1183,8 +1426,11 @@ public class GattService extends ProfileService { UUID uuid = new UUID(srvcUuidMsb, srvcUuidLsb); if (DBG) Log.d(TAG, "onServiceAdded() UUID=" + uuid + ", status=" + status + ", handle=" + srvcHandle); - if (status == 0) - mHandleMap.addService(serverIf, srvcHandle, uuid, srvcType, srvcInstId); + if (status == 0) { + mHandleMap.addService(serverIf, srvcHandle, uuid, srvcType, srvcInstId, + mAdvertisingServiceUuids.remove(uuid)); + } + continueServiceDeclaration(serverIf, status, srvcHandle); } @@ -1415,12 +1661,13 @@ public class GattService extends ProfileService { } void beginServiceDeclaration(int serverIf, int srvcType, int srvcInstanceId, - int minHandles, UUID srvcUuid) { + int minHandles, UUID srvcUuid, boolean advertisePreferred) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); if (DBG) Log.d(TAG, "beginServiceDeclaration() - uuid=" + srvcUuid); ServiceDeclaration serviceDeclaration = addDeclaration(); - serviceDeclaration.addService(srvcUuid, srvcType, srvcInstanceId, minHandles); + serviceDeclaration.addService(srvcUuid, srvcType, srvcInstanceId, minHandles, + advertisePreferred); } void addIncludedService(int serverIf, int srvcType, int srvcInstanceId, @@ -1529,6 +1776,33 @@ public class GattService extends ProfileService { return type; } + private synchronized int getAvailableSize() { + enforcePrivilegedPermission(); + int availableSize = ADVERTISING_PACKET_MAX_BYTES - ADVERTISING_FLAGS_BYTES; + + for (ParcelUuid parcelUuid : getAdvServiceUuids()) { + if (BluetoothUuid.isShortUuid(parcelUuid)) { + availableSize -= FIELD_OVERHEAD_BYTES + SHORT_UUID_BYTES; + } else { + availableSize -= FIELD_OVERHEAD_BYTES + FULL_UUID_BYTES; + } + } + if (mManufacturerCode > 0 && mManufacturerData != null) { + availableSize -= (FIELD_OVERHEAD_BYTES + mManufacturerData.length); + } + if (mServiceData != null) { + availableSize -= (FIELD_OVERHEAD_BYTES + mServiceData.length); + } + return availableSize; + } + + // Enforce caller has BLUETOOTH_PRIVILEGED permission. A {@link SecurityException} will be + // thrown if the caller app does not have BLUETOOTH_PRIVILEGED permission. + private void enforcePrivilegedPermission() { + enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, + "Need BLUETOOTH_PRIVILEGED permission"); + } + private void continueSearch(int connId, int status) throws RemoteException { Log.d(TAG, "continueSearch() - connid=" + connId + ", status=" + status); @@ -1577,6 +1851,9 @@ public class GattService extends ProfileService { + entry.type); switch(entry.type) { case ServiceDeclaration.TYPE_SERVICE: + if (entry.advertisePreferred) { + mAdvertisingServiceUuids.add(entry.uuid); + } gattServerAddServiceNative(serverIf, entry.serviceType, entry.instance, entry.uuid.getLeastSignificantBits(), @@ -1621,6 +1898,7 @@ public class GattService extends ProfileService { ServerMap.App app = mServerMap.getById(serverIf); if (app != null) { HandleMap.Entry serviceEntry = mHandleMap.getByHandle(srvcHandle); + if (serviceEntry != null) { app.callback.onServiceAdded(status, serviceEntry.serviceType, serviceEntry.instance, new ParcelUuid(serviceEntry.uuid)); @@ -1801,11 +2079,11 @@ public class GattService extends ProfileService { private native void gattClientReadRemoteRssiNative(int clientIf, String address); - private native void gattClientListenNative(int client_if, boolean start); + private native void gattAdvertiseNative(int client_if, boolean start); private native void gattSetAdvDataNative(int serverIf, boolean setScanRsp, boolean inclName, boolean inclTxPower, int minInterval, int maxInterval, - int appearance, byte[] manufacturerData); + int appearance, byte[] manufacturerData, byte[] serviceData, byte[] serviceUuid); private native void gattServerRegisterAppNative(long app_uuid_lsb, long app_uuid_msb); diff --git a/src/com/android/bluetooth/gatt/HandleMap.java b/src/com/android/bluetooth/gatt/HandleMap.java index 5d45654b9..187625a43 100644 --- a/src/com/android/bluetooth/gatt/HandleMap.java +++ b/src/com/android/bluetooth/gatt/HandleMap.java @@ -42,6 +42,7 @@ class HandleMap { int serviceHandle = 0; int charHandle = 0; boolean started = false; + boolean advertisePreferred = false; Entry(int serverIf, int handle, UUID uuid, int serviceType, int instance) { this.serverIf = serverIf; @@ -52,6 +53,17 @@ class HandleMap { this.serviceType = serviceType; } + Entry(int serverIf, int handle, UUID uuid, int serviceType, int instance, + boolean advertisePreferred) { + this.serverIf = serverIf; + this.type = TYPE_SERVICE; + this.handle = handle; + this.uuid = uuid; + this.instance = instance; + this.serviceType = serviceType; + this.advertisePreferred = advertisePreferred; + } + Entry(int serverIf, int type, int handle, UUID uuid, int serviceHandle) { this.serverIf = serverIf; this.type = type; @@ -86,8 +98,9 @@ class HandleMap { mRequestMap.clear(); } - void addService(int serverIf, int handle, UUID uuid, int serviceType, int instance) { - mEntries.add(new Entry(serverIf, handle, uuid, serviceType, instance)); + void addService(int serverIf, int handle, UUID uuid, int serviceType, int instance, + boolean advertisePreferred) { + mEntries.add(new Entry(serverIf, handle, uuid, serviceType, instance, advertisePreferred)); } void addCharacteristic(int serverIf, int handle, UUID uuid, int serviceHandle) { diff --git a/src/com/android/bluetooth/gatt/ServiceDeclaration.java b/src/com/android/bluetooth/gatt/ServiceDeclaration.java index 0c9a51b2f..1d0bc4e90 100644 --- a/src/com/android/bluetooth/gatt/ServiceDeclaration.java +++ b/src/com/android/bluetooth/gatt/ServiceDeclaration.java @@ -39,6 +39,7 @@ class ServiceDeclaration { int properties = 0; int serviceType = 0; int serviceHandle = 0; + boolean advertisePreferred = false; Entry(UUID uuid, int serviceType, int instance) { this.type = TYPE_SERVICE; @@ -47,6 +48,14 @@ class ServiceDeclaration { this.serviceType = serviceType; } + Entry(UUID uuid, int serviceType, int instance, boolean advertisePreferred) { + this.type = TYPE_SERVICE; + this.uuid = uuid; + this.instance = instance; + this.serviceType = serviceType; + this.advertisePreferred = advertisePreferred; + } + Entry(UUID uuid, int properties, int permissions, int instance) { this.type = TYPE_CHARACTERISTIC; this.uuid = uuid; @@ -69,8 +78,9 @@ class ServiceDeclaration { mEntries = new ArrayList<Entry>(); } - void addService(UUID uuid, int serviceType, int instance, int minHandles) { - mEntries.add(new Entry(uuid, serviceType, instance)); + void addService(UUID uuid, int serviceType, int instance, int minHandles, + boolean advertisePreferred) { + mEntries.add(new Entry(uuid, serviceType, instance, advertisePreferred)); if (minHandles == 0) { ++mNumHandles; } else { @@ -102,6 +112,15 @@ class ServiceDeclaration { return entry; } + boolean isServiceAdvertisePreferred(UUID uuid) { + for (Entry entry : mEntries) { + if (entry.uuid.equals(uuid)) { + return entry.advertisePreferred; + } + } + return false; + } + int getNumHandles() { return mNumHandles; } diff --git a/src/com/android/bluetooth/map/BluetoothMapContent.java b/src/com/android/bluetooth/map/BluetoothMapContent.java index 19447980c..6710f3414 100644 --- a/src/com/android/bluetooth/map/BluetoothMapContent.java +++ b/src/com/android/bluetooth/map/BluetoothMapContent.java @@ -41,6 +41,8 @@ import android.provider.Telephony.Threads; import android.telephony.TelephonyManager; import android.util.Log; import android.text.format.Time; +import android.text.util.Rfc822Token; +import android.text.util.Rfc822Tokenizer; import android.util.TimeFormatException; import com.android.emailcommon.provider.EmailContent; import com.android.emailcommon.provider.EmailContent.Message; @@ -50,10 +52,11 @@ import com.android.emailcommon.provider.EmailContent.SyncColumns; import com.android.bluetooth.map.BluetoothMapUtils.TYPE; import com.google.android.mms.pdu.CharacterSets; +import com.google.android.mms.pdu.PduHeaders; import android.database.sqlite.SQLiteException; -import java.util.List; -import java.util.ArrayList; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.apache.commons.codec.net.QuotedPrintableCodec; import org.apache.commons.codec.DecoderException; @@ -264,7 +267,7 @@ public class BluetoothMapContent { selection, null, null); - if (c.moveToFirst()) { + if (c !=null && c.moveToFirst()) { do { String add = c.getString(c.getColumnIndex("address")); Integer type = c.getInt(c.getColumnIndex("type")); @@ -313,7 +316,7 @@ public class BluetoothMapContent { null, null); if (D) Log.d(TAG, " parts:"); - if (c.moveToFirst()) { + if (c !=null && c.moveToFirst()) { do { Long partid = c.getLong(c.getColumnIndex(BaseColumns._ID)); String ct = c.getString(c.getColumnIndex("ct")); @@ -357,9 +360,9 @@ public class BluetoothMapContent { printMmsAddr(id); printMmsParts(id); } + c.close(); } else { Log.d(TAG, "query failed"); - c.close(); } } @@ -374,9 +377,9 @@ public class BluetoothMapContent { while (c.moveToNext()) { printSms(c); } + c.close(); } else { Log.d(TAG, "query failed"); - c.close(); } } @@ -561,8 +564,15 @@ public class BluetoothMapContent { private void setPriority(BluetoothMapMessageListingElement e, Cursor c, FilterInfo fi, BluetoothMapAppParams ap) { + String priority = "no"; if ((ap.getParameterMask() & MASK_PRIORITY) != 0) { - String priority = "no"; + int pri = 0; + if (fi.msgType == FilterInfo.TYPE_MMS) { + pri = c.getInt(c.getColumnIndex(Mms.PRIORITY)); + } + if (pri == PduHeaders.PRIORITY_HIGH) { + priority = "yes"; + } if (D) Log.d(TAG, "setPriority: " + priority); e.setPriority(priority); } @@ -714,7 +724,7 @@ public class BluetoothMapContent { } else { int toIndex = c.getColumnIndex(MessageColumns.TO_LIST); address = c.getString(toIndex); - if (address.contains("")) { + if (address != null && address.contains("")) { String[] recepientAddrStr = address.split(""); if (recepientAddrStr !=null && recepientAddrStr.length > 0) { if (V){ @@ -724,7 +734,7 @@ public class BluetoothMapContent { e.setRecipientAddressing(recepientAddrStr[0].trim()); } } else { if (D) Log.d(TAG, "setRecipientAddressing: " + address); - e.setRecipientAddressing(address.trim()); + e.setRecipientAddressing(address); } return; } @@ -1035,7 +1045,9 @@ public class BluetoothMapContent { name = c.getString(c.getColumnIndex(Contacts.DISPLAY_NAME)); } - c.close(); + if (c != null) { + c.close(); + } return name; } @@ -1450,9 +1462,13 @@ public class BluetoothMapContent { if (!c.isLast()) { where += " OR "; } - p.close(); + if (p != null) { + p.close(); + } + } + if (c != null) { + c.close(); } - c.close(); if (str != null && str.length() > 0) { if (where.length() > 0) { @@ -1499,6 +1515,23 @@ public class BluetoothMapContent { return where; } + private String setWhereFilterPriority(BluetoothMapAppParams ap, FilterInfo fi) { + String where = ""; + int pri = ap.getFilterPriority(); + /*only MMS have priority info */ + if(fi.msgType == FilterInfo.TYPE_MMS) + { + if(pri == 0x0002) + { + where += " AND " + Mms.PRIORITY + "<=" + + Integer.toString(PduHeaders.PRIORITY_NORMAL); + }else if(pri == 0x0001) { + where += " AND " + Mms.PRIORITY + "=" + + Integer.toString(PduHeaders.PRIORITY_HIGH); + } + } + return where; + } private String setWhereFilterRecipient(BluetoothMapAppParams ap, FilterInfo fi) { @@ -1565,6 +1598,7 @@ public class BluetoothMapContent { where += setWhereFilterFolderType(folder, fi); where += setWhereFilterReadStatus(ap, fi); where += setWhereFilterPeriod(ap, fi); + where += setWhereFilterPriority(ap,fi); /* where += setWhereFilterOriginator(ap, fi); */ /* where += setWhereFilterRecipient(ap, fi); */ @@ -1706,6 +1740,76 @@ public class BluetoothMapContent { return folderName; } + /** + * Since email app returns addresses as RFC822 formatted strings and Rfc822Tokens are expected + * this will tear apart the string to return the components we want to put into + * an Rfc822Token + * @param part = what you want to return: "name" or "address": returns null if neither + * @param emailString = raw string from the email provider that is RFC822 formatted + * @return string type of the requested part + */ + private String deTokenizeEmail (String part, String emailString) { + final Matcher sEmailMatcher = + Pattern.compile("\\\"?([^\"<]*?)\\\"?\\s*<(.*)>").matcher(""); + String name, address; + Matcher m = sEmailMatcher.reset(emailString.trim()); + if (m.matches()) { + name = m.group(1); + address = m.group(2); + if (name == null) { + name = ""; + } else { + name = Html.fromHtml(name.trim()).toString(); + } + if (address == null) { + address = ""; + } else { + address = Html.fromHtml(address).toString(); + } + } else { + // Try and tokenize the string + final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(emailString.trim()); + if (tokens.length > 0) { + final String tokenizedName = tokens[0].getName(); + name = tokenizedName != null ? Html.fromHtml(tokenizedName.trim()).toString() : ""; + address = Html.fromHtml(tokens[0].getAddress()).toString(); + } else { + name = ""; + address = Html.fromHtml(emailString.trim()).toString(); + } + } + String output = null; + if (part == "name") { + output = name.replace("'", ""); //single quote from gmail likes to slip through + } + else if (part == "address") { + output = address; + } + return output; + } + + private String getNameFromEmail(String emailAddress) { + String contactName = null; + Cursor p; + + Uri uri = Uri.withAppendedPath(ContactsContract.CommonDataKinds.Email.CONTENT_LOOKUP_URI, + Uri.encode(emailAddress)); + + String[] projection = {Contacts._ID, Contacts.DISPLAY_NAME}; + String selection = Contacts.IN_VISIBLE_GROUP + "=1"; + String orderBy = Contacts._ID + " ASC"; + + // Get the contact _ID and name + p = mResolver.query(uri, projection, selection, null, orderBy); + if (p != null && p.getCount() >= 1) { + //Resolved an email to a contact so lets use it + p.moveToFirst(); + contactName = p.getString(p.getColumnIndex(Contacts.DISPLAY_NAME)); + if(V) Log.v(TAG,"Phone book lookup resolved " + emailAddress + " to " + contactName); + } + p.close(); + return contactName; + } private void extractEmailAddresses(long id, BluetoothMapbMessageMmsEmail message) { if (V) Log.v(TAG, "extractEmailAddresses with id " + id); @@ -1713,23 +1817,34 @@ public class BluetoothMapContent { Uri uriEmail = Uri.parse(urlEmail); StringTokenizer emailId; String tempEmail = null; + String emailComponent, nameComponent = null, contactsName; Cursor c = mResolver.query(uriEmail, EMAIL_PROJECTION, "_id = " + id, null, null); if (c != null && c.moveToFirst()) { String senderName = null; if((senderName = c.getString(c.getColumnIndex(MessageColumns.FROM_LIST))) != null ) { if(V) Log.v(TAG, " senderName " + senderName); if(senderName.contains("")){ - String[] senderStr = senderName.split(""); - if(senderStr !=null && senderStr.length > 0){ - if(V) Log.v(TAG, " senderStr[1] " + senderStr[1].trim()); - if(V) Log.v(TAG, " senderStr[0] " + senderStr[0].trim()); - setVCardFromEmailAddress(message, senderStr[1].trim(), true); - message.addFrom(null, senderStr[0].trim()); - } + String[] senderStr = senderName.split(""); + if(senderStr !=null && senderStr.length > 0){ + emailComponent = senderStr[1].trim(); //should be email + nameComponent = senderStr[0].trim(); //should be name + if(V){ + Log.v(TAG, " senderStr[1] " + emailComponent); + Log.v(TAG, " senderStr[0] " + nameComponent); + } + contactsName = getNameFromEmail(emailComponent); + if (contactsName != null) nameComponent = contactsName; + setVCardFromEmailAddress(message, nameComponent, emailComponent, true); + message.addFrom(nameComponent,emailComponent); + } } else { - if(V) Log.v(TAG, " senderStr is" + senderName.trim()); - setVCardFromEmailAddress(message, senderName.trim(), true); - message.addFrom(null, senderName.trim()); + if(V) Log.v(TAG, " senderStr is" + senderName.trim()); + nameComponent = deTokenizeEmail("name", senderName.trim()); + emailComponent = deTokenizeEmail("address", senderName.trim()); + contactsName = getNameFromEmail(emailComponent); + if (contactsName != null) nameComponent = contactsName; + setVCardFromEmailAddress(message, nameComponent, emailComponent, true); + message.addFrom(nameComponent,emailComponent); } } String recipientName = null; @@ -1737,48 +1852,66 @@ public class BluetoothMapContent { if((recipientName = c.getString(c.getColumnIndex(MessageColumns.TO_LIST))) != null){ if(V) Log.v(TAG, " recipientName " + recipientName); if(recipientName.contains("")){ - String[] recepientStr = recipientName.split(""); - if(recepientStr !=null && recepientStr.length > 0){ - if (V){ - Log.v(TAG, " recepientStr[1] " + recepientStr[1].trim()); - Log.v(TAG, " recepientStr[0] " + recepientStr[0].trim()); - } - setVCardFromEmailAddress(message, recepientStr[1].trim(), false); - message.addTo(recepientStr[1].trim(), recepientStr[0].trim()); - } + String[] recepientStr = recipientName.split(""); + if(recepientStr !=null && recepientStr.length > 0){ + emailComponent = recepientStr[1].trim(); //should be email + nameComponent = recepientStr[0].trim(); //should be name + if (V){ + Log.v(TAG, " recepientStr[1] " + emailComponent); + Log.v(TAG, " recepientStr[0] " + nameComponent); + } + contactsName = getNameFromEmail(emailComponent); + if (contactsName != null) nameComponent = contactsName; + setVCardFromEmailAddress(message, nameComponent, emailComponent, false); + message.addTo(nameComponent,emailComponent); + } } else if(recipientName.contains("")){ - multiRecepients = recipientName.replace('', ';'); - if(multiRecepients != null){ - if (V){ - Log.v(TAG, " Setting ::Recepient name :: " + multiRecepients.trim()); - } - emailId = new StringTokenizer(multiRecepients.trim(),";"); - do { - setVCardFromEmailAddress(message, emailId.nextElement().toString(), false); - } while(emailId.hasMoreElements()); - - message.addTo(multiRecepients.trim(), multiRecepients.trim()); - } + multiRecepients = recipientName.replace('', ';'); + if(multiRecepients != null){ + if (V){ + Log.v(TAG, " Setting::M Recepient name: " + multiRecepients.trim()); + } + emailId = new StringTokenizer(multiRecepients.trim(),";"); + do { + tempEmail = emailId.nextElement().toString(); + nameComponent = deTokenizeEmail("name", tempEmail); + emailComponent = deTokenizeEmail("address", tempEmail); + contactsName = getNameFromEmail(emailComponent); + if (contactsName != null) nameComponent = contactsName; + setVCardFromEmailAddress(message, nameComponent, emailComponent, + false); + message.addTo(nameComponent,emailComponent); + } while(emailId.hasMoreElements()); + } } else if(recipientName.contains(",")){ - multiRecepients = recipientName.replace(',', ';'); - if(multiRecepients != null){ - if (V){ - Log.v(TAG, "Setting ::Recepient name :: " + multiRecepients.trim()); - } - emailId = new StringTokenizer(multiRecepients.trim(),";"); - do { + multiRecepients = recipientName.replace(", \"", "; \""); + if(multiRecepients != null){ + if (V){ + Log.v(TAG, "Setting::M2 Recepient name : " + multiRecepients.trim()); + } + emailId = new StringTokenizer(multiRecepients.trim(),";"); + do { tempEmail = emailId.nextElement().toString(); - setVCardFromEmailAddress(message, tempEmail, false); - message.addTo(null, tempEmail); - } while(emailId.hasMoreElements()); - } + nameComponent = deTokenizeEmail("name", tempEmail); + emailComponent = deTokenizeEmail("address", tempEmail); + contactsName = getNameFromEmail(emailComponent); + if (contactsName != null) nameComponent = contactsName; + setVCardFromEmailAddress(message, nameComponent, emailComponent, + false); + message.addTo(nameComponent,emailComponent); + } while(emailId.hasMoreElements()); + } } else { - Log.v(TAG, " Setting ::Recepient name :: " + recipientName.trim()); - setVCardFromEmailAddress(message, recipientName.trim(), false); - message.addTo(null, recipientName.trim()); - } - } - } + Log.v(TAG, " Setting ::Single Recepient name :: " + recipientName.trim()); + nameComponent = deTokenizeEmail("name", recipientName.trim()); + emailComponent = deTokenizeEmail("address", recipientName.trim()); + contactsName = getNameFromEmail(emailComponent); + if (contactsName != null) nameComponent = contactsName; + setVCardFromEmailAddress(message, nameComponent, emailComponent, false); + message.addTo(nameComponent,emailComponent); + } + } + } } /** @@ -2055,21 +2188,22 @@ public class BluetoothMapContent { if (smsSelected(fi, ap)) { fi.msgType = FilterInfo.TYPE_SMS; + if(ap.getFilterPriority() != 1){ /*SMS cannot have high priority*/ + String where = setWhereFilter(folder, fi, ap); - String where = setWhereFilter(folder, fi, ap); - - Cursor c = mResolver.query(Sms.CONTENT_URI, - SMS_PROJECTION, where, null, "date DESC"); + Cursor c = mResolver.query(Sms.CONTENT_URI, + SMS_PROJECTION, where, null, "date DESC"); - if (c != null) { - while (c.moveToNext()) { - if (matchAddresses(c, fi, ap)) { - printSms(c); - e = element(c, fi, ap); - bmList.add(e); + if (c != null) { + while (c.moveToNext()) { + if (matchAddresses(c, fi, ap)) { + printSms(c); + e = element(c, fi, ap); + bmList.add(e); + } } + c.close(); } - c.close(); } } @@ -2156,7 +2290,7 @@ public class BluetoothMapContent { where += " AND read=0 "; where += setWhereFilterPeriod(ap, fi); Cursor c = mResolver.query(Sms.CONTENT_URI, - SMS_PROJECTION, where, null, "date DESC"); + SMS_PROJECTION, where, null, "date DESC"); if (c != null) { cnt = c.getCount(); @@ -2237,24 +2371,21 @@ public class BluetoothMapContent { throw new IllegalArgumentException("Invalid message handle."); } - private void setVCardFromEmailAddress(BluetoothMapbMessage message, String emailAddr, boolean incoming) { - if(D) Log.d(TAG, "setVCardFromEmailAddress, emailAdress is " +emailAddr); - String contactId = null, contactName = null; + private void setVCardFromEmailAddress(BluetoothMapbMessage message, + String contactName, String emailAddress, boolean incoming) { + if(D) Log.d(TAG, "setVCardFromEmailAddress, emailAdress is " +emailAddress); String[] phoneNumbers = {""}; String[] emailAddresses = new String[1]; - StringTokenizer emailId; - Cursor p; - if(incoming == true) { - emailAddresses[0] = emailAddr; - if(V) Log.v(TAG,"Adding addOriginator " + emailAddresses[0]); - message.addOriginator(emailAddr, phoneNumbers, emailAddresses); + emailAddresses[0] = emailAddress; + if(V) Log.v(TAG,"Adding addOriginator " + contactName + " " + emailAddresses[0]); + message.addOriginator(contactName, phoneNumbers, emailAddresses); } else { - emailAddresses[0] = emailAddr; - if(V) Log.v(TAG,"Adding Receipient " + emailAddresses[0]); - message.addRecipient(emailAddr, phoneNumbers, emailAddresses); + emailAddresses[0] = emailAddress; + if(V) Log.v(TAG,"Adding Receipient " + contactName + " " + emailAddresses[0]); + message.addRecipient(contactName, phoneNumbers, emailAddresses); } } @@ -2278,7 +2409,8 @@ public class BluetoothMapContent { contactId = p.getString(p.getColumnIndex(Contacts._ID)); contactName = p.getString(p.getColumnIndex(Contacts.DISPLAY_NAME)); } - p.close(); + if (p != null) + p.close(); // The phone number we got is the one we will use phoneNumbers = new String[1]; @@ -2377,7 +2509,7 @@ public class BluetoothMapContent { selection, null, null); /* TODO: Change the setVCard...() to return the vCard, and use the name in message.addXxx() */ - if (c.moveToFirst()) { + if (c != null && c.moveToFirst()) { do { String address = c.getString(c.getColumnIndex("address")); Integer type = c.getInt(c.getColumnIndex("type")); @@ -2458,7 +2590,7 @@ public class BluetoothMapContent { selection, null, null); - if (c.moveToFirst()) { + if (c != null && c.moveToFirst()) { do { Long partId = c.getLong(c.getColumnIndex(BaseColumns._ID)); String contentType = c.getString(c.getColumnIndex("ct")); diff --git a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java index 12203a13f..c66a03dbe 100644 --- a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java +++ b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java @@ -1198,7 +1198,7 @@ public class BluetoothMapContentObserver { Cursor cursor = mResolver.query(msgInfo.uri, ID_PROJECTION, null, null, null); try { - if (cursor.moveToFirst()) { + if (cursor != null && cursor.moveToFirst()) { int messageId = cursor.getInt(0); Uri updateUri = ContentUris.withAppendedId(UPDATE_STATUS_URI, messageId); @@ -1216,7 +1216,8 @@ public class BluetoothMapContentObserver { Log.d(TAG, "Can't find message for status update: " + messageUri); } } finally { - cursor.close(); + if (cursor != null) + cursor.close(); } if (status == 0) { diff --git a/src/com/android/bluetooth/map/BluetoothMapService.java b/src/com/android/bluetooth/map/BluetoothMapService.java index e94af3d30..262ab70f4 100644 --- a/src/com/android/bluetooth/map/BluetoothMapService.java +++ b/src/com/android/bluetooth/map/BluetoothMapService.java @@ -273,17 +273,19 @@ public class BluetoothMapService extends ProfileService { Set<BluetoothDevice> bondedDevices = mAdapter.getBondedDevices(); int connectionState; synchronized (this) { - for (BluetoothDevice device : bondedDevices) { - ParcelUuid[] featureUuids = device.getUuids(); - if (!BluetoothUuid.containsAnyUuid(featureUuids, MAP_UUIDS)) { - continue; - } - connectionState = getConnectionState(device); - for(int i = 0; i < states.length; i++) { - if (connectionState == states[i]) { - deviceList.add(device); - } - } + if (bondedDevices != null) { + for (BluetoothDevice device : bondedDevices) { + ParcelUuid[] featureUuids = device.getUuids(); + if (!BluetoothUuid.containsAnyUuid(featureUuids, MAP_UUIDS)) { + continue; + } + connectionState = getConnectionState(device); + for(int i = 0; i < states.length; i++) { + if (connectionState == states[i]) { + deviceList.add(device); + } + } + } } } return deviceList; diff --git a/src/com/android/bluetooth/map/BluetoothMapbMessageMmsEmail.java b/src/com/android/bluetooth/map/BluetoothMapbMessageMmsEmail.java index 84f9c511e..86692be27 100644 --- a/src/com/android/bluetooth/map/BluetoothMapbMessageMmsEmail.java +++ b/src/com/android/bluetooth/map/BluetoothMapbMessageMmsEmail.java @@ -53,45 +53,29 @@ public class BluetoothMapbMessageMmsEmail extends BluetoothMapbMessage { public void encode(StringBuilder sb, String boundaryTag, boolean last) throws UnsupportedEncodingException { - sb.append("--").append(boundaryTag).append("\r\n"); - if(contentType != null) - sb.append("Content-Type: ").append(contentType); - if(charsetName != null) - sb.append("; ").append("charset=\"").append(charsetName).append("\""); - sb.append("\r\n"); - if(contentLocation != null) - sb.append("Content-Location: ").append(contentLocation).append("\r\n"); - if(contentId != null) - sb.append("Content-ID: ").append(contentId).append("\r\n"); - if(contentDisposition != null) - sb.append("Content-Disposition: ").append(contentDisposition).append("\r\n"); - if(data != null) { + if(data != null) { /* TODO: If errata 4176 is adopted in the current form (it is not in either 1.1 or 1.2), the below is not allowed, Base64 should be used for text. */ if(contentType != null && (contentType.toUpperCase().contains("TEXT") || contentType.toUpperCase().contains("SMIL") )) { - sb.append("Content-Transfer-Encoding: 8BIT\r\n\r\n"); // Add the header split empty line sb.append(new String(data,"UTF-8")).append("\r\n"); } else { - sb.append("Content-Transfer-Encoding: Base64\r\n\r\n"); // Add the header split empty line sb.append(Base64.encodeToString(data, Base64.DEFAULT)).append("\r\n"); } } if(last) { - sb.append("--").append(boundaryTag).append("--").append("\r\n"); + sb.append("\r\n"); } } public void encodePlainText(StringBuilder sb) throws UnsupportedEncodingException { if(contentType != null && contentType.toUpperCase().contains("TEXT")) { - sb.append(contentType).append("\r\n"); - sb.append("Content-Transfer-Encoding: 8bit").append("\r\n"); - sb.append("Content-Disposition:inline").append("\r\n") - .append("\r\n"); - sb.append(new String(data,"UTF-8")).append("\r\n"); + if(data != null) { + sb.append(new String(data,"UTF-8")).append("\r\n"); + } } else if(contentType != null && contentType.toUpperCase().contains("/SMIL")) { /* Skip the smil.xml, as no-one knows what it is. */ } else { @@ -388,14 +372,6 @@ public class BluetoothMapbMessageMmsEmail extends BluetoothMapbMessage { String boundary = "MessageBoundary."+randomInt; encodeHeaders(sb); - sb.append("Mime-Version: 1.0").append("\r\n"); - sb.append( - "Content-Type: multipart/mixed; boundary=\""+boundary+"\"") - .append("\r\n"); - sb.append("Content-Transfer-Encoding: 8bit").append("\r\n") - .append("\r\n"); - sb.append("MIME Message").append("\r\n"); - sb.append("--"+boundary).append("\r\n"); Log.v(TAG, "after encode header sb is "+ sb.toString()); @@ -403,7 +379,6 @@ public class BluetoothMapbMessageMmsEmail extends BluetoothMapbMessage { if(getIncludeAttachments() == false) { for(MimePart part : parts) { part.encodePlainText(sb); /* We call encode on all parts, to include a tag, where an attachment is missing. */ - sb.append("--"+boundary+"--").append("\r\n"); } } else { for(MimePart part : parts) { diff --git a/src/com/android/bluetooth/opp/BluetoothOppNotification.java b/src/com/android/bluetooth/opp/BluetoothOppNotification.java index 28e3fb909..c0061183e 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppNotification.java +++ b/src/com/android/bluetooth/opp/BluetoothOppNotification.java @@ -112,6 +112,7 @@ class BluetoothOppNotification { private int mInboundActiveNotificationId = 0; private int mOutboundActiveNotificationId = 0; + private int mIncomingShownId = 0; /** * This inner class is used to describe some properties for one transfer. @@ -596,27 +597,30 @@ class BluetoothOppNotification { long timeStamp = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id); - Notification n = new Notification(); - n.icon = R.drawable.bt_incomming_file_notification; - n.flags |= Notification.FLAG_ONLY_ALERT_ONCE; - n.flags |= Notification.FLAG_ONGOING_EVENT; - n.defaults = Notification.DEFAULT_SOUND; - n.tickerText = title; + if (mIncomingShownId != id) { + Notification n = new Notification(); + n.icon = R.drawable.bt_incomming_file_notification; + n.flags |= Notification.FLAG_ONLY_ALERT_ONCE; + n.flags |= Notification.FLAG_ONGOING_EVENT; + n.defaults = Notification.DEFAULT_SOUND; + n.tickerText = title; - Intent intent = new Intent(Constants.ACTION_INCOMING_FILE_CONFIRM); - intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName()); - intent.setDataAndNormalize(contentUri); + Intent intent = new Intent(Constants.ACTION_INCOMING_FILE_CONFIRM); + intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName()); + intent.setDataAndNormalize(contentUri); - n.when = timeStamp; - n.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(mContext, 0, + n.when = timeStamp; + n.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(mContext, 0, intent, 0)); - intent = new Intent(Constants.ACTION_HIDE); - intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName()); - intent.setDataAndNormalize(contentUri); - n.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0); + intent = new Intent(Constants.ACTION_HIDE); + intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName()); + intent.setDataAndNormalize(contentUri); + n.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0); - mNotificationMgr.notify(id, n); + mNotificationMgr.notify(id, n); + mIncomingShownId = id; + } } cursor.close(); if (V) Log.v(TAG, "Freeing cursor: " + cursor); diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java index 8e7b836c6..945d5475c 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppService.java +++ b/src/com/android/bluetooth/opp/BluetoothOppService.java @@ -886,11 +886,20 @@ public class BluetoothOppService extends Service { if (V) Log.v(TAG, "Service cancel batch for share " + info.mId); batch.cancelBatch(); } - if (mTransfer != null) { - if (V) Log.v(TAG, "Stop transfer session"); + + /* Server/Client transfer cleanup */ + if ((batch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) + && (mTransfer != null)) { + if (V) Log.v(TAG, "Stop Client Transfer"); mTransfer.stop(); mTransfer = null; + } else if ((batch.mDirection == BluetoothShare.DIRECTION_INBOUND) + && (mServerTransfer != null)) { + if (V) Log.v(TAG, "Stop Server Transfer"); + mServerTransfer.stop(); + mServerTransfer = null; } + if (batch.isEmpty()) { if (V) Log.v(TAG, "Service remove batch " + batch.mId); removeBatch(batch); diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapService.java b/src/com/android/bluetooth/pbap/BluetoothPbapService.java index d73781480..fd53ceb1b 100644 --- a/src/com/android/bluetooth/pbap/BluetoothPbapService.java +++ b/src/com/android/bluetooth/pbap/BluetoothPbapService.java @@ -49,6 +49,7 @@ import android.bluetooth.BluetoothUuid; import android.content.Context; import android.content.Intent; import android.os.Handler; +import android.os.PowerManager; import android.os.IBinder; import android.os.Message; import android.os.RemoteException; @@ -162,6 +163,8 @@ public class BluetoothPbapService extends Service { private static String sRemoteDeviceName = null; + private PowerManager.WakeLock mFullWakeLock = null; + private boolean mHasStarted = false; private volatile boolean mInterrupted; @@ -559,6 +562,7 @@ public class BluetoothPbapService extends Service { sRemoteDeviceName = getString(R.string.defaultname); } + acquirePbapWakeLock(); Intent intent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST); intent.setClassName(ACCESS_AUTHORITY_PACKAGE, ACCESS_AUTHORITY_CLASS); @@ -579,6 +583,8 @@ public class BluetoothPbapService extends Service { // phonebook access, while UI still there waiting for user to confirm mSessionStatusHandler.sendMessageDelayed(mSessionStatusHandler .obtainMessage(USER_TIMEOUT), USER_CONFIRM_TIMEOUT_VALUE); + + releasePbapWakeLock(); stopped = true; // job done ,close this thread; } catch (IOException ex) { stopped=true; @@ -721,6 +727,32 @@ public class BluetoothPbapService extends Service { return sRemoteDeviceName; } + private void acquirePbapWakeLock() { + if (mFullWakeLock == null) { + PowerManager pm = (PowerManager) this.getSystemService(Context.POWER_SERVICE); + mFullWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP + | PowerManager.ON_AFTER_RELEASE, "StartingObexPbapTransaction"); + mFullWakeLock.setReferenceCounted(false); + + mFullWakeLock.acquire(); + if (VERBOSE) Log.v(TAG, "Pbap: mFullWakeLock acquired"); + } else { + Log.e(TAG, "Pbap:mFullWakeLock already acquired"); + } + } + + private void releasePbapWakeLock() { + if (mFullWakeLock != null) { + if (mFullWakeLock.isHeld()) { + mFullWakeLock.release(); + if (VERBOSE) Log.v(TAG, "Pbap: mFullWakeLock released"); + } else { + if (VERBOSE) Log.v(TAG, "Pbap: mFullWakeLock already released"); + } + mFullWakeLock = null; + } + } + /** * Handlers for incoming service calls */ diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml index a9fc19c6f..c022b22cc 100755 --- a/tests/AndroidManifest.xml +++ b/tests/AndroidManifest.xml @@ -49,7 +49,7 @@ <application> <uses-library android:name="android.test.runner" /> <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" /> - <uses-permission android:permission="com.android.permission.WHITELIST_BLUETOOTH_DEVICE" /> + <uses-permission android:name="com.android.permission.WHITELIST_BLUETOOTH_DEVICE" /> <path-permission android:path="/btopp" android:permission="android.permission.ACCESS_BLUETOOTH_SHARE" /> |