Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8caae26b authored by Dan Pasanen's avatar Dan Pasanen
Browse files

Merge tag 'android-7.1.2_r2' into cm-14.1

Android 7.1.2 Release 2 (N2G47E)

Change-Id: I7a3e271db2f0e1e35a069906b9b7904e1e1fd7fe
parents f4196b3b 971d02c0
Loading
Loading
Loading
Loading
+63 −3
Original line number Diff line number Diff line
@@ -32,8 +32,11 @@
#include <fcntl.h>

namespace android {

// OOB_LE_BD_ADDR_SIZE is 6 bytes addres + 1 byte address type
#define OOB_LE_BD_ADDR_SIZE 7
#define OOB_TK_SIZE 16
#define OOB_LE_SC_C_SIZE 16
#define OOB_LE_SC_R_SIZE 16

#define ADDITIONAL_NREFS 50
static jmethodID method_stateChangeCallback;
@@ -892,19 +895,67 @@ static jboolean createBondOutOfBandNative(JNIEnv* env, jobject obj, jbyteArray a
        return result;
    }

    jbyte* leBtDeviceAddressBytes = NULL;
    jbyte* smTKBytes = NULL;
    jbyteArray smTK = callByteArrayGetter(env, oobData, "android/bluetooth/OobData", "getSecurityManagerTk");
    jbyte* leScCBytes = NULL;
    jbyte* leScRBytes = NULL;
    jbyteArray leBtDeviceAddress = NULL;
    jbyteArray smTK = NULL;
    jbyteArray leScC = NULL;
    jbyteArray leScR = NULL;

    leBtDeviceAddress = callByteArrayGetter(env, oobData, "android/bluetooth/OobData", "getLeBluetoothDeviceAddress");
    if (leBtDeviceAddress != NULL) {
        leBtDeviceAddressBytes = env->GetByteArrayElements(leBtDeviceAddress, NULL);
        int len = env->GetArrayLength(leBtDeviceAddress);
        if (len != OOB_LE_BD_ADDR_SIZE) {
            ALOGI("%s: wrong length of leBtDeviceAddress, should be empty or %d bytes.", __func__, OOB_LE_BD_ADDR_SIZE);
            jniThrowIOException(env, EINVAL);
            goto done;
        }
        memcpy(oob_data.le_bt_dev_addr, leBtDeviceAddressBytes, len);
    }

    smTK = callByteArrayGetter(env, oobData, "android/bluetooth/OobData", "getSecurityManagerTk");
    if (smTK != NULL) {
        smTKBytes = env->GetByteArrayElements(smTK, NULL);
        int len = env->GetArrayLength(smTK);
        if (len != OOB_TK_SIZE) {
            ALOGI("%s: wrong length of smTK, should be empty or %d bytes.", __FUNCTION__, OOB_TK_SIZE);
            ALOGI("%s: wrong length of smTK, should be empty or %d bytes.", __func__, OOB_TK_SIZE);
            jniThrowIOException(env, EINVAL);
            goto done;
        }
        memcpy(oob_data.sm_tk, smTKBytes, len);
    }

    leScC = callByteArrayGetter(env, oobData, "android/bluetooth/OobData",
                                           "getLeSecureConnectionsConfirmation");
    if (leScC != NULL) {
        leScCBytes = env->GetByteArrayElements(leScC, NULL);
        int len = env->GetArrayLength(leScC);
        if (len != OOB_LE_SC_C_SIZE) {
            ALOGI("%s: wrong length of LE SC Confirmation, should be empty or %d bytes.",
                    __func__, OOB_LE_SC_C_SIZE);
            jniThrowIOException(env, EINVAL);
            goto done;
        }
        memcpy(oob_data.le_sc_c, leScCBytes, len);
    }

