Fix security vulnerability am: 45b202513b am: 8778a131c2 am: 18a5e5f607
am: f91ee50667
Change-Id: I703ffd6b2a4ee5a7726bd7426f83256ad990835f
diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
index 6710bca..2d36b54 100644
--- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
+++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
@@ -2203,8 +2203,7 @@
if (s.client != NULL) {
sp<IBinder> binder = IInterface::asBinder(s.client);
if (binder != NULL) {
- String16 desc(binder->getInterfaceDescriptor());
- if (desc == ISurfaceComposerClient::descriptor) {
+ if (binder->queryLocalInterface(ISurfaceComposerClient::descriptor) != NULL) {
sp<Client> client( static_cast<Client *>(s.client.get()) );
transactionFlags |= setClientStateLocked(client, s.state);
}