Commit ffecfbf1 authored by Yusuke Iwaki's avatar Yusuke Iwaki Committed by GitHub

Merge branch 'develop' into feature/version-bump-3

parents 57383b59 5c9c522e
...@@ -128,7 +128,7 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity { ...@@ -128,7 +128,7 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
RocketChatService.keepalive(this); RocketChatService.keepAlive(this);
unconfiguredServersObserver.sub(); unconfiguredServersObserver.sub();
SharedPreferences prefs = RocketChatCache.get(this); SharedPreferences prefs = RocketChatCache.get(this);
......
...@@ -65,7 +65,7 @@ public class ServerConfigActivity extends AbstractFragmentActivity { ...@@ -65,7 +65,7 @@ public class ServerConfigActivity extends AbstractFragmentActivity {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
RocketChatService.keepalive(this); RocketChatService.keepAlive(this);
serverConfigErrorObserver.sub(); serverConfigErrorObserver.sub();
} }
......
...@@ -313,7 +313,7 @@ public class RoomFragment extends AbstractChatRoomFragment ...@@ -313,7 +313,7 @@ public class RoomFragment extends AbstractChatRoomFragment
.put("reset", true)); .put("reset", true));
return null; return null;
}).onSuccessTask(task -> { }).onSuccessTask(task -> {
RocketChatService.keepalive(getContext()); RocketChatService.keepAlive(getContext());
return task; return task;
}).continueWith(new LogcatIfError()); }).continueWith(new LogcatIfError());
} }
...@@ -334,7 +334,7 @@ public class RoomFragment extends AbstractChatRoomFragment ...@@ -334,7 +334,7 @@ public class RoomFragment extends AbstractChatRoomFragment
} }
return null; return null;
}).onSuccessTask(task -> { }).onSuccessTask(task -> {
RocketChatService.keepalive(getContext()); RocketChatService.keepAlive(getContext());
return task; return task;
}).continueWith(new LogcatIfError()); }).continueWith(new LogcatIfError());
} }
......
...@@ -91,7 +91,7 @@ public class UsersOfRoomDialogFragment extends AbstractChatroomDialogFragment { ...@@ -91,7 +91,7 @@ public class UsersOfRoomDialogFragment extends AbstractChatroomDialogFragment {
.put("showAll", true)); .put("showAll", true));
return null; return null;
}).onSuccessTask(task -> { }).onSuccessTask(task -> {
RocketChatService.keepalive(getContext()); RocketChatService.keepAlive(getContext());
return task; return task;
}).continueWith(new LogcatIfError()); }).continueWith(new LogcatIfError());
} }
......
...@@ -25,7 +25,7 @@ public class ServerConfig extends RealmObject { ...@@ -25,7 +25,7 @@ public class ServerConfig extends RealmObject {
private String error; private String error;
/** /**
* Log the server connection is lost due to soem exception. * Log the server connection is lost due to some exception.
*/ */
@DebugLog @DebugLog
public static void logConnectionError(String serverConfigId, Exception exception) { public static void logConnectionError(String serverConfigId, Exception exception) {
......
...@@ -58,9 +58,9 @@ public class MethodCall extends RealmObject { ...@@ -58,9 +58,9 @@ public class MethodCall extends RealmObject {
return; return;
} }
int syncstate = methodCall.getSyncState(); int syncState = methodCall.getSyncState();
RCLog.d("MethodCall[%s] syncstate=%d", methodCall.getMethodCallId(), syncstate); RCLog.d("MethodCall[%s] syncstate=%d", methodCall.getMethodCallId(), syncState);
if (syncstate == SyncState.SYNCED) { if (syncState == SyncState.SYNCED) {
String resultJson = methodCall.getResultJson(); String resultJson = methodCall.getResultJson();
if (TextUtils.isEmpty(resultJson)) { if (TextUtils.isEmpty(resultJson)) {
task.setResult(null); task.setResult(null);
...@@ -70,7 +70,7 @@ public class MethodCall extends RealmObject { ...@@ -70,7 +70,7 @@ public class MethodCall extends RealmObject {
observer.unsub(); observer.unsub();
REF_MAP.remove(methodCall.getMethodCallId()); REF_MAP.remove(methodCall.getMethodCallId());
remove(realmHelper, methodCall.getMethodCallId()).continueWith(new LogcatIfError()); remove(realmHelper, methodCall.getMethodCallId()).continueWith(new LogcatIfError());
} else if (syncstate == SyncState.FAILED) { } else if (syncState == SyncState.FAILED) {
task.setError(new Error(methodCall.getResultJson())); task.setError(new Error(methodCall.getResultJson()));
observer.unsub(); observer.unsub();
REF_MAP.remove(methodCall.getMethodCallId()); REF_MAP.remove(methodCall.getMethodCallId());
...@@ -81,7 +81,7 @@ public class MethodCall extends RealmObject { ...@@ -81,7 +81,7 @@ public class MethodCall extends RealmObject {
REF_MAP.put(newId, observer); REF_MAP.put(newId, observer);
if (context != null) { if (context != null) {
RocketChatService.keepalive(context); RocketChatService.keepAlive(context);
} }
} }
return null; return null;
......
...@@ -28,7 +28,7 @@ public class RocketChatService extends Service { ...@@ -28,7 +28,7 @@ public class RocketChatService extends Service {
/** /**
* ensure RocketChatService alive. * ensure RocketChatService alive.
*/ */
public static void keepalive(Context context) { public static void keepAlive(Context context) {
context.startService(new Intent(context, RocketChatService.class)); context.startService(new Intent(context, RocketChatService.class));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment