fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
Bug: 4595257
Change-Id: I1db83149107d7dab1f0b7e73c684e0ff82e17e62
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 1d75a7b..a35811d 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -61,6 +61,7 @@
mBufferManager(mTextureManager),
mWidth(0), mHeight(0), mNeedsScaling(false), mFixedSize(false)
{
+ setDestroyer(this);
}
Layer::~Layer()
@@ -77,8 +78,8 @@
}
}
-void Layer::destroy() const {
- mFlinger->destroyLayer(this);
+void Layer::destroy(RefBase const* base) {
+ mFlinger->destroyLayer(static_cast<LayerBase const*>(base));
}
status_t Layer::setToken(const sp<UserClient>& userClient,