Tone down a fatal assert

The new disconnectDisplay function doesn't handle virtual displays,
but it may be called for them.  Return without doing anything.

Bug 7281786

Change-Id: I62607f2ae6073fa66b393f55932604aeb8e03566
This commit is contained in:
Andy McFadden 2012-10-04 19:09:45 -07:00
parent 9a14392256
commit 5a8f9012ee

View File

@ -686,8 +686,11 @@ status_t HWComposer::acquire(int disp) {
} }
void HWComposer::disconnectDisplay(int disp) { void HWComposer::disconnectDisplay(int disp) {
LOG_ALWAYS_FATAL_IF(disp < 0 || disp == HWC_DISPLAY_PRIMARY || LOG_ALWAYS_FATAL_IF(disp < 0 || disp == HWC_DISPLAY_PRIMARY);
disp >= HWC_NUM_DISPLAY_TYPES); if (disp >= HWC_NUM_DISPLAY_TYPES) {
// nothing to do for these yet
return;
}
DisplayData& dd(mDisplayData[disp]); DisplayData& dd(mDisplayData[disp]);
if (dd.list != NULL) { if (dd.list != NULL) {
free(dd.list); free(dd.list);