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

Commit 768635c1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Guard the call to onFrozenStateChangeListenerRemoved behind a flag" into main

parents d5d6b109 36e57769
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -72,6 +72,16 @@ namespace android {

using namespace std::chrono_literals;

namespace {
    bool waitForFrozenListenerRemovalCompletion() {
#if defined(LIBBINDER_DEFER_BC_REQUEST_FREEZE_NOTIFICATION)
        return true;
#else
        return false;
#endif
    }
}

// Static const and functions will be optimized out if not used,
// when LOG_NDEBUG and references in IF_LOG_COMMANDS() are optimized out.
static const char* kReturnStrings[] = {
@@ -1628,7 +1638,9 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
   case BR_CLEAR_FREEZE_NOTIFICATION_DONE:
        {
            BpBinder* proxy = (BpBinder*)mIn.readPointer();
            if (waitForFrozenListenerRemovalCompletion()) {
                proxy->getPrivateAccessor().onFrozenStateChangeListenerRemoved();
            }
            proxy->getWeakRefs()->decWeak(proxy);
        }
        break;