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