diff options
author | Tomasz Wasilczyk <twasilczyk@google.com> | 2023-08-23 17:11:51 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-08-23 17:11:51 +0000 |
commit | d01aa3ae479021a2c090e60af2a3e5098a25ed8e (patch) | |
tree | e98c8164fb0af80defc8487ae3afc60db0f44903 | |
parent | b0e2f6f2339c98aa8b71d084820d37729745af90 (diff) | |
parent | 8d2d90d1b3f1f2eb011084761bb3809e6455b787 (diff) | |
download | neven-d01aa3ae479021a2c090e60af2a3e5098a25ed8e.tar.gz |
Merge "Migrate from android::String path functions to std::filesystem" into main am: 58a352c5d7 am: 9433200ff0 am: 3e5a44cc29 am: 8d2d90d1b3
Original change: https://android-review.googlesource.com/c/platform/external/neven/+/2722493
Change-Id: Id62fa457b5854777d04e7c437c7ea04d7153994d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 3 | ||||
-rw-r--r-- | FaceDetector_jni.cpp | 7 |
2 files changed, 7 insertions, 3 deletions
@@ -145,6 +145,9 @@ cc_library_shared { "libcutils", ], + whole_static_libs: [ + "libc++fs", + ], required: [ "RFFspeed_501.bmd", diff --git a/FaceDetector_jni.cpp b/FaceDetector_jni.cpp index 650cbf0..1741195 100644 --- a/FaceDetector_jni.cpp +++ b/FaceDetector_jni.cpp @@ -15,6 +15,7 @@ */ #include <assert.h> +#include <filesystem> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> @@ -119,9 +120,9 @@ initialize(JNIEnv *_env, jobject _this, { // load the configuration file const char* root = getenv("ANDROID_ROOT"); - String8 path(root); - path.appendPath("usr/share/bmd/RFFstd_501.bmd"); - // path.appendPath("usr/share/bmd/RFFspeed_501.bmd"); + std::filesystem::path path(root); + path /= "usr/share/bmd/RFFstd_501.bmd"; + // path /= "usr/share/bmd/RFFspeed_501.bmd"; const int MAX_FILE_SIZE = 65536; void* initData = malloc( MAX_FILE_SIZE ); /* enough to fit entire file */ |