I used MediaProjection to create VirtualDisplay to take screenshots. Afterward, I tried to release the virtualDisplay, but it did not work
MediaProjection
VirtualDisplay
virtualDisplay