mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-26 10:05:09 +01:00
Reroute ISE to NoSessionException.
This commit is contained in:
+1
-1
@@ -153,7 +153,7 @@ public interface EnvelopeContent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutgoingPushMessage processUnsealedSender(SignalSessionCipher sessionCipher, SignalProtocolAddress destination) {
|
||||
public OutgoingPushMessage processUnsealedSender(SignalSessionCipher sessionCipher, SignalProtocolAddress destination) throws NoSessionException {
|
||||
String body = Base64.encodeWithPadding(plaintextContent.serialize());
|
||||
int remoteRegistrationId = sessionCipher.getRemoteRegistrationId();
|
||||
|
||||
|
||||
+6
-2
@@ -45,9 +45,13 @@ public class SignalSessionCipher {
|
||||
}
|
||||
}
|
||||
|
||||
public int getRemoteRegistrationId() {
|
||||
public int getRemoteRegistrationId() throws NoSessionException {
|
||||
try (SignalSessionLock.Lock unused = lock.acquire()) {
|
||||
return cipher.getRemoteRegistrationId();
|
||||
try {
|
||||
return cipher.getRemoteRegistrationId();
|
||||
} catch (IllegalStateException e) {
|
||||
throw new NoSessionException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user