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

Commit 4cbbed12 authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Jiyong Park
Browse files

mark AIBinder_Class_setHandleShellCommand as weak.

This symbol is not present on Q builds. This breaks installing
mainline modules on Q builds.

Bug: 149077229

Test: TARGET_BUILD_APPS=com.android.resolv vendor/google/build/build_unbundled_mainline_module.sh com.android.resolv && adb install --staged --enable-rollback out/dist/mainline_modules_arm64/com.android.resolv.apex && adb reboot
Change-Id: I4fae98f2ad3051d758707658ec489f0d855cd4b6
parent 1a4c7aee
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -238,7 +238,9 @@ AIBinder_Class* ICInterface::defineClass(const char* interfaceDescriptor,
    // ourselves. The defaults are harmless.
    AIBinder_Class_setOnDump(clazz, ICInterfaceData::onDump);
#ifdef HAS_BINDER_SHELL_COMMAND
    if (AIBinder_Class_setHandleShellCommand != nullptr) {
        AIBinder_Class_setHandleShellCommand(clazz, ICInterfaceData::handleShellCommand);
    }
#endif
    return clazz;
}
+2 −3
Original line number Diff line number Diff line
@@ -48,8 +48,7 @@ typedef binder_status_t (*AIBinder_handleShellCommand)(AIBinder* binder, int in,
 * \param handleShellCommand function to call when a shell transaction is
 * received
 */
void AIBinder_Class_setHandleShellCommand(AIBinder_Class* clazz,
                                          AIBinder_handleShellCommand handleShellCommand)
        __INTRODUCED_IN(30);
__attribute__((weak)) void AIBinder_Class_setHandleShellCommand(
        AIBinder_Class* clazz, AIBinder_handleShellCommand handleShellCommand) __INTRODUCED_IN(30);

__END_DECLS