From 1c3a5eb0a4adb44adce52ea4a7b2005d18dc86e6 Mon Sep 17 00:00:00 2001 From: Lloyd Pique Date: Thu, 3 Oct 2019 13:07:08 -0700 Subject: SF: Switch Layer::createClone to using the factory Using the factory ensures the intended actual types are used for the clone. Test: atest libsurfaceflinger_unittest Test: go/wm_smoke Bug: None Change-Id: I64138724aed2d8c61dc5d59bba247d132291da0c --- services/surfaceflinger/ContainerLayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/surfaceflinger/ContainerLayer.cpp') diff --git a/services/surfaceflinger/ContainerLayer.cpp b/services/surfaceflinger/ContainerLayer.cpp index cb50d9ff6d..e58e6f425e 100644 --- a/services/surfaceflinger/ContainerLayer.cpp +++ b/services/surfaceflinger/ContainerLayer.cpp @@ -32,7 +32,7 @@ bool ContainerLayer::isVisible() const { sp ContainerLayer::createClone() { String8 name = mName + " (Mirror)"; - sp layer = new ContainerLayer( + sp layer = mFlinger->getFactory().createContainerLayer( LayerCreationArgs(mFlinger.get(), nullptr, name, 0, 0, 0, LayerMetadata())); layer->setInitialValuesForClone(this); return layer; -- cgit v1.2.3-59-g8ed1b