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

Commit 77e15050 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "libbinder: __ANDROID_HOST__ => !__ANDROID__" am: 0aee1e88 am: 65bb4fca

am: 05eeea72

Change-Id: Ida97b86e6a1dcd63a3fc0aa65234c161ab969ed6
parents dd08ee7c 05eeea72
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -102,9 +102,6 @@ cc_library_shared {
        android: {
            srcs: libbinder_device_interface_sources,
        },
        host: {
            cflags: ["-D__ANDROID_HOST__"],
        },
        vendor: {
            exclude_srcs: libbinder_device_interface_sources,
        },
+6 −6
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#include <binder/IPermissionController.h>
#endif

#ifndef __ANDROID_HOST__
#ifdef __ANDROID__
#include <cutils/properties.h>
#endif

@@ -63,7 +63,7 @@ sp<IServiceManager> defaultServiceManager()
    return gDefaultServiceManager;
}

#if !defined(__ANDROID_VNDK__) && !defined(__ANDROID_HOST__)
#if !defined(__ANDROID_VNDK__) && defined(__ANDROID__)
// IPermissionController is not accessible to vendors

bool checkCallingPermission(const String16& permission)
@@ -166,14 +166,14 @@ public:
        const bool isVendorService =
            strcmp(ProcessState::self()->getDriverName().c_str(), "/dev/vndbinder") == 0;
        const long timeout = uptimeMillis() + 5000;
        if (!gSystemBootCompleted && !isVendorService) {
#ifdef __ANDROID_HOST__
            gSystemBootCompleted = true;
#else
        // Vendor code can't access system properties
        if (!gSystemBootCompleted && !isVendorService) {
#ifdef __ANDROID__
            char bootCompleted[PROPERTY_VALUE_MAX];
            property_get("sys.boot_completed", bootCompleted, "0");
            gSystemBootCompleted = strcmp(bootCompleted, "1") == 0 ? true : false;
#else
            gSystemBootCompleted = true;
#endif
        }
        // retry interval in millisecond; note that vendor services stay at 100ms
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ namespace android {
/* obtain structures and constants from the kernel header */

// TODO(b/31559095): bionic on host
#ifdef __ANDROID_HOST__
#ifndef __ANDROID__
#define __packed __attribute__((__packed__))
#endif