am f0f6c54b: Merge "frameworks/base: Destroy the overlay even if there is an error"
* commit 'f0f6c54b13831b11bd7a3bd7a01dc49b7505e56e': frameworks/base: Destroy the overlay even if there is an error
This commit is contained in:
committed by
Android Git Automerger
commit
9df7f31359
@@ -96,7 +96,6 @@ void* Overlay::getBufferAddress(overlay_buffer_t buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Overlay::destroy() {
|
void Overlay::destroy() {
|
||||||
if (mStatus != NO_ERROR) return;
|
|
||||||
|
|
||||||
// Must delete the objects in reverse creation order, thus the
|
// Must delete the objects in reverse creation order, thus the
|
||||||
// data side must be closed first and then the destroy send to
|
// data side must be closed first and then the destroy send to
|
||||||
@@ -104,9 +103,15 @@ void Overlay::destroy() {
|
|||||||
if (mOverlayData) {
|
if (mOverlayData) {
|
||||||
overlay_data_close(mOverlayData);
|
overlay_data_close(mOverlayData);
|
||||||
mOverlayData = NULL;
|
mOverlayData = NULL;
|
||||||
|
} else {
|
||||||
|
LOGD("Overlay::destroy mOverlayData is NULL");
|
||||||
}
|
}
|
||||||
|
|
||||||
mOverlayRef->mOverlayChannel->destroy();
|
if (mOverlayRef != 0) {
|
||||||
|
mOverlayRef->mOverlayChannel->destroy();
|
||||||
|
} else {
|
||||||
|
LOGD("Overlay::destroy mOverlayRef is NULL");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t Overlay::getStatus() const {
|
status_t Overlay::getStatus() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user