bool Hwcomposer::blank(int disp, int blank)
{
    RETURN_FALSE_IF_NOT_INIT();
    ALOGTRACE("disp = %d, blank = %d", disp, blank);

    if (disp < 0 || disp >= IDisplayDevice::DEVICE_COUNT) {
        ELOGTRACE("invalid disp %d", disp);
        return false;
    }
    if (disp >= (int) mDisplayDevices.size()) {
        return false;
    }
    IDisplayDevice *device = mDisplayDevices.itemAt(disp);
    if (!device) {
        ELOGTRACE("no device found");
        return false;
    }

    return device->blank(blank ? true : false);
}
예제 #2
0
bool Hwcomposer::blank(int disp, int blank)
{
    log.v("blank: disp %d, blank %d", disp, blank);

    if (!initCheck())
        return false;

    if (disp < 0 || disp >= IDisplayDevice::DEVICE_COUNT) {
        log.e("blank: invalid disp %d", disp);
        return false;
    }

    IDisplayDevice *device = mDisplayDevices.itemAt(disp);
    if (!device) {
        log.e("blank: no device found");
        return false;
    }

    return device->blank(blank);
}