In current equals method, if iface is null then it will cause null object reference when checking iface. Thus, use TextUtils.equals to check iface so that it can compare null iface. Bug: 210073043 Test: FrameworksNetTests, NetworkStaticLibTests Change-Id: I2bd8127cb030ea54438382ee89961590fffbc31a