That fuck shit the fascists are using
1package org.tm.archive.logsubmit;
2
3import android.content.Context;
4
5import androidx.annotation.NonNull;
6
7import org.tm.archive.keyvalue.KeepMessagesDuration;
8import org.tm.archive.keyvalue.SignalStore;
9import org.tm.archive.recipients.Recipient;
10import org.tm.archive.util.TextSecurePreferences;
11import org.tm.archive.util.Util;
12
13final class LogSectionKeyPreferences implements LogSection {
14
15 @Override
16 public @NonNull String getTitle() {
17 return "KEY PREFERENCES";
18 }
19
20 @Override
21 public @NonNull CharSequence getContent(@NonNull Context context) {
22 return new StringBuilder().append("Screen Lock : ").append(TextSecurePreferences.isScreenLockEnabled(context)).append("\n")
23 .append("Screen Lock Timeout : ").append(TextSecurePreferences.getScreenLockTimeout(context)).append("\n")
24 .append("Password Disabled : ").append(TextSecurePreferences.isPasswordDisabled(context)).append("\n")
25 .append("Prefer Contact Photos : ").append(SignalStore.settings().isPreferSystemContactPhotos()).append("\n")
26 .append("Call Data Mode : ").append(SignalStore.settings().getCallDataMode()).append("\n")
27 .append("Media Quality : ").append(SignalStore.settings().getSentMediaQuality()).append("\n")
28 .append("Client Deprecated : ").append(SignalStore.misc().isClientDeprecated()).append("\n")
29 .append("Push Registered : ").append(SignalStore.account().isRegistered()).append("\n")
30 .append("Unauthorized Received : ").append(TextSecurePreferences.isUnauthorizedReceived(context)).append("\n")
31 .append("self.isRegistered() : ").append(SignalStore.account().getAci() == null ? "false" : Recipient.self().isRegistered()).append("\n")
32 .append("Thread Trimming : ").append(getThreadTrimmingString()).append("\n")
33 .append("Censorship Setting : ").append(SignalStore.settings().getCensorshipCircumventionEnabled()).append("\n")
34 .append("Network Reachable : ").append(SignalStore.misc().isServiceReachableWithoutCircumvention()).append(", last checked: ").append(SignalStore.misc().getLastCensorshipServiceReachabilityCheckTime()).append("\n")
35 .append("Wifi Download : ").append(Util.join(TextSecurePreferences.getWifiMediaDownloadAllowed(context), ",")).append("\n")
36 .append("Roaming Download : ").append(Util.join(TextSecurePreferences.getRoamingMediaDownloadAllowed(context), ",")).append("\n")
37 .append("Mobile Download : ").append(Util.join(TextSecurePreferences.getMobileMediaDownloadAllowed(context), ",")).append("\n")
38 .append("Phone Number Sharing : ").append(SignalStore.phoneNumberPrivacy().isPhoneNumberSharingEnabled()).append(" (").append(SignalStore.phoneNumberPrivacy().getPhoneNumberSharingMode()).append(")\n")
39 .append("Phone Number Discoverable: ").append(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode()).append("\n");
40 }
41
42 private static String getThreadTrimmingString() {
43 if (SignalStore.settings().isTrimByLengthEnabled()) {
44 return "Enabled - Max length of " + SignalStore.settings().getThreadTrimLength();
45 } else if (SignalStore.settings().getKeepMessagesDuration() != KeepMessagesDuration.FOREVER) {
46 return "Enabled - Max age of " + SignalStore.settings().getKeepMessagesDuration();
47 } else {
48 return "Disabled";
49 }
50 }
51}