Suppress UNCHECKED_CAST

This commit is contained in:
Mygod
2020-05-29 01:55:29 -04:00
parent df1ef04d18
commit 6ee1bf3666

View File

@@ -93,6 +93,7 @@ object WifiP2pManagerHelper {
arrayOf(interfacePersistentGroupInfoListener)) { proxy, method, args -> arrayOf(interfacePersistentGroupInfoListener)) { proxy, method, args ->
if (method.name == "onPersistentGroupInfoAvailable") { if (method.name == "onPersistentGroupInfoAvailable") {
if (args.size != 1) Timber.w(IllegalArgumentException("Unexpected args: $args")) if (args.size != 1) Timber.w(IllegalArgumentException("Unexpected args: $args"))
@Suppress("UNCHECKED_CAST")
listener(getGroupList.invoke(args[0]) as Collection<WifiP2pGroup>) listener(getGroupList.invoke(args[0]) as Collection<WifiP2pGroup>)
null null
} else { } else {