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
39910d5c
Commit
39910d5c
authored
11 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #27429: historyloader: check that fields are present on load
parent
a5383188
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/account/HistoryHandler.java
+32
-24
32 additions, 24 deletions
...com/savoirfairelinux/sflphone/account/HistoryHandler.java
with
32 additions
and
24 deletions
src/com/savoirfairelinux/sflphone/account/HistoryHandler.java
+
32
−
24
View file @
39910d5c
...
...
@@ -7,10 +7,18 @@ import android.util.Log;
import
com.savoirfairelinux.sflphone.service.ServiceConstants
;
import
com.savoirfairelinux.sflphone.service.VectMap
;
import
com.savoirfairelinux.sflphone.service.StringMap
;
public
class
HistoryHandler
{
private
static
final
String
TAG
=
HistoryHandler
.
class
.
getSimpleName
();
private
static
String
tryToGet
(
StringMap
smap
,
String
key
)
{
if
(
smap
.
has_key
(
key
))
{
return
smap
.
get
(
key
);
}
else
{
return
""
;
}
}
public
static
ArrayList
<
HashMap
<
String
,
String
>>
convertSwigToNative
(
VectMap
swigmap
)
{
...
...
@@ -21,32 +29,32 @@ public class HistoryHandler {
for
(
int
i
=
0
;
i
<
swigmap
.
size
();
++
i
)
{
HashMap
<
String
,
String
>
entry
=
new
HashMap
<
String
,
String
>();
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_ACCOUNT_ID_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_CALLID_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_CONFID_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_DISPLAY_NAME_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_PEER_NUMBER_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_RECORDING_PATH_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_STATE_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_TIMESTAMP_START_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_TIMESTAMP_STOP_KEY
));
Log
.
i
(
TAG
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_AUDIO_CODEC_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_ACCOUNT_ID_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_ACCOUNT_ID_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_CALLID_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_CALLID_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_CONFID_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_CONFID_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_DISPLAY_NAME_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_DISPLAY_NAME_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_PEER_NUMBER_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_PEER_NUMBER_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_RECORDING_PATH_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_RECORDING_PATH_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_STATE_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_STATE_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_TIMESTAMP_START_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_TIMESTAMP_START_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_TIMESTAMP_STOP_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_TIMESTAMP_STOP_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_AUDIO_CODEC_KEY
,
swigmap
.
get
(
i
)
.
get
(
ServiceConstants
.
HISTORY_AUDIO_CODEC_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_ACCOUNT_ID_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_CALLID_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_CONFID_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_DISPLAY_NAME_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_PEER_NUMBER_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_RECORDING_PATH_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_STATE_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_TIMESTAMP_START_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_TIMESTAMP_STOP_KEY
));
Log
.
i
(
TAG
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_AUDIO_CODEC_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_ACCOUNT_ID_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_ACCOUNT_ID_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_CALLID_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_CALLID_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_CONFID_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_CONFID_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_DISPLAY_NAME_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_DISPLAY_NAME_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_PEER_NUMBER_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_PEER_NUMBER_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_RECORDING_PATH_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_RECORDING_PATH_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_STATE_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_STATE_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_TIMESTAMP_START_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_TIMESTAMP_START_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_TIMESTAMP_STOP_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_TIMESTAMP_STOP_KEY
));
entry
.
put
(
ServiceConstants
.
HISTORY_AUDIO_CODEC_KEY
,
tryToGet
(
swigmap
.
get
(
i
)
,
ServiceConstants
.
HISTORY_AUDIO_CODEC_KEY
));
nativemap
.
add
(
entry
);
}
return
nativemap
;
}
}
\ No newline at end of file
}
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