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

Commit 250a290d authored by Tom Cherry's avatar Tom Cherry Committed by Michael Bestas
Browse files

init: only provide control message results for devices launching > Q

This is a behavior change and may have unintended consequences,
especially in Java, where failed property sets create exceptions.
Therefore, we only provide this new behavior to devices launching > Q.

Bug: 137070994
Test: build
Change-Id: If0b44aedc5c887ea6ea16dd3ec551ac2bf793cef
(cherry picked from commit 5310db82)
parent d8c6c080
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ static uint32_t SendControlMessage(const std::string& msg, const std::string& na
    // We must release the fd before sending it to init, otherwise there will be a race with init.
    // If init calls close() before Release(), then fdsan will see the wrong tag and abort().
    int fd = -1;
    if (socket != nullptr) {
    if (socket != nullptr && SelinuxGetVendorAndroidVersion() > __ANDROID_API_Q__) {
        fd = socket->Release();
        control_message->set_fd(fd);
    }