Fulfill hanging promises upon LayerFE destruction
Attempted screenshots can have broken promises when there is an
invalid render area and no memory for the capture result. This
case would return without a capture result, but should also
clean up any promises associated with the LayerFEs in that
screenshot.
Fixes: b/330811287
Test: presubmit
Change-Id: I777aaff0096347332eb6ba731a8a74b4e1860a57
diff --git a/services/surfaceflinger/LayerFE.h b/services/surfaceflinger/LayerFE.h
index 019fa22..658f949 100644
--- a/services/surfaceflinger/LayerFE.h
+++ b/services/surfaceflinger/LayerFE.h
@@ -36,6 +36,7 @@
class LayerFE : public virtual RefBase, public virtual compositionengine::LayerFE {
public:
LayerFE(const std::string& name);
+ virtual ~LayerFE();
// compositionengine::LayerFE overrides
const compositionengine::LayerFECompositionState* getCompositionState() const override;