mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 16:18:34 +00:00
Limit impact of crash on unexpected SMS receive.
This commit is contained in:
parent
ef6019f13b
commit
02865f99a9
@ -71,7 +71,9 @@ public class SmsReceiveJob extends BaseJob {
|
||||
|
||||
@Override
|
||||
public void onRun() throws MigrationPendingException {
|
||||
Log.i(TAG, "onRun()");
|
||||
if (TextSecurePreferences.getLocalUuid(context) == null && TextSecurePreferences.getLocalNumber(context) == null) {
|
||||
throw new NotReadyException();
|
||||
}
|
||||
|
||||
Optional<IncomingTextMessage> message = assembleMessageFragments(pdus, subscriptionId);
|
||||
|
||||
@ -167,4 +169,7 @@ public class SmsReceiveJob extends BaseJob {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class NotReadyException extends RuntimeException {
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user