Remove dependency on useless getSystemContext from librootjava

This commit is contained in:
Mygod
2020-07-28 05:01:20 +08:00
parent fe68f72854
commit db165257f2
3 changed files with 12 additions and 4 deletions

View File

@@ -13,7 +13,6 @@ import be.mygod.vpnhotspot.net.wifi.WifiP2pManagerHelper.requestDeviceAddress
import be.mygod.vpnhotspot.net.wifi.WifiP2pManagerHelper.requestPersistentGroupInfo
import be.mygod.vpnhotspot.net.wifi.WifiP2pManagerHelper.setWifiP2pChannels
import be.mygod.vpnhotspot.util.Services
import eu.chainfire.librootjava.RootJava
import kotlinx.android.parcel.Parcelize
import java.io.File
import java.io.IOException
@@ -99,7 +98,7 @@ object RepeaterCommands {
if (target == channel) channel = null
}
}
return initialize(RootJava.getSystemContext(), Looper.getMainLooper(), uninitializer).also {
return initialize(systemContext, Looper.getMainLooper(), uninitializer).also {
uninitializer.target = it
channel = it // cache the instance until invalidated
}