summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/jni/com_android_server_location_ContextHubService.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/core/jni/com_android_server_location_ContextHubService.cpp b/services/core/jni/com_android_server_location_ContextHubService.cpp
index c976fe55a922..d834e2527e08 100644
--- a/services/core/jni/com_android_server_location_ContextHubService.cpp
+++ b/services/core/jni/com_android_server_location_ContextHubService.cpp
@@ -929,15 +929,15 @@ jobject constructJContextHubInfo(JNIEnv *env, const ContextHub &hub) {
db.jniInfo.contextHubInfoCtor);
env->CallVoidMethod(jHub, db.jniInfo.contextHubInfoSetId, hub.hubId);
- jstrBuf = env->NewStringUTF(hub.name);
+ jstrBuf = env->NewStringUTF(hub.name.c_str());
env->CallVoidMethod(jHub, db.jniInfo.contextHubInfoSetName, jstrBuf);
env->DeleteLocalRef(jstrBuf);
- jstrBuf = env->NewStringUTF(hub.vendor);
+ jstrBuf = env->NewStringUTF(hub.vendor.c_str());
env->CallVoidMethod(jHub, db.jniInfo.contextHubInfoSetVendor, jstrBuf);
env->DeleteLocalRef(jstrBuf);
- jstrBuf = env->NewStringUTF(hub.toolchain);
+ jstrBuf = env->NewStringUTF(hub.toolchain.c_str());
env->CallVoidMethod(jHub, db.jniInfo.contextHubInfoSetToolchain, jstrBuf);
env->DeleteLocalRef(jstrBuf);