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
Loading
Please register or sign in to comment