mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 03:40:56 +01: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:
@@ -75,7 +75,6 @@ public class TextSecurePreferences {
|
||||
private static final String LOCAL_NUMBER_PREF = "pref_local_number";
|
||||
private static final String LOCAL_UUID_PREF = "pref_local_uuid";
|
||||
private static final String LOCAL_USERNAME_PREF = "pref_local_username";
|
||||
private static final String VERIFYING_STATE_PREF = "pref_verifying";
|
||||
public static final String REGISTERED_GCM_PREF = "pref_gcm_registered";
|
||||
private static final String GCM_PASSWORD_PREF = "pref_gcm_password";
|
||||
private static final String SEEN_WELCOME_SCREEN_PREF = "pref_seen_welcome_screen";
|
||||
@@ -840,14 +839,6 @@ public class TextSecurePreferences {
|
||||
return getStringPreference(context, THEME_PREF, DynamicTheme.systemThemeAvailable() ? DynamicTheme.SYSTEM : DynamicTheme.LIGHT);
|
||||
}
|
||||
|
||||
public static boolean isVerifying(Context context) {
|
||||
return getBooleanPreference(context, VERIFYING_STATE_PREF, false);
|
||||
}
|
||||
|
||||
public static void setVerifying(Context context, boolean verifying) {
|
||||
setBooleanPreference(context, VERIFYING_STATE_PREF, verifying);
|
||||
}
|
||||
|
||||
public static boolean isPushRegistered(Context context) {
|
||||
return getBooleanPreference(context, REGISTERED_GCM_PREF, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user