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
c4429633
Commit
c4429633
authored
Feb 28, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unblock the service callback
parent
110a4eb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
src/main/java/com/github/shadowsocks/aidl/IShadowsocksService.aidl
...java/com/github/shadowsocks/aidl/IShadowsocksService.aidl
+2
-2
src/main/java/com/github/shadowsocks/aidl/IShadowsocksServiceCallback.aidl
.../github/shadowsocks/aidl/IShadowsocksServiceCallback.aidl
+2
-2
src/main/scala/com/github/shadowsocks/BaseService.scala
src/main/scala/com/github/shadowsocks/BaseService.scala
+1
-2
No files found.
src/main/java/com/github/shadowsocks/aidl/IShadowsocksService.aidl
View file @
c4429633
...
@@ -7,8 +7,8 @@ interface IShadowsocksService {
...
@@ -7,8 +7,8 @@ interface IShadowsocksService {
int
getMode
();
int
getMode
();
int
getState
();
int
getState
();
void
registerCallback
(
IShadowsocksServiceCallback
cb
);
oneway
void
registerCallback
(
IShadowsocksServiceCallback
cb
);
void
unregisterCallback
(
IShadowsocksServiceCallback
cb
);
oneway
void
unregisterCallback
(
IShadowsocksServiceCallback
cb
);
oneway
void
start
(
in
Config
config
);
oneway
void
start
(
in
Config
config
);
oneway
void
stop
();
oneway
void
stop
();
...
...
src/main/java/com/github/shadowsocks/aidl/IShadowsocksServiceCallback.aidl
View file @
c4429633
package
com
.
github
.
shadowsocks
.
aidl
;
package
com
.
github
.
shadowsocks
.
aidl
;
interface
IShadowsocksServiceCallback
{
interface
IShadowsocksServiceCallback
{
void
stateChanged
(
int
state
,
String
msg
);
oneway
void
stateChanged
(
int
state
,
String
msg
);
}
}
\ No newline at end of file
src/main/scala/com/github/shadowsocks/BaseService.scala
View file @
c4429633
...
@@ -106,9 +106,8 @@ trait BaseService {
...
@@ -106,9 +106,8 @@ trait BaseService {
override
def
run
()
{
override
def
run
()
{
if
(
state
!=
s
)
{
if
(
state
!=
s
)
{
val
n
=
callbacks
.
beginBroadcast
()
val
n
=
callbacks
.
beginBroadcast
()
val
m
=
if
(
msg
!=
null
)
msg
.
substring
(
0
,
64
)
else
null
for
(
i
<-
0
to
n
-
1
)
{
for
(
i
<-
0
to
n
-
1
)
{
callbacks
.
getBroadcastItem
(
i
).
stateChanged
(
s
,
m
)
callbacks
.
getBroadcastItem
(
i
).
stateChanged
(
s
,
m
sg
)
}
}
callbacks
.
finishBroadcast
()
callbacks
.
finishBroadcast
()
state
=
s
state
=
s
...
...
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