From 37a56225251ebbdb01057d676752f38b2cebb908 Mon Sep 17 00:00:00 2001 From: marcoscezar Date: Wed, 23 Aug 2017 15:49:01 -0300 Subject: [PATCH] Display appropriate registration error msg w/ bad verification code Fixes #6551 --- .../thoughtcrime/securesms/RegistrationProgressActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/thoughtcrime/securesms/RegistrationProgressActivity.java b/src/org/thoughtcrime/securesms/RegistrationProgressActivity.java index b4b7bd9447..482647ddd1 100644 --- a/src/org/thoughtcrime/securesms/RegistrationProgressActivity.java +++ b/src/org/thoughtcrime/securesms/RegistrationProgressActivity.java @@ -39,6 +39,7 @@ import org.thoughtcrime.securesms.util.TextSecurePreferences; import org.thoughtcrime.securesms.util.Util; import org.whispersystems.libsignal.util.KeyHelper; import org.whispersystems.signalservice.api.SignalServiceAccountManager; +import org.whispersystems.signalservice.api.push.exceptions.AuthorizationFailedException; import org.whispersystems.signalservice.api.push.exceptions.ExpectationFailedException; import org.whispersystems.signalservice.api.push.exceptions.RateLimitException; import org.whispersystems.signalservice.api.util.PhoneNumberFormatter; @@ -548,6 +549,9 @@ public class RegistrationProgressActivity extends BaseActionBarActivity { } catch (RateLimitException e) { Log.w(TAG, e); return RATE_LIMIT_ERROR; + } catch (AuthorizationFailedException e) { + Log.w(TAG, e); + return VERIFICATION_ERROR; } catch (IOException e) { Log.w(TAG, e); return NETWORK_ERROR;