PatchPanel: follow up to remove false warning from ~Patch
When a new patch is being added to mPatches in this line:
mPatches.insert(std::make_pair(*handle, std::move(newPatch)));
the source of the move--`newPatch` remains intact, and if it
is a software patch, it has playback and record patch handles
remaining to be non-NONE values. Thus, on destruction it falsely
warns that it hasn't been cleared.
The solution is to define a move constructor for Endpoint which
"transfers" patch handle ownership.
Also delete copy constructors to make sure that each Patch is
a unique resource.
Test: create a software patch, watch logcat
Change-Id: I41ea2dff087696252132e79d827e705378baaf8f
1 file changed