diff --git a/libredex/DexTypeEnvironment.cpp b/libredex/DexTypeEnvironment.cpp index 7359275caec..70c0c291a42 100644 --- a/libredex/DexTypeEnvironment.cpp +++ b/libredex/DexTypeEnvironment.cpp @@ -18,10 +18,14 @@ bool implements(const DexClass* cls, const DexType* intf) { if (is_interface(cls)) { return false; } - for (const auto interface : cls->get_interfaces()->get_type_list()) { - if (interface == intf) { - return true; + auto parent = cls; + while (parent) { + for (const auto interface : parent->get_interfaces()->get_type_list()) { + if (interface == intf) { + return true; + } } + parent = type_class(parent->get_super_class()); } return false; }