mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-28 05:35:44 +00:00
Fix crash when receiving SMS before finishing registration.
If someone has set Signal as the default SMS but has cleared data or otherwise reset the app's storage state, it can get into a weird situation. Notably, it'll crash because SmsReceiveJob.onRun() expects Recipient.self() to be available. However, it also makes it impossible to get the registration SMS, because the app won't post a notification for the code. This change will post notifications and SmsRetriever broadcasts for relevant SMS messages.
This commit is contained in:
@@ -64,7 +64,7 @@ public class VerificationCodeParserTest extends BaseUnitTest {
|
||||
@Test
|
||||
public void testChallenges() {
|
||||
for (String[] challenge : challenges()) {
|
||||
Optional<String> result = VerificationCodeParser.parse(context, challenge[0]);
|
||||
Optional<String> result = VerificationCodeParser.parse(challenge[0]);
|
||||
assertTrue(result.isPresent());
|
||||
assertEquals(challenge[1], result.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user