Use app.* instead of ShadowsocksApplication.*
Because typing ShadowsocksApplication is quite troublesome.
This commit is contained in:
@@ -50,6 +50,7 @@ import android.os._
|
||||
import android.util.{Log, SparseArray}
|
||||
import com.github.shadowsocks.aidl.Config
|
||||
import com.github.shadowsocks.utils._
|
||||
import com.github.shadowsocks.ShadowsocksApplication.app
|
||||
|
||||
import scala.collection.JavaConversions._
|
||||
import scala.collection.mutable.ArrayBuffer
|
||||
@@ -355,13 +356,13 @@ class ShadowsocksNatService extends BaseService {
|
||||
}
|
||||
super.startRunner(config)
|
||||
|
||||
ShadowsocksApplication.track(TAG, "start")
|
||||
app.track(TAG, "start")
|
||||
|
||||
changeState(State.CONNECTING)
|
||||
|
||||
Utils.ThrowableFuture {
|
||||
if (config.proxy == "198.199.101.152") {
|
||||
val holder = ShadowsocksApplication.containerHolder
|
||||
val holder = app.containerHolder
|
||||
try {
|
||||
this.config = ConfigUtils.getPublicConfig(getBaseContext, holder.getContainer, config)
|
||||
} catch {
|
||||
@@ -412,7 +413,7 @@ class ShadowsocksNatService extends BaseService {
|
||||
|
||||
if (notification != null) notification.destroy()
|
||||
|
||||
ShadowsocksApplication.track(TAG, "stop")
|
||||
app.track(TAG, "stop")
|
||||
|
||||
// reset NAT
|
||||
killProcesses()
|
||||
|
||||
Reference in New Issue
Block a user