Add LogSectionSMS to debug log.

Closes #12273
fork-5.53.8
Sgn-32 2022-05-28 16:57:58 +02:00 zatwierdzone przez Greyson Parrelli
rodzic 4da422fd3c
commit b282b775d0
3 zmienionych plików z 26 dodań i 3 usunięć

Wyświetl plik

@ -8,7 +8,6 @@ import org.thoughtcrime.securesms.keyvalue.KeepMessagesDuration;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.thoughtcrime.securesms.util.Util;
final class LogSectionKeyPreferences implements LogSection {
@ -22,8 +21,6 @@ final class LogSectionKeyPreferences implements LogSection {
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("WiFi SMS : ").append(SignalStore.settings().isWifiCallingCompatibilityModeEnabled()).append("\n")
.append("Default SMS : ").append(Util.isDefaultSmsProvider(context)).append("\n")
.append("Prefer Contact Photos: ").append(SignalStore.settings().isPreferSystemContactPhotos()).append("\n")
.append("Call Bandwidth Mode : ").append(SignalStore.settings().getCallBandwidthMode()).append("\n")
.append("Client Deprecated : ").append(SignalStore.misc().isClientDeprecated()).append("\n")

Wyświetl plik

@ -0,0 +1,25 @@
package org.thoughtcrime.securesms.logsubmit
import android.content.Context
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.util.Util
/**
* Prints off the current SMS settings
*/
class LogSectionSMS : LogSection {
override fun getTitle(): String = "SMS"
override fun getContent(context: Context): CharSequence {
val isDefaultSMS = Util.isDefaultSmsProvider(context)
val settings = SignalStore.settings()
val output = StringBuilder()
output.append("Default SMS : ${isDefaultSMS}\n")
output.append("SMS delivery reports : ${settings.isSmsDeliveryReportsEnabled}\n")
output.append("WiFi SMS : ${settings.isWifiCallingCompatibilityModeEnabled}\n")
return output
}
}

Wyświetl plik

@ -80,6 +80,7 @@ public class SubmitDebugLogRepository {
add(new LogSectionNotificationProfiles());
add(new LogSectionExoPlayerPool());
add(new LogSectionKeyPreferences());
add(new LogSectionSMS());
add(new LogSectionBadges());
add(new LogSectionPermissions());
add(new LogSectionTrace());