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

Commit a8a29891 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11444858 from 098f6851 to 24Q2-release

Change-Id: Ib41dd6c31cfcc3a80fe80b948d3776661ed8d6ab
parents 62d7707b 098f6851
Loading
Loading
Loading
Loading
+18 −0
Original line number Original line Diff line number Diff line
@@ -320,6 +320,24 @@ cc_defaults {
                "ServiceManagerHost.cpp",
                "ServiceManagerHost.cpp",
            ],
            ],
        },
        },
        android: {
            shared_libs: [
                "libapexsupport",
                "libvndksupport",
            ],
        },
        recovery: {
            exclude_shared_libs: [
                "libapexsupport",
                "libvndksupport",
            ],
        },
        native_bridge: {
            exclude_shared_libs: [
                "libapexsupport",
                "libvndksupport",
            ],
        },
    },
    },
    cflags: [
    cflags: [
        "-DBINDER_WITH_KERNEL_IPC",
        "-DBINDER_WITH_KERNEL_IPC",
+26 −0
Original line number Original line Diff line number Diff line
@@ -40,6 +40,11 @@
#include "ServiceManagerHost.h"
#include "ServiceManagerHost.h"
#endif
#endif


#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__) && !defined(__ANDROID_NATIVE_BRIDGE__)
#include <android/apexsupport.h>
#include <vndksupport/linker.h>
#endif

#include "Static.h"
#include "Static.h"


namespace android {
namespace android {
@@ -259,6 +264,27 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid, bool logP
    }
    }
}
}


void* openDeclaredPassthroughHal(const String16& interface, const String16& instance, int flag) {
#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__) && !defined(__ANDROID_NATIVE_BRIDGE__)
    sp<IServiceManager> sm = defaultServiceManager();
    String16 name = interface + String16("/") + instance;
    if (!sm->isDeclared(name)) {
        return nullptr;
    }
    String16 libraryName = interface + String16(".") + instance + String16(".so");
    if (auto updatableViaApex = sm->updatableViaApex(name); updatableViaApex.has_value()) {
        return AApexSupport_loadLibrary(String8(libraryName).c_str(),
                                        String8(*updatableViaApex).c_str(), flag);
    }
    return android_load_sphal_library(String8(libraryName).c_str(), flag);
#else
    (void)interface;
    (void)instance;
    (void)flag;
    return nullptr;
#endif
}

#endif //__ANDROID_VNDK__
#endif //__ANDROID_VNDK__


// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
+2 −0
Original line number Original line Diff line number Diff line
@@ -207,6 +207,8 @@ status_t getService(const String16& name, sp<INTERFACE>* outService)
    return NAME_NOT_FOUND;
    return NAME_NOT_FOUND;
}
}


void* openDeclaredPassthroughHal(const String16& interface, const String16& instance, int flag);

bool checkCallingPermission(const String16& permission);
bool checkCallingPermission(const String16& permission);
bool checkCallingPermission(const String16& permission,
bool checkCallingPermission(const String16& permission,
                            int32_t* outPid, int32_t* outUid);
                            int32_t* outPid, int32_t* outUid);
+12 −0
Original line number Original line Diff line number Diff line
@@ -242,6 +242,18 @@ void AServiceManager_getUpdatableApexName(const char* instance, void* context,
                                          void (*callback)(const char*, void*))
                                          void (*callback)(const char*, void*))
        __INTRODUCED_IN(__ANDROID_API_U__);
        __INTRODUCED_IN(__ANDROID_API_U__);


/**
 * Opens a declared passthrough HAL.
 *
 * \param instance identifier of the passthrough service (e.g. "mapper")
 * \param instance identifier of the implemenatation (e.g. "default")
 * \param flag passed to dlopen()
 */
void* AServiceManager_openDeclaredPassthroughHal(const char* interface, const char* instance,
                                                 int flag)
        // TODO(b/302113279) use __INTRODUCED_LLNDK for vendor variants
        __INTRODUCED_IN(__ANDROID_API_V__);

/**
/**
 * Prevent lazy services without client from shutting down their process
 * Prevent lazy services without client from shutting down their process
 *
 *
+1 −0
Original line number Original line Diff line number Diff line
@@ -204,6 +204,7 @@ LIBBINDER_NDK35 { # introduced=VanillaIceCream
    APersistableBundle_getDoubleVectorKeys;
    APersistableBundle_getDoubleVectorKeys;
    APersistableBundle_getStringVectorKeys;
    APersistableBundle_getStringVectorKeys;
    APersistableBundle_getPersistableBundleKeys;
    APersistableBundle_getPersistableBundleKeys;
    AServiceManager_openDeclaredPassthroughHal; # systemapi llndk
};
};


LIBBINDER_NDK_PLATFORM {
LIBBINDER_NDK_PLATFORM {
Loading