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
61707e2d
Unverified
Commit
61707e2d
authored
Nov 27, 2017
by
Leonardo Aramaki
Committed by
GitHub
Nov 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #584 from RocketChat/fix/crash
Fix connect timeout crash
parents
2066f29c
c26cb152
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
build.gradle
app/build.gradle
+2
-2
RocketChatApplication.java
.../main/java/chat/rocket/android/RocketChatApplication.java
+4
-7
MethodCallHelper.java
...c/main/java/chat/rocket/android/api/MethodCallHelper.java
+2
-0
No files found.
app/build.gradle
View file @
61707e2d
...
@@ -20,8 +20,8 @@ android {
...
@@ -20,8 +20,8 @@ android {
applicationId
"chat.rocket.android"
applicationId
"chat.rocket.android"
minSdkVersion
16
minSdkVersion
16
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
5
3
versionCode
5
4
versionName
"1.0.3
0
"
versionName
"1.0.3
1
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
multiDexEnabled
true
multiDexEnabled
true
...
...
app/src/main/java/chat/rocket/android/RocketChatApplication.java
View file @
61707e2d
...
@@ -7,8 +7,8 @@ import android.support.v7.app.AppCompatDelegate;
...
@@ -7,8 +7,8 @@ import android.support.v7.app.AppCompatDelegate;
import
com.crashlytics.android.Crashlytics
;
import
com.crashlytics.android.Crashlytics
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.TimeoutException
;
import
chat.rocket.android.helper.Logger
;
import
chat.rocket.android.helper.OkHttpHelper
;
import
chat.rocket.android.helper.OkHttpHelper
;
import
chat.rocket.android.service.ConnectivityManager
;
import
chat.rocket.android.service.ConnectivityManager
;
import
chat.rocket.android.widget.RocketChatWidgets
;
import
chat.rocket.android.widget.RocketChatWidgets
;
...
@@ -54,13 +54,10 @@ public class RocketChatApplication extends MultiDexApplication {
...
@@ -54,13 +54,10 @@ public class RocketChatApplication extends MultiDexApplication {
if
(
e
instanceof
UndeliverableException
)
{
if
(
e
instanceof
UndeliverableException
)
{
e
=
e
.
getCause
();
e
=
e
.
getCause
();
}
}
if
(
e
instanceof
TimeoutException
)
{
if
(
BuildConfig
.
DEBUG
)
{
// Some work timed-out after a server change is most probable.
e
.
printStackTrace
();
return
;
}
}
Logger
.
report
(
e
);
Thread
.
currentThread
().
getUncaughtExceptionHandler
()
.
uncaughtException
(
Thread
.
currentThread
(),
e
);
});
});
instance
=
this
;
instance
=
this
;
...
...
app/src/main/java/chat/rocket/android/api/MethodCallHelper.java
View file @
61707e2d
...
@@ -114,6 +114,8 @@ public class MethodCallHelper {
...
@@ -114,6 +114,8 @@ public class MethodCallHelper {
return
Task
.
forError
(
new
Exception
(
errMessage
));
return
Task
.
forError
(
new
Exception
(
errMessage
));
}
else
if
(
exception
instanceof
DDPClientCallback
.
RPC
.
Timeout
)
{
}
else
if
(
exception
instanceof
DDPClientCallback
.
RPC
.
Timeout
)
{
return
Task
.
forError
(
new
MethodCall
.
Timeout
());
return
Task
.
forError
(
new
MethodCall
.
Timeout
());
}
else
if
(
exception
instanceof
DDPClientCallback
.
Closed
)
{
return
Task
.
forError
(
new
Exception
(
"Oops, your connection seems off..."
));
}
else
{
}
else
{
return
Task
.
forError
(
exception
);
return
Task
.
forError
(
exception
);
}
}
...
...
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