sp<IBinder> display = SurfaceComposerClient::getBuiltInDisplay(displayId);
if (display == NULL) {
fprintf(stderr, "Unable to get handle for display %d\n", displayId);
- // b/36066697: Avoid running static destructors.
- _exit(1);
+ return 1;
}
Vector<DisplayInfo> configs;
if (static_cast<size_t>(activeConfig) >= configs.size()) {
fprintf(stderr, "Active config %d not inside configs (size %zu)\n",
activeConfig, configs.size());
- // b/36066697: Avoid running static destructors.
- _exit(1);
+ return 1;
}
uint8_t displayOrientation = configs[activeConfig].orientation;
uint32_t captureOrientation = ORIENTATION_MAP[displayOrientation];
&outBuffer);
if (result != NO_ERROR) {
close(fd);
- _exit(1);
+ return 1;
}
result = outBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN, &base);
if (base == NULL) {
close(fd);
- _exit(1);
+ return 1;
}
w = outBuffer->getWidth();
munmap((void *)mapbase, mapsize);
}
- // b/36066697: Avoid running static destructors.
- _exit(0);
+ return 0;
}
\ No newline at end of file