Remove unsafe cast in Client::createWithSurfaceParent
Logs were initially added to debug an issue which has since been fixed.
Bug: b/150226994, b/134888387
Test: POC from file does not crash on device with AddressSanitizer
Change-Id: I582b1737026bd1dae62539a88e86dd2fd8edb539
(cherry picked from commit a03e1302db3c51be1e453af179e5549468b501ab)
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 6bfd302..c526f7f 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -88,11 +88,6 @@
sp<IGraphicBufferProducer>* gbp) {
if (mFlinger->authenticateSurfaceTexture(parent) == false) {
ALOGE("failed to authenticate surface texture");
- // The extra parent layer check below before returning is to help with debugging
- // b/134888387. Once the bug is fixed the check can be deleted.
- if ((static_cast<MonitoredProducer*>(parent.get()))->getLayer() == nullptr) {
- ALOGE("failed to find parent layer");
- }
return BAD_VALUE;
}