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

Commit bd8a3539 authored by wilsonshih's avatar wilsonshih
Browse files

Implement a reference count for the REFERENCE_WRITE_TO_PARCEL flag.

During the broadcast of a snapshot object to remote processes, a
writeToParcel operation is also performed. If this broadcast occurs
before the snapshot object is intended to be returned to a remote
process, the WRITE_TO_PARCEL reference flag becomes ambiguous.
To prevent the hardware buffer from being released too early, record
how many WRITE_TO_PARCEL operations are required for the snapshot
object. The flag is only removed when this count drops to zero.

Flag: EXEMPT bugfix
Bug: 412389050
Test: launch multiple apps and move they in the background. Repeatly
resume then close apps by swipe up gesture multiple times, verify the
broadcast occur after write_to_parcel(takeTaskSnapshot) flag removed.

Change-Id: I8a57993cb58d42350baf013443486a98c916f518
parent b3eb540d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment