Revert "Refine #530"

This reverts commit 56de231c4f.
This commit is contained in:
Max Lv
2016-07-09 08:59:13 +08:00
parent 929b8c94ae
commit 556d8d78bd
2 changed files with 1 additions and 3 deletions
@@ -62,6 +62,7 @@ trait ServiceBoundContext extends Context with IBinder.DeathRecipient {
connection = new ShadowsocksServiceConnection()
bindService(intent, connection, Context.BIND_AUTO_CREATE)
startService(intent)
}
}
@@ -83,9 +83,7 @@ class ShadowsocksNotification(private val service: BaseService, profileName: Str
show()
} else if (forceShow) show()
private lazy val intent = new Intent(service, service.getClass)
def show() = {
service.startService(intent)
service.startForeground(1, builder.build)
}
@@ -96,7 +94,6 @@ class ShadowsocksNotification(private val service: BaseService, profileName: Str
}
unregisterCallback
service.stopForeground(true)
service.stopService(intent)
nm.cancel(1)
}
}