Commit 6444696a authored by Yusuke Iwaki's avatar Yusuke Iwaki

remove deprecated method call

parent c020b195
...@@ -38,13 +38,6 @@ public class MethodCallHelper { ...@@ -38,13 +38,6 @@ public class MethodCallHelper {
protected final RealmHelper realmHelper; protected final RealmHelper realmHelper;
protected final DDPClientWrapper ddpClient; protected final DDPClientWrapper ddpClient;
/**
* initialize with ServerConfigId.
*/
public MethodCallHelper(String serverConfigId) {
this(null, serverConfigId);
}
/** /**
* initialize with Context and ServerConfigId. * initialize with Context and ServerConfigId.
*/ */
......
...@@ -12,10 +12,6 @@ import bolts.Task; ...@@ -12,10 +12,6 @@ import bolts.Task;
import chat.rocket.android.realm_helper.RealmHelper; import chat.rocket.android.realm_helper.RealmHelper;
public class PushHelper extends MethodCallHelper { public class PushHelper extends MethodCallHelper {
public PushHelper(String serverConfigId) {
super(serverConfigId);
}
public PushHelper(Context context, String serverConfigId) { public PushHelper(Context context, String serverConfigId) {
super(context, serverConfigId); super(context, serverConfigId);
} }
......
package chat.rocket.android.push.gcm; package chat.rocket.android.push.gcm;
import android.app.IntentService;
import android.content.Intent;
import com.google.android.gms.gcm.GoogleCloudMessaging; import com.google.android.gms.gcm.GoogleCloudMessaging;
import com.google.android.gms.iid.InstanceID; import com.google.android.gms.iid.InstanceID;
import android.app.IntentService;
import android.content.Intent;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import chat.rocket.android.RocketChatCache; import chat.rocket.android.RocketChatCache;
...@@ -59,7 +59,7 @@ public class GcmRegistrationIntentService extends IntentService { ...@@ -59,7 +59,7 @@ public class GcmRegistrationIntentService extends IntentService {
final User currentUser = realmHelper.executeTransactionForRead(realm -> final User currentUser = realmHelper.executeTransactionForRead(realm ->
User.queryCurrentUser(realm).findFirst()); User.queryCurrentUser(realm).findFirst());
new PushHelper(serverConfig.getServerConfigId()).pushUpdate( new PushHelper(getBaseContext(), serverConfig.getServerConfigId()).pushUpdate(
RocketChatCache.getPushId(this), token, currentUser != null ? currentUser.getId() : null) RocketChatCache.getPushId(this), token, currentUser != null ? currentUser.getId() : null)
.onSuccess(task -> { .onSuccess(task -> {
markRefreshAsDone(serverConfig); markRefreshAsDone(serverConfig);
......
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