Update private API documentation

This commit is contained in:
Mygod
2020-05-30 20:11:21 -04:00
parent a3027812f0
commit f094b0361b
3 changed files with 13 additions and 17 deletions

View File

@@ -48,7 +48,7 @@ enum class TetherType {
@RequiresApi(30)
private fun updateRegexs() {
requiresUpdate = false
val tethering = TetheringManager.PACKAGE to app.packageManager.getResourcesForApplication(
val tethering = "com.android.networkstack.tethering" to app.packageManager.getResourcesForApplication(
TetheringManager.resolvedService.serviceInfo.applicationInfo)
usbRegexs = tethering.getRegexs("config_tether_usb_regexs")
wifiRegexs = tethering.getRegexs("config_tether_wifi_regexs")

View File

@@ -63,9 +63,6 @@ object TetheringManager {
@RequiresApi(30)
const val TETHERING_SERVICE = "tethering"
@RequiresApi(30)
const val PACKAGE = "com.android.networkstack.tethering"
@RequiresApi(30)
private const val TETHERING_CONNECTOR_CLASS = "android.net.ITetheringConnector"
@@ -287,14 +284,8 @@ object TetheringManager {
if (args.isNotEmpty()) Timber.w("Unexpected args for ${method.name}: $args")
@Suppress("NAME_SHADOWING") val callback = reference.get()
when (method.name) {
"onTetheringStarted" -> {
callback?.onTetheringStarted()
null
}
"onTetheringFailed" -> {
callback?.onTetheringFailed()
null
}
"onTetheringStarted" -> callback?.onTetheringStarted()
"onTetheringFailed" -> callback?.onTetheringFailed()
else -> ProxyBuilder.callSuper(proxy, method, args)
}
}