Skip to content
Commit 01b0dd5f authored by Robert Carr's avatar Robert Carr Committed by Rob Carr
Browse files

SurfaceControl: Bind close-guard lifetime to native-object lifetime.

Currently there are two bugs in the close-guard behavior:
Bug 1:
   a. Create surface control from parcel, close guard opens
   b. Import new parcel, last object release close guard closed
   c. Close guard not reopened, now we have a resource but no close guard
Bug 2:
   a. Construct "new SurfaceControl()" but don't do anything with it
   b. Now we have a close guard but no native resources

This CL ensures the state of the close guard matches the ownership of
native resources.

Bug: 150128124
Test: Existing tests pass
Change-Id: I0155854213ac64be3ac9a5d264815dbd43018fca
parent abe3d7bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment