mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-09 11:39:55 +00:00
Refactor out old classes.
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
package org.whispersystems.textsecure.push;
|
||||
|
||||
import org.whispersystems.textsecure.storage.RecipientDevice;
|
||||
public class PushAddress {
|
||||
|
||||
public class PushAddress extends RecipientDevice {
|
||||
public static final int DEFAULT_DEVICE_ID = 1;
|
||||
|
||||
private final long recipientId;
|
||||
private final String e164number;
|
||||
private final int deviceId;
|
||||
private final String relay;
|
||||
|
||||
public PushAddress(long recipientId, String e164number, int deviceId, String relay) {
|
||||
super(recipientId, deviceId);
|
||||
this.recipientId = recipientId;
|
||||
this.e164number = e164number;
|
||||
this.deviceId = deviceId;
|
||||
this.relay = relay;
|
||||
}
|
||||
|
||||
@@ -21,4 +24,11 @@ public class PushAddress extends RecipientDevice {
|
||||
return relay;
|
||||
}
|
||||
|
||||
public long getRecipientId() {
|
||||
return recipientId;
|
||||
}
|
||||
|
||||
public int getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +0,0 @@
|
||||
package org.whispersystems.textsecure.storage;
|
||||
|
||||
public interface CanonicalRecipient {
|
||||
// public String getNumber();
|
||||
public long getRecipientId();
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
package org.whispersystems.textsecure.storage;
|
||||
|
||||
public class RecipientDevice {
|
||||
|
||||
public static final int DEFAULT_DEVICE_ID = 1;
|
||||
|
||||
private final long recipientId;
|
||||
private final int deviceId;
|
||||
|
||||
public RecipientDevice(long recipientId, int deviceId) {
|
||||
this.recipientId = recipientId;
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public long getRecipientId() {
|
||||
return recipientId;
|
||||
}
|
||||
|
||||
public int getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public CanonicalRecipient getRecipient() {
|
||||
return new CanonicalRecipient() {
|
||||
@Override
|
||||
public long getRecipientId() {
|
||||
return recipientId;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user