Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
85c02cc3
Commit
85c02cc3
authored
Dec 08, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new connection state SESSION_ESTABLISHED
parent
ef3afda1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
ConnectivityManagerApi.java
...a/chat/rocket/android/service/ConnectivityManagerApi.java
+2
-0
RealmBasedConnectivityManager.java
...rocket/android/service/RealmBasedConnectivityManager.java
+7
-0
ServerConnectivity.java
.../java/chat/rocket/android/service/ServerConnectivity.java
+1
-1
No files found.
app/src/main/java/chat/rocket/android/service/ConnectivityManagerApi.java
View file @
85c02cc3
...
...
@@ -28,4 +28,6 @@ public interface ConnectivityManagerApi {
int
getConnectivityState
(
@NonNull
String
hostname
);
void
resetConnectivityStateList
();
void
notifySessionEstablished
(
String
hostname
);
}
app/src/main/java/chat/rocket/android/service/RealmBasedConnectivityManager.java
View file @
85c02cc3
...
...
@@ -136,6 +136,13 @@ import io.reactivex.subjects.BehaviorSubject;
return
list
;
}
@Override
public
void
notifySessionEstablished
(
String
hostname
)
{
serverConnectivityList
.
put
(
hostname
,
ServerConnectivity
.
STATE_SESSION_ESTABLISHED
);
connectivitySubject
.
onNext
(
new
ServerConnectivity
(
hostname
,
ServerConnectivity
.
STATE_SESSION_ESTABLISHED
));
}
@DebugLog
@Override
public
void
notifyConnectionEstablished
(
String
hostname
,
String
session
)
{
...
...
app/src/main/java/chat/rocket/android/service/ServerConnectivity.java
View file @
85c02cc3
...
...
@@ -6,10 +6,10 @@ package chat.rocket.android.service;
public
class
ServerConnectivity
{
public
static
final
int
STATE_CONNECTED
=
1
;
public
static
final
int
STATE_DISCONNECTED
=
2
;
public
static
final
int
STATE_CONNECTING
=
3
;
/*package*/
static
final
int
STATE_DISCONNECTING
=
4
;
public
static
final
int
STATE_SESSION_ESTABLISHED
=
5
;
public
static
final
ServerConnectivity
CONNECTED
=
new
ServerConnectivity
(
null
,
STATE_CONNECTED
);
public
final
String
hostname
;
...
...
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