Use libbase properties for a slight simplification. am: 3b0811b786 am: 0228644fa2 am: 4541c2eabf am: a0e307cc4a

Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/2779648

Change-Id: Ice9bf9a239ea7b2aa8e5a8f45ad2bec0a85d4256
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/bpfloader/Android.bp b/bpfloader/Android.bp
index b8c6514..2ddf463 100644
--- a/bpfloader/Android.bp
+++ b/bpfloader/Android.bp
@@ -42,7 +42,6 @@
     shared_libs: [
         "libbase",
         "libbpf_android",
-        "libcutils",
         "liblog",
     ],
     srcs: [
diff --git a/libbpf_android/Android.bp b/libbpf_android/Android.bp
index d8272cc..52fb043 100644
--- a/libbpf_android/Android.bp
+++ b/libbpf_android/Android.bp
@@ -39,7 +39,6 @@
 
     shared_libs: [
         "libbase",
-        "libcutils",
         "libutils",
         "liblog",
     ],
diff --git a/libbpf_android/Loader.cpp b/libbpf_android/Loader.cpp
index d817614..e817a59 100644
--- a/libbpf_android/Loader.cpp
+++ b/libbpf_android/Loader.cpp
@@ -59,9 +59,9 @@
 
 #include <android-base/cmsg.h>
 #include <android-base/file.h>
+#include <android-base/properties.h>
 #include <android-base/strings.h>
 #include <android-base/unique_fd.h>
-#include <cutils/properties.h>
 
 #define BPF_FS_PATH "/sys/fs/bpf/"
 
@@ -79,17 +79,11 @@
 using std::string;
 using std::vector;
 
-static std::string getBuildTypeInternal() {
-    char value[PROPERTY_VALUE_MAX] = {};
-    (void)property_get("ro.build.type", value, "unknown");  // ignore length
-    return value;
-}
-
 namespace android {
 namespace bpf {
 
 const std::string& getBuildType() {
-    static std::string t = getBuildTypeInternal();
+    static std::string t = android::base::GetProperty("ro.build.type", "unknown");
     return t;
 }