Only update SMS setting if registration is complete.
Otherwise you could crash during registration if the user had previously set Signal as the default.
This commit is contained in:
parent
70db617229
commit
45d010bdb6
1 changed files with 1 additions and 1 deletions
|
@ -359,7 +359,7 @@ public final class SettingsValues extends SignalStoreValues {
|
||||||
public void setDefaultSms(boolean value) {
|
public void setDefaultSms(boolean value) {
|
||||||
boolean lastKnown = getBoolean(DEFAULT_SMS, false);
|
boolean lastKnown = getBoolean(DEFAULT_SMS, false);
|
||||||
|
|
||||||
if (value != lastKnown) {
|
if (value != lastKnown && SignalStore.registrationValues().isRegistrationComplete()) {
|
||||||
Log.i(TAG, "Default SMS state changed! Scheduling a storage sync.");
|
Log.i(TAG, "Default SMS state changed! Scheduling a storage sync.");
|
||||||
putBoolean(DEFAULT_SMS, value);
|
putBoolean(DEFAULT_SMS, value);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue