Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
d4b55350
Commit
d4b55350
authored
Dec 20, 2018
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore DeadObjectException when stopListening
parent
24f99801
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
core/src/main/java/com/github/shadowsocks/ShadowsocksConnection.kt
...main/java/com/github/shadowsocks/ShadowsocksConnection.kt
+4
-2
No files found.
core/src/main/java/com/github/shadowsocks/ShadowsocksConnection.kt
View file @
d4b55350
...
@@ -25,6 +25,7 @@ import android.content.ComponentName
...
@@ -25,6 +25,7 @@ import android.content.ComponentName
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.content.ServiceConnection
import
android.content.ServiceConnection
import
android.os.DeadObjectException
import
android.os.IBinder
import
android.os.IBinder
import
android.os.RemoteException
import
android.os.RemoteException
import
com.github.shadowsocks.aidl.IShadowsocksService
import
com.github.shadowsocks.aidl.IShadowsocksService
...
@@ -68,8 +69,9 @@ class ShadowsocksConnection(private val instance: Interface) : ServiceConnection
...
@@ -68,8 +69,9 @@ class ShadowsocksConnection(private val instance: Interface) : ServiceConnection
set
(
value
)
{
set
(
value
)
{
val
service
=
service
val
service
=
service
if
(
listeningForBandwidth
!=
value
&&
service
!=
null
&&
instance
.
serviceCallback
!=
null
)
if
(
listeningForBandwidth
!=
value
&&
service
!=
null
&&
instance
.
serviceCallback
!=
null
)
if
(
value
)
service
.
startListeningForBandwidth
(
instance
.
serviceCallback
)
if
(
value
)
service
.
startListeningForBandwidth
(
instance
.
serviceCallback
)
else
try
{
else
service
.
stopListeningForBandwidth
(
instance
.
serviceCallback
)
service
.
stopListeningForBandwidth
(
instance
.
serviceCallback
)
}
catch
(
_
:
DeadObjectException
)
{
}
field
=
value
field
=
value
}
}
var
service
:
IShadowsocksService
?
=
null
var
service
:
IShadowsocksService
?
=
null
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment