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

Commit 825df7f6 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Parcel transaction id between processes

Transaction ids were no being parceled which meant we were getting different ids for the same transaction passed across process boundaries

This was problematic for FaaS which dumped the transaction id in one process but the transaction was applied in another process with a different id meaning they couldn't be associated.

Bug: 230462538

Test: make sure transaction id is still the same after calling shell.Transitions#onTransitionReady (WM Shell process) from wm.Transition#onTransactionReady (WM process).
Change-Id: I66191310b87e784df62259de61b98ea0f9e33345
parent 4f7c45e4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -660,6 +660,7 @@ SurfaceComposerClient::Transaction::createFromParcel(const Parcel* parcel) {


status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel) {
    const uint64_t transactionId = parcel->readUint64();
    const uint32_t forceSynchronous = parcel->readUint32();
    const uint32_t transactionNestCount = parcel->readUint32();
    const bool animation = parcel->readBool();
@@ -737,6 +738,7 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel
    inputWindowCommands.read(*parcel);

    // Parsing was successful. Update the object.
    mId = transactionId;
    mForceSynchronous = forceSynchronous;
    mTransactionNestCount = transactionNestCount;
    mAnimation = animation;
@@ -768,6 +770,7 @@ status_t SurfaceComposerClient::Transaction::writeToParcel(Parcel* parcel) const

    const_cast<SurfaceComposerClient::Transaction*>(this)->cacheBuffers();

    parcel->writeUint64(mId);
    parcel->writeUint32(mForceSynchronous);
    parcel->writeUint32(mTransactionNestCount);
    parcel->writeBool(mAnimation);