Cleanup legacy code

This commit is contained in:
tarsin committed 2023-03-17 20:39:06 +08:00
1 parent 7ab898ee85
commit abceb71dcb
1 file changed
+2 -9
@@ -165,18 +165,10 @@ class EhApplication : Application(), DefaultLifecycleObserver, ImageLoaderFactor
return id
}
fun containGlobalStuff(id: Int): Boolean {
return mGlobalStuffMap.containsKey(id)
}
fun removeGlobalStuff(id: Int): Any? {
return mGlobalStuffMap.remove(id)
}
fun removeGlobalStuff(o: Any) {
mGlobalStuffMap.values.removeAll(setOf(o))
}
fun registerActivity(activity: Activity) {
mActivityList.add(activity)
}
@@ -217,7 +209,8 @@ class EhApplication : Application(), DefaultLifecycleObserver, ImageLoaderFactor
dns(EhDns)
proxySelector(ehProxySelector)
if (Settings.dF) {
val factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())!!
val factory =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())!!
factory.init(null as KeyStore?)
val manager = factory.trustManagers!!
val trustManager = manager.filterIsInstance<X509TrustManager>().first()