Commit 2c2e5790 authored by Mygod's avatar Mygod

Fix typo: deattach => detach

I can't believe I've been so blind.
parent 41683294
......@@ -363,7 +363,7 @@ final class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClic
}
override def onDestroy {
deattachService()
detachService()
undoManager.flush
ShadowsocksApplication.profileManager.setProfileAddedListener(null)
super.onDestroy
......
......@@ -62,7 +62,7 @@ trait ServiceBoundContext extends Context {
}
}
def deattachService() {
def detachService() {
unregisterCallback
callback = null
if (connection != null) {
......
......@@ -554,7 +554,7 @@ class Shadowsocks
override def onDestroy() {
super.onDestroy()
_isDestroyed = true
deattachService()
detachService()
new BackupManager(this).dataChanged()
handler.removeCallbacksAndMessages(null)
}
......
......@@ -15,7 +15,7 @@ class ShadowsocksDeathRecipient(val mContext: ServiceBoundContext)
Log.d(TAG, "[ShadowsocksDeathRecipient] binder died.")
mContext match {
case ss: Shadowsocks =>
ss.deattachService
ss.detachService
ss.crashRecovery
ss.attachService
case _ =>
......
......@@ -90,7 +90,7 @@ class ShadowsocksRunnerActivity extends Activity with ServiceBoundContext {
override def onDestroy() {
super.onDestroy()
deattachService()
detachService()
if (receiver != null) {
unregisterReceiver(receiver)
receiver = null
......
......@@ -77,6 +77,6 @@ class ShadowsocksRunnerService extends Service with ServiceBoundContext {
override def onDestroy() {
super.onDestroy()
deattachService()
detachService()
}
}
......@@ -132,7 +132,7 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan
def onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) = key match {
case Key.isNAT =>
activity.handler.post(() => {
activity.deattachService
activity.detachService
activity.attachService
})
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