    leScR = callByteArrayGetter(env, oobData, "android/bluetooth/OobData",
                                           "getLeSecureConnectionsRandom");
    if (leScR != NULL) {
        leScRBytes = env->GetByteArrayElements(leScR, NULL);
        int len = env->GetArrayLength(leScR);
        if (len != OOB_LE_SC_R_SIZE) {
            ALOGI("%s: wrong length of LE SC Random, should be empty or %d bytes.",
                  __func__, OOB_LE_SC_R_SIZE);
            jniThrowIOException(env, EINVAL);
            goto done;
        }
        memcpy(oob_data.le_sc_r, leScRBytes, len);
    }

    if (sBluetoothInterface->create_bond_out_of_band((bt_bdaddr_t *)addr, transport, &oob_data)
        == BT_STATUS_SUCCESS)
        result = JNI_TRUE;
@@ -912,9 +963,18 @@ static jboolean createBondOutOfBandNative(JNIEnv* env, jobject obj, jbyteArray a
done:
    env->ReleaseByteArrayElements(address, addr, 0);

    if (leBtDeviceAddress != NULL)
        env->ReleaseByteArrayElements(leBtDeviceAddress, leBtDeviceAddressBytes, 0);

    if (smTK != NULL)
        env->ReleaseByteArrayElements(smTK, smTKBytes, 0);

    if (leScC != NULL)
        env->ReleaseByteArrayElements(leScC, leScCBytes, 0);

    if (leScR != NULL)
        env->ReleaseByteArrayElements(leScR, leScRBytes, 0);

    return result;
}

+2 −2
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@
    <string name="upload_succ_ok" msgid="7705428476405478828">"Potvrdi"</string>
    <string name="upload_fail_line1" msgid="7899394672421491701">"Datoteka nije poslata na <xliff:g id="RECIPIENT">%1$s</xliff:g>."</string>
    <string name="upload_fail_line1_2" msgid="2108129204050841798">"Datoteka: <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="upload_fail_ok" msgid="5807702461606714296">"Pokušaj ponovo"</string>
    <string name="upload_fail_ok" msgid="5807702461606714296">"Probaj ponovo"</string>
    <string name="upload_fail_cancel" msgid="9118496285835687125">"Zatvori"</string>
    <string name="bt_error_btn_ok" msgid="5965151173011534240">"Potvrdi"</string>
    <string name="unknown_file" msgid="6092727753965095366">"Nepoznata datoteka"</string>
@@ -87,7 +87,7 @@
    <string name="bt_sm_2_1" product="nosdcard" msgid="352165168004521000">"Nema dovoljno prostora u USB memoriji da bi se sačuvala datoteka pošiljaoca „<xliff:g id="SENDER">%1$s</xliff:g>“"</string>
    <string name="bt_sm_2_1" product="default" msgid="1989018443456803630">"Nema dovoljno prostora na SD kartici da bi se sačuvala datoteka pošiljaoca „<xliff:g id="SENDER">%1$s</xliff:g>“"</string>
    <string name="bt_sm_2_2" msgid="2965243265852680543">"Potreban prostor: <xliff:g id="SIZE">%1$s</xliff:g>"</string>
    <string name="ErrorTooManyRequests" msgid="8578277541472944529">"Previše zahteva se obrađuje. Pokušajte ponovo kasnije."</string>
    <string name="ErrorTooManyRequests" msgid="8578277541472944529">"Previše zahteva se obrađuje. Probajte ponovo kasnije."</string>
    <string name="status_pending" msgid="2503691772030877944">"Prenos datoteke još nije počeo."</string>
    <string name="status_running" msgid="6562808920311008696">"Prenos datoteke je u toku."</string>
    <string name="status_success" msgid="239573225847565868">"Prenos datoteke je dovršen."</string>
+2 −2
Original line number Diff line number Diff line
<?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="bluetooth_sap_notif_title" msgid="6877860822993195074">"ব্লুটুথ SIM -এ অ্যাক্সেস করুন"</string>
    <string name="bluetooth_sap_notif_ticker" msgid="6807778527893726699">"ব্লুটুথ SIM -এ অ্যাক্সেস করুন"</string>
    <string name="bluetooth_sap_notif_title" msgid="6877860822993195074">"ব্লুটুথ সিম -এ অ্যাক্সেস করুন"</string>
    <string name="bluetooth_sap_notif_ticker" msgid="6807778527893726699">"ব্লুটুথ সিম -এ অ্যাক্সেস করুন"</string>
    <string name="bluetooth_sap_notif_message" msgid="7138657801087500690">"ক্লায়েন্ট সংযোগ বিচ্ছিন্ন করার অনুরোধ জানাবেন?"</string>
    <string name="bluetooth_sap_notif_disconnecting" msgid="819150843490233288">"সংযোগ বিচ্ছিন্ন করতে ক্লায়েন্টের জন্য অপেক্ষা করা"</string>
    <string name="bluetooth_sap_notif_disconnect_button" msgid="3678476872583356919">"সংযোগ বিচ্ছিন্ন করুন"</string>
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
    <string name="notification_receiving" msgid="4674648179652543984">"Bluetooth dijeljenje: Prima se fajl <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_received" msgid="3324588019186687985">"Bluetooth dijeljenje: Primljen fajl <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_received_fail" msgid="3619350997285714746">"Bluetooth dijeljenje: Fajl <xliff:g id="FILE">%1$s</xliff:g> nije primljen"</string>
    <string name="notification_sending" msgid="3035748958534983833">"Bluetooth dijeljenje: Šalje se fajl <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_sending" msgid="3035748958534983833">"Bluetooth dijeljenje: Slanje fajla <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_sent" msgid="9218710861333027778">"Bluetooth dijeljenje: Poslan fajl <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_sent_complete" msgid="302943281067557969">"Dovršeno 100%"</string>
    <string name="notification_sent_fail" msgid="6696082233774569445">"Bluetooth dijeljenje: Fajl <xliff:g id="FILE">%1$s</xliff:g> nije poslan"</string>
+6 −6
Original line number Diff line number Diff line
@@ -38,13 +38,13 @@
    <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="5573329005298936903">"Εισερχόμενο αρχείο"</string>
    <string name="incoming_file_confirm_Notification_content" msgid="3359694069319644738">"Ο χρήστης <xliff:g id="SENDER">%1$s</xliff:g> πρόκειται να στείλει το αρχείο <xliff:g id="FILE">%2$s</xliff:g>"</string>
    <string name="notification_receiving" msgid="4674648179652543984">"Κοινή χρήση μέσω Bluetooth: Λήψη του <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_received" msgid="3324588019186687985">"Κοινή χρήση μέσω Bluetooth: Ελήφθη το <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_received_fail" msgid="3619350997285714746">"Κοινή χρήση μέσω Bluetooth: Το αρχείο <xliff:g id="FILE">%1$s</xliff:g> δεν ελήφθη"</string>
    <string name="notification_sending" msgid="3035748958534983833">"Κοινή χρήση μέσω Bluetooth: Αποστολή του <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_sent" msgid="9218710861333027778">"Κοινή χρήση μέσω Bluetooth: Εστάλη το <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_receiving" msgid="4674648179652543984">"Μοιραστείτε μέσω Bluetooth: Λήψη του <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_received" msgid="3324588019186687985">"Μοιραστείτε μέσω Bluetooth: Ελήφθη το <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_received_fail" msgid="3619350997285714746">"Μοιραστείτε μέσω Bluetooth: Το αρχείο <xliff:g id="FILE">%1$s</xliff:g> δεν ελήφθη"</string>
    <string name="notification_sending" msgid="3035748958534983833">"Μοιραστείτε μέσω Bluetooth: Αποστολή του <xliff:g id="FILE">%1$s</xliff:g>"</string>
    <string name="notification_sent" msgid="9218710861333027778">"Μοιραστείτε μέσω Bluetooth: Εστάλη το <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">"Κοινή χρήση μέσω Bluetooth: Το αρχείο <xliff:g id="FILE">%1$s</xliff:g> δεν εστάλη"</string>
    <string name="notification_sent_fail" msgid="6696082233774569445">"Μοιραστείτε μέσω Bluetooth: Το αρχείο <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>
Loading