mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-04 20:34:14 +01:00
Include backup tier in support email.
This commit is contained in:
committed by
Michelle Tang
parent
9804c6cf5e
commit
338283eff5
@@ -11,6 +11,7 @@ import org.signal.core.util.ResourceUtil;
|
||||
import org.signal.core.util.Util;
|
||||
import org.thoughtcrime.securesms.BuildConfig;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.backup.v2.MessageBackupTier;
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
@@ -84,7 +85,9 @@ public final class SupportEmailUtil {
|
||||
"\n" +
|
||||
context.getString(R.string.SupportEmailUtil_challenge_received) + " " + getChallengeReceived() +
|
||||
"\n" +
|
||||
context.getString(R.string.SupportEmailUtil_registered) + " " + getRegistered(context);
|
||||
context.getString(R.string.SupportEmailUtil_registered) + " " + getRegistered(context) +
|
||||
"\n" +
|
||||
context.getString(R.string.SupportEmailUtil_backups) + " " + getBackupTier();
|
||||
}
|
||||
|
||||
private static CharSequence getDeviceInfo() {
|
||||
@@ -118,4 +121,18 @@ public final class SupportEmailUtil {
|
||||
boolean registered = SignalStore.account().isRegistered() && !TextSecurePreferences.isUnauthorizedReceived(context);
|
||||
return registered ? "yes" : "no";
|
||||
}
|
||||
|
||||
private static String getBackupTier() {
|
||||
MessageBackupTier tier = SignalStore.backup().getBackupTier();
|
||||
|
||||
if (tier == null) {
|
||||
return "D1";
|
||||
}
|
||||
|
||||
switch (tier) {
|
||||
case FREE: return "F1";
|
||||
case PAID: return "P1";
|
||||
default: return "D1";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3090,6 +3090,7 @@
|
||||
<string name="SupportEmailUtil_locale" translatable="false">Locale:</string>
|
||||
<string name="SupportEmailUtil_challenge_received" translatable="false">Challenge Received:</string>
|
||||
<string name="SupportEmailUtil_registered" translatable="false">Registered:</string>
|
||||
<string name="SupportEmailUtil_backups" translatable="false">Backups:</string>
|
||||
|
||||
<!-- ThreadRecord -->
|
||||
<string name="ThreadRecord_group_updated">Group updated</string>
|
||||
|
||||
Reference in New Issue
Block a user