mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 14:54:09 +00:00
Consider unregistered if authorization fails.
This should only occur if another device has registered with the same number, effectively making the current device unregistered.
This commit is contained in:
@@ -56,6 +56,7 @@ import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Trimmer;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.whispersystems.textsecure.push.AuthorizationFailedException;
|
||||
import org.whispersystems.textsecure.push.PushServiceSocket;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -358,8 +359,11 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
|
||||
socket.unregisterGcmId();
|
||||
GCMRegistrar.unregister(context);
|
||||
return SUCCESS;
|
||||
} catch (IOException e) {
|
||||
Log.w("ApplicationPreferencesActivity", e);
|
||||
} catch (AuthorizationFailedException afe) {
|
||||
Log.w("ApplicationPreferencesActivity", afe);
|
||||
return SUCCESS;
|
||||
} catch (IOException ioe) {
|
||||
Log.w("ApplicationPreferencesActivity", ioe);
|
||||
return NETWORK_ERROR;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user