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

Commit 038b2d7c authored by Jerome Gaillard's avatar Jerome Gaillard Committed by Android (Google) Code Review
Browse files

Merge "Use English locale for number format in layoutlib"

parents fc0321b1 d4c2ba1d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@
#include "jni.h"
#include "core_jni_helpers.h"

#include <sstream>
#include <iostream>
#include <unicode/putil.h>
#include <clocale>
#include <sstream>
#include <unordered_map>
#include <vector>

@@ -198,6 +198,8 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
    u_setDataDirectory(path);
    env->ReleaseStringUTFChars(stringPath, path);

    // Use English locale for number format to ensure correct parsing of floats when using strtof
    setlocale(LC_NUMERIC, "en_US.UTF-8");

    return JNI_VERSION_1_6;
}