This commit is contained in:
Mygod
2021-05-27 13:59:17 -04:00
parent 2e5e1c1f6e
commit d2f8de24b4
7 changed files with 21 additions and 34 deletions

View File

@@ -159,8 +159,7 @@ fun NetworkInterface.formatAddresses(macOnly: Boolean = false) = SpannableString
}
}.trimEnd()
@delegate:SuppressLint("SoonBlockedPrivateApi")
private val parseNumericAddress by lazy {
private val parseNumericAddress by lazy @SuppressLint("SoonBlockedPrivateApi") {
InetAddress::class.java.getDeclaredMethod("parseNumericAddress", String::class.java).apply {
isAccessible = true
}
@@ -201,9 +200,8 @@ fun Resources.findIdentifier(name: String, defType: String, defPackage: String,
if (alternativePackage != null && it == 0) getIdentifier(name, defType, alternativePackage) else it
}
@delegate:TargetApi(26)
@get:RequiresApi(26)
private val newLookup by lazy {
private val newLookup by lazy @TargetApi(26) {
MethodHandles.Lookup::class.java.getDeclaredConstructor(Class::class.java, Int::class.java).apply {
isAccessible = true
}