mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-26 14:09:58 +00:00
Improve logging and the naming of some fields.
This commit is contained in:
@@ -56,7 +56,7 @@ object AccountDataProcessor {
|
||||
readReceipts = TextSecurePreferences.isReadReceiptsEnabled(context),
|
||||
sealedSenderIndicators = TextSecurePreferences.isShowUnidentifiedDeliveryIndicatorsEnabled(context),
|
||||
linkPreviews = SignalStore.settings().isLinkPreviewsEnabled,
|
||||
notDiscoverableByPhoneNumber = SignalStore.phoneNumberPrivacy().phoneNumberListingMode.isUnlisted,
|
||||
notDiscoverableByPhoneNumber = SignalStore.phoneNumberPrivacy().phoneNumberDiscoverabilityMode.isUndiscoverable,
|
||||
phoneNumberSharingMode = SignalStore.phoneNumberPrivacy().phoneNumberSharingMode.toBackupPhoneNumberSharingMode(),
|
||||
preferContactAvatars = SignalStore.settings().isPreferSystemContactPhotos,
|
||||
universalExpireTimer = SignalStore.settings().universalExpireTimer,
|
||||
@@ -86,7 +86,7 @@ object AccountDataProcessor {
|
||||
TextSecurePreferences.setTypingIndicatorsEnabled(context, settings.typingIndicators)
|
||||
TextSecurePreferences.setShowUnidentifiedDeliveryIndicatorsEnabled(context, settings.sealedSenderIndicators)
|
||||
SignalStore.settings().isLinkPreviewsEnabled = settings.linkPreviews
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberListingMode = if (settings.notDiscoverableByPhoneNumber) PhoneNumberPrivacyValues.PhoneNumberListingMode.UNLISTED else PhoneNumberPrivacyValues.PhoneNumberListingMode.LISTED
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberDiscoverabilityMode = if (settings.notDiscoverableByPhoneNumber) PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.NOT_DISCOVERABLE else PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.DISCOVERABLE
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberSharingMode = settings.phoneNumberSharingMode.toLocalPhoneNumberMode()
|
||||
SignalStore.settings().isPreferSystemContactPhotos = settings.preferContactAvatars
|
||||
SignalStore.settings().universalExpireTimer = settings.universalExpireTimer
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
import org.thoughtcrime.securesms.jobs.ProfileUploadJob
|
||||
import org.thoughtcrime.securesms.jobs.RefreshAttributesJob
|
||||
import org.thoughtcrime.securesms.jobs.RefreshOwnProfileJob
|
||||
import org.thoughtcrime.securesms.keyvalue.PhoneNumberPrivacyValues.PhoneNumberListingMode
|
||||
import org.thoughtcrime.securesms.keyvalue.PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode
|
||||
import org.thoughtcrime.securesms.keyvalue.PhoneNumberPrivacyValues.PhoneNumberSharingMode
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
@@ -51,7 +51,7 @@ class PhoneNumberPrivacySettingsViewModel : ViewModel() {
|
||||
}
|
||||
|
||||
private fun setDiscoverableByPhoneNumber(discoverable: Boolean) {
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberListingMode = if (discoverable) PhoneNumberListingMode.LISTED else PhoneNumberListingMode.UNLISTED
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberDiscoverabilityMode = if (discoverable) PhoneNumberDiscoverabilityMode.DISCOVERABLE else PhoneNumberDiscoverabilityMode.NOT_DISCOVERABLE
|
||||
StorageSyncHelper.scheduleSyncForDataChange()
|
||||
ApplicationDependencies.getJobManager().startChain(RefreshAttributesJob()).then(RefreshOwnProfileJob()).enqueue()
|
||||
refresh()
|
||||
|
||||
@@ -3677,7 +3677,7 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
SqlUtil.buildCollectionQuery(ID, missingFromCds).forEach { query ->
|
||||
writableDatabase
|
||||
.update(TABLE_NAME)
|
||||
.values(PHONE_NUMBER_DISCOVERABLE to PhoneNumberDiscoverableState.UNDISCOVERABLE.id)
|
||||
.values(PHONE_NUMBER_DISCOVERABLE to PhoneNumberDiscoverableState.NOT_DISCOVERABLE.id)
|
||||
.where(query.where, query.whereArgs)
|
||||
.run()
|
||||
}
|
||||
@@ -4189,7 +4189,7 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
put(SYSTEM_CONTACT_URI, systemContactUri)
|
||||
}
|
||||
|
||||
val updateQuery = SqlUtil.buildTrueUpdateQuery("$ID = ? AND $PHONE_NUMBER_DISCOVERABLE != ?", SqlUtil.buildArgs(id, PhoneNumberDiscoverableState.UNDISCOVERABLE.id), refreshQualifyingValues)
|
||||
val updateQuery = SqlUtil.buildTrueUpdateQuery("$ID = ? AND $PHONE_NUMBER_DISCOVERABLE != ?", SqlUtil.buildArgs(id, PhoneNumberDiscoverableState.NOT_DISCOVERABLE.id), refreshQualifyingValues)
|
||||
if (update(updateQuery, refreshQualifyingValues)) {
|
||||
pendingRecipients.add(id)
|
||||
}
|
||||
@@ -4197,7 +4197,7 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
writableDatabase
|
||||
.update(TABLE_NAME)
|
||||
.values(SYSTEM_INFO_PENDING to 0)
|
||||
.where("$ID = ? AND $PHONE_NUMBER_DISCOVERABLE != ?", id, PhoneNumberDiscoverableState.UNDISCOVERABLE.id)
|
||||
.where("$ID = ? AND $PHONE_NUMBER_DISCOVERABLE != ?", id, PhoneNumberDiscoverableState.NOT_DISCOVERABLE.id)
|
||||
.run()
|
||||
}
|
||||
|
||||
@@ -4548,7 +4548,7 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
}
|
||||
|
||||
enum class PhoneNumberDiscoverableState(val id: Int) {
|
||||
UNKNOWN(0), DISCOVERABLE(1), UNDISCOVERABLE(2);
|
||||
UNKNOWN(0), DISCOVERABLE(1), NOT_DISCOVERABLE(2);
|
||||
|
||||
companion object {
|
||||
fun fromId(id: Int): PhoneNumberDiscoverableState {
|
||||
|
||||
@@ -97,7 +97,7 @@ public class RefreshAttributesJob extends BaseJob {
|
||||
registrationLockV2 = svrValues.getRegistrationLockToken();
|
||||
}
|
||||
|
||||
boolean phoneNumberDiscoverable = SignalStore.phoneNumberPrivacy().getPhoneNumberListingMode().isDiscoverable();
|
||||
boolean phoneNumberDiscoverable = SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode().isDiscoverable();
|
||||
|
||||
String deviceName = SignalStore.account().getDeviceName();
|
||||
byte[] encryptedDeviceName = (deviceName == null) ? null : DeviceNameCipher.encryptDeviceName(deviceName.getBytes(StandardCharsets.UTF_8), SignalStore.account().getAciIdentityKey());
|
||||
|
||||
@@ -9,9 +9,9 @@ import java.util.List;
|
||||
|
||||
public final class PhoneNumberPrivacyValues extends SignalStoreValues {
|
||||
|
||||
public static final String SHARING_MODE = "phoneNumberPrivacy.sharingMode";
|
||||
public static final String LISTING_MODE = "phoneNumberPrivacy.listingMode";
|
||||
public static final String LISTING_TIMESTAMP = "phoneNumberPrivacy.listingMode.timestamp";
|
||||
public static final String SHARING_MODE = "phoneNumberPrivacy.sharingMode";
|
||||
public static final String DISCOVERABILITY_MODE = "phoneNumberPrivacy.listingMode";
|
||||
public static final String DISCOVERABILITY_TIMESTAMP = "phoneNumberPrivacy.listingMode.timestamp";
|
||||
|
||||
private static final Collection<CertificateType> ACI_AND_E164_CERTIFICATE = Collections.singletonList(CertificateType.ACI_AND_E164);
|
||||
private static final Collection<CertificateType> ACI_ONLY_CERTIFICATE = Collections.singletonList(CertificateType.ACI_ONLY);
|
||||
@@ -31,7 +31,7 @@ public final class PhoneNumberPrivacyValues extends SignalStoreValues {
|
||||
|
||||
@Override
|
||||
@NonNull List<String> getKeysToIncludeInBackup() {
|
||||
return Arrays.asList(SHARING_MODE, LISTING_MODE, LISTING_TIMESTAMP);
|
||||
return Arrays.asList(SHARING_MODE, DISCOVERABILITY_MODE, DISCOVERABILITY_TIMESTAMP);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,23 +55,23 @@ public final class PhoneNumberPrivacyValues extends SignalStoreValues {
|
||||
}
|
||||
|
||||
public boolean isDiscoverableByPhoneNumber() {
|
||||
return getPhoneNumberListingMode() == PhoneNumberPrivacyValues.PhoneNumberListingMode.LISTED;
|
||||
return getPhoneNumberDiscoverabilityMode() == PhoneNumberDiscoverabilityMode.DISCOVERABLE;
|
||||
}
|
||||
|
||||
public @NonNull PhoneNumberListingMode getPhoneNumberListingMode() {
|
||||
return PhoneNumberListingMode.deserialize(getInteger(LISTING_MODE, PhoneNumberListingMode.LISTED.serialize()));
|
||||
public @NonNull PhoneNumberDiscoverabilityMode getPhoneNumberDiscoverabilityMode() {
|
||||
return PhoneNumberDiscoverabilityMode.deserialize(getInteger(DISCOVERABILITY_MODE, PhoneNumberDiscoverabilityMode.DISCOVERABLE.serialize()));
|
||||
}
|
||||
|
||||
public void setPhoneNumberListingMode(@NonNull PhoneNumberListingMode phoneNumberListingMode) {
|
||||
public void setPhoneNumberDiscoverabilityMode(@NonNull PhoneNumberDiscoverabilityMode phoneNumberDiscoverabilityMode) {
|
||||
getStore()
|
||||
.beginWrite()
|
||||
.putInteger(LISTING_MODE, phoneNumberListingMode.serialize())
|
||||
.putLong(LISTING_TIMESTAMP, System.currentTimeMillis())
|
||||
.putInteger(DISCOVERABILITY_MODE, phoneNumberDiscoverabilityMode.serialize())
|
||||
.putLong(DISCOVERABILITY_TIMESTAMP, System.currentTimeMillis())
|
||||
.apply();
|
||||
}
|
||||
|
||||
public long getPhoneNumberListingModeTimestamp() {
|
||||
return getLong(LISTING_TIMESTAMP, 0);
|
||||
public long getPhoneNumberDiscoverabilityModeTimestamp() {
|
||||
return getLong(DISCOVERABILITY_TIMESTAMP, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,30 +119,30 @@ public final class PhoneNumberPrivacyValues extends SignalStoreValues {
|
||||
}
|
||||
}
|
||||
|
||||
public enum PhoneNumberListingMode {
|
||||
LISTED(0),
|
||||
UNLISTED(1);
|
||||
public enum PhoneNumberDiscoverabilityMode {
|
||||
DISCOVERABLE(0),
|
||||
NOT_DISCOVERABLE(1);
|
||||
|
||||
private final int code;
|
||||
|
||||
PhoneNumberListingMode(int code) {
|
||||
PhoneNumberDiscoverabilityMode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public boolean isDiscoverable() {
|
||||
return this == LISTED;
|
||||
return this == DISCOVERABLE;
|
||||
}
|
||||
|
||||
public boolean isUnlisted() {
|
||||
return this == UNLISTED;
|
||||
public boolean isUndiscoverable() {
|
||||
return this == NOT_DISCOVERABLE;
|
||||
}
|
||||
|
||||
public int serialize() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public static PhoneNumberListingMode deserialize(int code) {
|
||||
for (PhoneNumberListingMode value : PhoneNumberListingMode.values()) {
|
||||
public static PhoneNumberDiscoverabilityMode deserialize(int code) {
|
||||
for (PhoneNumberDiscoverabilityMode value : PhoneNumberDiscoverabilityMode.values()) {
|
||||
if (value.code == code) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -19,22 +19,24 @@ final class LogSectionKeyPreferences implements LogSection {
|
||||
|
||||
@Override
|
||||
public @NonNull CharSequence getContent(@NonNull Context context) {
|
||||
return new StringBuilder().append("Screen Lock : ").append(TextSecurePreferences.isScreenLockEnabled(context)).append("\n")
|
||||
.append("Screen Lock Timeout : ").append(TextSecurePreferences.getScreenLockTimeout(context)).append("\n")
|
||||
.append("Password Disabled : ").append(TextSecurePreferences.isPasswordDisabled(context)).append("\n")
|
||||
.append("Prefer Contact Photos: ").append(SignalStore.settings().isPreferSystemContactPhotos()).append("\n")
|
||||
.append("Call Data Mode : ").append(SignalStore.settings().getCallDataMode()).append("\n")
|
||||
.append("Media Quality : ").append(SignalStore.settings().getSentMediaQuality()).append("\n")
|
||||
.append("Client Deprecated : ").append(SignalStore.misc().isClientDeprecated()).append("\n")
|
||||
.append("Push Registered : ").append(SignalStore.account().isRegistered()).append("\n")
|
||||
.append("Unauthorized Received: ").append(TextSecurePreferences.isUnauthorizedReceived(context)).append("\n")
|
||||
.append("self.isRegistered() : ").append(SignalStore.account().getAci() == null ? "false" : Recipient.self().isRegistered()).append("\n")
|
||||
.append("Thread Trimming : ").append(getThreadTrimmingString()).append("\n")
|
||||
.append("Censorship Setting : ").append(SignalStore.settings().getCensorshipCircumventionEnabled()).append("\n")
|
||||
.append("Network Reachable : ").append(SignalStore.misc().isServiceReachableWithoutCircumvention()).append(", last checked: ").append(SignalStore.misc().getLastCensorshipServiceReachabilityCheckTime()).append("\n")
|
||||
.append("Wifi Download : ").append(Util.join(TextSecurePreferences.getWifiMediaDownloadAllowed(context), ",")).append("\n")
|
||||
.append("Roaming Download : ").append(Util.join(TextSecurePreferences.getRoamingMediaDownloadAllowed(context), ",")).append("\n")
|
||||
.append("Mobile Download : ").append(Util.join(TextSecurePreferences.getMobileMediaDownloadAllowed(context), ",")).append("\n");
|
||||
return new StringBuilder().append("Screen Lock : ").append(TextSecurePreferences.isScreenLockEnabled(context)).append("\n")
|
||||
.append("Screen Lock Timeout : ").append(TextSecurePreferences.getScreenLockTimeout(context)).append("\n")
|
||||
.append("Password Disabled : ").append(TextSecurePreferences.isPasswordDisabled(context)).append("\n")
|
||||
.append("Prefer Contact Photos : ").append(SignalStore.settings().isPreferSystemContactPhotos()).append("\n")
|
||||
.append("Call Data Mode : ").append(SignalStore.settings().getCallDataMode()).append("\n")
|
||||
.append("Media Quality : ").append(SignalStore.settings().getSentMediaQuality()).append("\n")
|
||||
.append("Client Deprecated : ").append(SignalStore.misc().isClientDeprecated()).append("\n")
|
||||
.append("Push Registered : ").append(SignalStore.account().isRegistered()).append("\n")
|
||||
.append("Unauthorized Received : ").append(TextSecurePreferences.isUnauthorizedReceived(context)).append("\n")
|
||||
.append("self.isRegistered() : ").append(SignalStore.account().getAci() == null ? "false" : Recipient.self().isRegistered()).append("\n")
|
||||
.append("Thread Trimming : ").append(getThreadTrimmingString()).append("\n")
|
||||
.append("Censorship Setting : ").append(SignalStore.settings().getCensorshipCircumventionEnabled()).append("\n")
|
||||
.append("Network Reachable : ").append(SignalStore.misc().isServiceReachableWithoutCircumvention()).append(", last checked: ").append(SignalStore.misc().getLastCensorshipServiceReachabilityCheckTime()).append("\n")
|
||||
.append("Wifi Download : ").append(Util.join(TextSecurePreferences.getWifiMediaDownloadAllowed(context), ",")).append("\n")
|
||||
.append("Roaming Download : ").append(Util.join(TextSecurePreferences.getRoamingMediaDownloadAllowed(context), ",")).append("\n")
|
||||
.append("Mobile Download : ").append(Util.join(TextSecurePreferences.getMobileMediaDownloadAllowed(context), ",")).append("\n")
|
||||
.append("Phone Number Sharing : ").append(SignalStore.phoneNumberPrivacy().isPhoneNumberSharingEnabled()).append(" (").append(SignalStore.phoneNumberPrivacy().getPhoneNumberSharingMode()).append(")\n")
|
||||
.append("Phone Number Discoverable: ").append(SignalStore.phoneNumberPrivacy().isDiscoverableByPhoneNumber()).append(" (").append(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode()).append(")\n");
|
||||
}
|
||||
|
||||
private static String getThreadTrimmingString() {
|
||||
|
||||
@@ -415,12 +415,12 @@ public final class Megaphones {
|
||||
private static boolean shouldShowSetUpYourUsernameMegaphone(@NonNull Map<Event, MegaphoneRecord> records) {
|
||||
boolean hasUsername = SignalStore.account().isRegistered() && SignalStore.account().getUsername() != null;
|
||||
boolean hasCompleted = MapUtil.mapOrDefault(records, Event.SET_UP_YOUR_USERNAME, MegaphoneRecord::isFinished, false);
|
||||
long phoneNumberDiscoveryDisabledAt = SignalStore.phoneNumberPrivacy().getPhoneNumberListingModeTimestamp();
|
||||
PhoneNumberPrivacyValues.PhoneNumberListingMode listingMode = SignalStore.phoneNumberPrivacy().getPhoneNumberListingMode();
|
||||
long phoneNumberDiscoveryDisabledAt = SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityModeTimestamp();
|
||||
PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode listingMode = SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode();
|
||||
|
||||
return FeatureFlags.usernames() &&
|
||||
!hasUsername &&
|
||||
listingMode.isUnlisted() &&
|
||||
listingMode.isUndiscoverable() &&
|
||||
!hasCompleted &&
|
||||
phoneNumberDiscoveryDisabledAt > 0 &&
|
||||
(System.currentTimeMillis() - phoneNumberDiscoveryDisabledAt) >= TimeUnit.DAYS.toMillis(3);
|
||||
|
||||
@@ -212,13 +212,13 @@ public class CreateProfileFragment extends LoggingFragment {
|
||||
if (FeatureFlags.phoneNumberPrivacy()) {
|
||||
getParentFragmentManager().setFragmentResultListener(WhoCanFindMeByPhoneNumberFragment.REQUEST_KEY, getViewLifecycleOwner(), (requestKey, result) -> {
|
||||
if (WhoCanFindMeByPhoneNumberFragment.REQUEST_KEY.equals(requestKey)) {
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberListingMode());
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode());
|
||||
}
|
||||
});
|
||||
|
||||
binding.whoCanFindMeContainer.setVisibility(View.VISIBLE);
|
||||
binding.whoCanFindMeContainer.setOnClickListener(v -> SafeNavigation.safeNavigate(Navigation.findNavController(v), CreateProfileFragmentDirections.actionCreateProfileFragmentToPhoneNumberPrivacy()));
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberListingMode());
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,12 +285,12 @@ public class CreateProfileFragment extends LoggingFragment {
|
||||
}
|
||||
}
|
||||
|
||||
private void presentWhoCanFindMeDescription(PhoneNumberPrivacyValues.PhoneNumberListingMode phoneNumberListingMode) {
|
||||
private void presentWhoCanFindMeDescription(PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode phoneNumberListingMode) {
|
||||
switch (phoneNumberListingMode) {
|
||||
case LISTED:
|
||||
case DISCOVERABLE:
|
||||
binding.whoCanFindMeDescription.setText(R.string.PhoneNumberPrivacy_everyone);
|
||||
break;
|
||||
case UNLISTED:
|
||||
case NOT_DISCOVERABLE:
|
||||
binding.whoCanFindMeDescription.setText(R.string.PhoneNumberPrivacy_nobody);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@ import org.thoughtcrime.securesms.storage.StorageSyncHelper
|
||||
class WhoCanFindMeByPhoneNumberRepository {
|
||||
|
||||
fun getCurrentState(): WhoCanFindMeByPhoneNumberState {
|
||||
return when (SignalStore.phoneNumberPrivacy().phoneNumberListingMode) {
|
||||
PhoneNumberPrivacyValues.PhoneNumberListingMode.LISTED -> WhoCanFindMeByPhoneNumberState.EVERYONE
|
||||
PhoneNumberPrivacyValues.PhoneNumberListingMode.UNLISTED -> WhoCanFindMeByPhoneNumberState.NOBODY
|
||||
return when (SignalStore.phoneNumberPrivacy().phoneNumberDiscoverabilityMode) {
|
||||
PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.DISCOVERABLE -> WhoCanFindMeByPhoneNumberState.EVERYONE
|
||||
PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.NOT_DISCOVERABLE -> WhoCanFindMeByPhoneNumberState.NOBODY
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ class WhoCanFindMeByPhoneNumberRepository {
|
||||
return Completable.fromAction {
|
||||
when (whoCanFindMeByPhoneNumberState) {
|
||||
WhoCanFindMeByPhoneNumberState.EVERYONE -> {
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberListingMode = PhoneNumberPrivacyValues.PhoneNumberListingMode.LISTED
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberDiscoverabilityMode = PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.DISCOVERABLE
|
||||
}
|
||||
WhoCanFindMeByPhoneNumberState.NOBODY -> {
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberSharingMode = PhoneNumberPrivacyValues.PhoneNumberSharingMode.NOBODY
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberListingMode = PhoneNumberPrivacyValues.PhoneNumberListingMode.UNLISTED
|
||||
SignalStore.phoneNumberPrivacy().phoneNumberDiscoverabilityMode = PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.NOT_DISCOVERABLE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ class VerifyAccountRepository(private val context: Application) {
|
||||
unidentifiedAccessKey = unidentifiedAccessKey,
|
||||
unrestrictedUnidentifiedAccess = universalUnidentifiedAccess,
|
||||
capabilities = AppCapabilities.getCapabilities(true),
|
||||
discoverableByPhoneNumber = SignalStore.phoneNumberPrivacy().phoneNumberListingMode.isDiscoverable,
|
||||
discoverableByPhoneNumber = SignalStore.phoneNumberPrivacy().phoneNumberDiscoverabilityMode.isDiscoverable,
|
||||
name = null,
|
||||
pniRegistrationId = registrationData.pniRegistrationId,
|
||||
recoveryPassword = registrationData.recoveryPassword
|
||||
|
||||
@@ -147,7 +147,7 @@ public final class StorageSyncHelper {
|
||||
.setReadReceiptsEnabled(TextSecurePreferences.isReadReceiptsEnabled(context))
|
||||
.setSealedSenderIndicatorsEnabled(TextSecurePreferences.isShowUnidentifiedDeliveryIndicatorsEnabled(context))
|
||||
.setLinkPreviewsEnabled(SignalStore.settings().isLinkPreviewsEnabled())
|
||||
.setUnlistedPhoneNumber(SignalStore.phoneNumberPrivacy().getPhoneNumberListingMode().isUnlisted())
|
||||
.setUnlistedPhoneNumber(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode().isUndiscoverable())
|
||||
.setPhoneNumberSharingMode(StorageSyncModels.localToRemotePhoneNumberSharingMode(SignalStore.phoneNumberPrivacy().getPhoneNumberSharingMode()))
|
||||
.setPinnedConversations(StorageSyncModels.localToRemotePinnedConversations(pinned))
|
||||
.setPreferContactAvatars(SignalStore.settings().isPreferSystemContactPhotos())
|
||||
@@ -196,7 +196,7 @@ public final class StorageSyncHelper {
|
||||
TextSecurePreferences.setTypingIndicatorsEnabled(context, update.getNew().isTypingIndicatorsEnabled());
|
||||
TextSecurePreferences.setShowUnidentifiedDeliveryIndicatorsEnabled(context, update.getNew().isSealedSenderIndicatorsEnabled());
|
||||
SignalStore.settings().setLinkPreviewsEnabled(update.getNew().isLinkPreviewsEnabled());
|
||||
SignalStore.phoneNumberPrivacy().setPhoneNumberListingMode(update.getNew().isPhoneNumberUnlisted() ? PhoneNumberPrivacyValues.PhoneNumberListingMode.UNLISTED : PhoneNumberPrivacyValues.PhoneNumberListingMode.LISTED);
|
||||
SignalStore.phoneNumberPrivacy().setPhoneNumberDiscoverabilityMode(update.getNew().isPhoneNumberUnlisted() ? PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.NOT_DISCOVERABLE : PhoneNumberPrivacyValues.PhoneNumberDiscoverabilityMode.DISCOVERABLE);
|
||||
SignalStore.phoneNumberPrivacy().setPhoneNumberSharingMode(StorageSyncModels.remoteToLocalPhoneNumberSharingMode(update.getNew().getPhoneNumberSharingMode()));
|
||||
SignalStore.settings().setPreferSystemContactPhotos(update.getNew().isPreferContactAvatars());
|
||||
SignalStore.paymentsValues().setEnabledAndEntropy(update.getNew().getPayments().isEnabled(), Entropy.fromBytes(update.getNew().getPayments().getEntropy().orElse(null)));
|
||||
|
||||
Reference in New Issue
Block a user