commit | 2e31280c6ed2944b311b759d1c6a09afb63f21d7 | [log] [tgz] |
---|---|---|
author | Fredrik Roubert <roubert@google.com> | Tue Jul 04 21:53:08 2017 +0200 |
committer | Fredrik Roubert <roubert@google.com> | Mon Jul 17 13:16:20 2017 +0200 |
tree | be9fecd82188e2df777ba829ccdcfa8606cd8959 | |
parent | faaa80e17cdf8f043f15bc23d4cada11da3dacd6 [diff] |
Add JNI helper function jniCreateString(). In C++11, char16_t and uint16_t (which is what jchar is defined as) are two distinct types, even though they are bitwise identical, so to not require C++11 code using char16_t to always reinterpret_cast<uint16_t> the argument passed to JNIEnv::NewString(), this new helper function is overloaded to do the required cast when used in C++11. Bug: 37554848 Test: make Change-Id: I69632b0a7b822537cab77c43dc387d94917933b9