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

Commit 3f171ef1 authored by David Duarte's avatar David Duarte Committed by Automerger Merge Worker
Browse files

Make bt_headless host_supported am: be6faef1

parents f8b33c5f be6faef1
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ genrule {

cc_binary {
    name: "bt_headless",
    host_supported: true,
    defaults: [
        "fluoride_defaults",
        "latest_android_hardware_bluetooth_audio_ndk_shared",
@@ -67,7 +68,6 @@ cc_binary {
    ],
    static_libs: [
        "android.hardware.bluetooth.a2dp@1.0",
        "android.system.suspend.control-V1-ndk",
        "avrcp-target-service",
        "lib-bt-packets",
        "lib-bt-packets-avrcp",
@@ -118,9 +118,7 @@ cc_binary {
        "android.hardware.bluetooth.audio@2.1",
        "android.hardware.bluetooth@1.0",
        "android.hardware.bluetooth@1.1",
        "android.system.suspend-V1-ndk",
        "libPlatformProperties",
        "libaaudio",
        "libbase",
        "libbinder_ndk",
        "libcrypto",
@@ -129,9 +127,21 @@ cc_binary {
        "libhidlbase",
        "libjsoncpp",
        "liblog", // __android_log_print
        "libstatssocket",
        "libutils",
        "server_configurable_flags",
    ],
    header_libs: ["libbluetooth_headers"],
    target: {
        android: {
            static_libs: [
                "android.system.suspend.control-V1-ndk",
            ],
            shared_libs: [
                "android.hardware.bluetooth.audio-V4-ndk",
                "android.system.suspend-V1-ndk",
                "libaaudio",
                "libstatssocket",
            ],
        },
    },
}
+4 −8
Original line number Diff line number Diff line
@@ -18,17 +18,13 @@

#include "osi/include/properties.h"

namespace {
constexpr char kZygoteService[] = "init.svc.zygote";
constexpr char kZygoteServiceRunning[] = "running";

}  // namespace

bool is_android_running() {
#ifdef __ANDROID__
  char value[PROPERTY_VALUE_MAX];
  osi_property_get(kZygoteService, value, kZygoteServiceRunning);
  if (!strncmp(kZygoteServiceRunning, value, PROPERTY_VALUE_MAX)) {
  osi_property_get("init.svc.zygote", value, "running");
  if (!strncmp("running", value, PROPERTY_VALUE_MAX)) {
    return true;
  }
#endif
  return false;
}