This commit is contained in:
Mygod
2018-06-10 21:35:27 +08:00
parent d68932f72b
commit 3fbca0abef
4 changed files with 11 additions and 8 deletions

View File

@@ -127,7 +127,8 @@ object TetheringManager {
}
fun getTetheredIfaces(extras: Bundle) = extras.getStringArrayList(
if (Build.VERSION.SDK_INT >= 26) EXTRA_ACTIVE_TETHER else EXTRA_ACTIVE_TETHER_LEGACY)
if (Build.VERSION.SDK_INT >= 26) EXTRA_ACTIVE_TETHER else EXTRA_ACTIVE_TETHER_LEGACY)!!
fun getLocalOnlyTetheredIfaces(extras: Bundle) =
if (Build.VERSION.SDK_INT >= 26) extras.getStringArrayList(EXTRA_ACTIVE_LOCAL_ONLY) else emptyList<String>()
if (Build.VERSION.SDK_INT >= 26) extras.getStringArrayList(EXTRA_ACTIVE_LOCAL_ONLY)!!
else emptyList<String>()
}