commit | 1c43429785fb9adda0726b5480a59f476d066e83 | [log] [tgz] |
---|---|---|
author | Marin Shalamanov <shalamanov@google.com> | Fri Jun 12 01:47:29 2020 +0200 |
committer | Marin Shalamanov <shalamanov@google.com> | Fri Jun 19 15:05:30 2020 +0200 |
tree | d810d9d82505cf1d464d214be95d7ebbf45522f8 | |
parent | e147115f10e11484e3b369b4150f072971db3d52 [diff] |
[SF] Don't keep sp<DisplayDevice> when doing screenshot If a hotplug event is processed while a screenshot is taken the system may crash because binder thread can end up holding the last sp<> to a DisplayDevice. In this change we store a weak pointer and promote to a strong pointer when we are on the main thread. Bug: 158599281 Test: atest libsurfaceflinger_unittest Change-Id: Ica09398a48e68ec7b6bda3b88a6dadfa27b3455d