Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
encounters
EncounterBasedCommunication
Commits
79ead07d
Commit
79ead07d
authored
Jul 12, 2018
by
Roberta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catch
parent
95e0f85f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
ebclibrary/src/main/java/org/mpisws/encounters/EncounterBasedCommunication.java
...va/org/mpisws/encounters/EncounterBasedCommunication.java
+2
-2
ebclibrary/src/main/java/org/mpisws/encounters/encounterhistory/bridges/EncounterEntriesBridge.java
...ters/encounterhistory/bridges/EncounterEntriesBridge.java
+6
-1
No files found.
ebclibrary/src/main/java/org/mpisws/encounters/EncounterBasedCommunication.java
View file @
79ead07d
...
@@ -43,8 +43,8 @@ import java.util.List;
...
@@ -43,8 +43,8 @@ import java.util.List;
*
*
**/
**/
public
class
EncounterBasedCommunication
{
public
class
EncounterBasedCommunication
{
public
static
final
long
CHANGE_EPOCH_TIME
=
2
*
60000
;
public
static
final
long
CHANGE_EPOCH_TIME
=
1
*
60000
;
public
static
final
long
SCAN_BATCH_INTERVAL
=
(
long
)
(
2
*
60000
);
public
static
final
long
SCAN_BATCH_INTERVAL
=
(
long
)
(
1
*
60000
);
public
static
final
int
REQUEST_ENABLE_BT
=
1
;
public
static
final
int
REQUEST_ENABLE_BT
=
1
;
public
static
final
int
REQUEST_ACCESS_FINE_LOCATION
=
2
;
public
static
final
int
REQUEST_ACCESS_FINE_LOCATION
=
2
;
private
static
final
String
TAG
=
EncounterBasedCommunication
.
class
.
getSimpleName
();
private
static
final
String
TAG
=
EncounterBasedCommunication
.
class
.
getSimpleName
();
...
...
ebclibrary/src/main/java/org/mpisws/encounters/encounterhistory/bridges/EncounterEntriesBridge.java
View file @
79ead07d
...
@@ -4,6 +4,7 @@ import android.content.ContentResolver;
...
@@ -4,6 +4,7 @@ import android.content.ContentResolver;
import
android.content.ContentValues
;
import
android.content.ContentValues
;
import
android.content.Context
;
import
android.content.Context
;
import
android.database.Cursor
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteConstraintException
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.util.Log
;
...
@@ -96,7 +97,11 @@ public class EncounterEntriesBridge extends AbstractEncountersBridge<MEncounterE
...
@@ -96,7 +97,11 @@ public class EncounterEntriesBridge extends AbstractEncountersBridge<MEncounterE
values
.
put
(
PEncounterEntries
.
Columns
.
otherTopicHandle
,
""
);
values
.
put
(
PEncounterEntries
.
Columns
.
otherTopicHandle
,
""
);
values
.
put
(
PEncounterEntries
.
Columns
.
shouldPostNonceToLink
,
shouldPostNonceToLink
);
values
.
put
(
PEncounterEntries
.
Columns
.
shouldPostNonceToLink
,
shouldPostNonceToLink
);
values
.
put
(
PEncounterEntries
.
Columns
.
userHandle
,
userHandle
);
values
.
put
(
PEncounterEntries
.
Columns
.
userHandle
,
userHandle
);
try
{
context
.
getContentResolver
().
insert
(
EncounterHistoryAPM
.
getContentURI
(
EncounterHistoryAPM
.
encounterEntries
),
values
);
context
.
getContentResolver
().
insert
(
EncounterHistoryAPM
.
getContentURI
(
EncounterHistoryAPM
.
encounterEntries
),
values
);
}
catch
(
SQLiteConstraintException
e
)
{
Log
.
d
(
TAG
,
"Duplicate insert attempted"
);
}
}
}
public
void
updateEndTime
(
long
pkid
,
long
endTime
)
{
public
void
updateEndTime
(
long
pkid
,
long
endTime
)
{
...
...
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