Commit 1bb3a6bf authored by chentao's avatar chentao

Add ShadowsocksDeathRecipient

parent f6cab9b9
package com.github.shadowsocks
import android.os.IBinder
import android.util.Log
import com.github.shadowsocks.utils.ProcessUtils._
/**
* @author chentaov5@gmail.com
*/
class ShadowsocksDeathRecipient(val mContext: ServiceBoundContext)
extends IBinder.DeathRecipient {
val TAG = "ShadowsocksDeathRecipient"
override def binderDied(): Unit = {
Log.d(TAG, "[ShadowsocksDeathRecipient] binder died.")
mContext match {
case ss: Shadowsocks =>
inShadowsocks {
ss.unregisterCallback
ss.bindToService()
}
case _ =>
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment