Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
7a2b220c
Commit
7a2b220c
authored
12 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
#16116: Put setAccountDetails inside a thread executor
parent
7a902bc7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/com/savoirfairelinux/sflphone/service/SipService.java
+23
-5
23 additions, 5 deletions
src/com/savoirfairelinux/sflphone/service/SipService.java
with
23 additions
and
5 deletions
src/com/savoirfairelinux/sflphone/service/SipService.java
+
23
−
5
View file @
7a2b220c
...
...
@@ -135,7 +135,18 @@ public class SipService extends Service {
@Override
public
ArrayList
<
String
>
getAccountList
()
{
StringVect
swigvect
=
configurationManagerJNI
.
getAccountList
();
class
AccountList
extends
SipRunnableWithReturn
{
@Override
protected
StringVect
doRun
()
throws
SameThreadException
{
Log
.
i
(
TAG
,
"SipService.getAccountList() thread running..."
);
return
configurationManagerJNI
.
getAccountList
();
}
};
AccountList
runInstance
=
new
AccountList
();
getExecutor
().
execute
(
runInstance
);
while
(!
runInstance
.
isDone
())
{}
StringVect
swigvect
=
(
StringVect
)
runInstance
.
getVal
();
ArrayList
<
String
>
nativelist
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
swigvect
.
size
();
i
++)
...
...
@@ -151,7 +162,7 @@ public class SipService extends Service {
AccountDetails
(
String
accountId
)
{
id
=
accountId
;
}
@Override
protected
StringMap
doRun
()
throws
SameThreadException
{
Log
.
i
(
TAG
,
"SipService.get
CurrentAudioOutputPlugin
() thread running..."
);
Log
.
i
(
TAG
,
"SipService.get
AccountDetails
() thread running..."
);
return
configurationManagerJNI
.
getAccountDetails
(
id
);
}
};
...
...
@@ -236,10 +247,10 @@ public class SipService extends Service {
}
@Override
public
void
setAccountDetails
(
String
accountId
,
Map
map
)
{
public
void
setAccountDetails
(
final
String
accountId
,
Map
map
)
{
HashMap
<
String
,
String
>
nativemap
=
(
HashMap
<
String
,
String
>)
map
;
StringMap
swigmap
=
new
StringMap
();
final
StringMap
swigmap
=
new
StringMap
();
swigmap
.
set
(
ServiceConstants
.
CONFIG_ACCOUNT_ALIAS
,
nativemap
.
get
(
ServiceConstants
.
CONFIG_ACCOUNT_ALIAS
));
swigmap
.
set
(
ServiceConstants
.
CONFIG_ACCOUNT_HOSTNAME
,
nativemap
.
get
(
ServiceConstants
.
CONFIG_ACCOUNT_HOSTNAME
));
...
...
@@ -295,7 +306,14 @@ public class SipService extends Service {
swigmap
.
set
(
ServiceConstants
.
CONFIG_ZRTP_HELLO_HASH
,
nativemap
.
get
(
ServiceConstants
.
CONFIG_ZRTP_HELLO_HASH
));
swigmap
.
set
(
ServiceConstants
.
CONFIG_ZRTP_NOT_SUPP_WARNING
,
nativemap
.
get
(
ServiceConstants
.
CONFIG_ZRTP_NOT_SUPP_WARNING
));
configurationManagerJNI
.
setAccountDetails
(
accountId
,
swigmap
);
getExecutor
().
execute
(
new
SipRunnable
()
{
@Override
protected
void
doRun
()
throws
SameThreadException
{
Log
.
i
(
TAG
,
"SipService.setAccountDetails() thread running..."
);
configurationManagerJNI
.
setAccountDetails
(
accountId
,
swigmap
);
}
});
}
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment