Add additional info to support emails and debuglogs.

This commit is contained in:
Greyson Parrelli
2020-05-06 15:02:26 -04:00
committed by Alex Hart
parent b156e4a79a
commit 3fef58057e
7 changed files with 187 additions and 79 deletions

View File

@@ -10,6 +10,8 @@ import android.view.WindowManager;
import androidx.annotation.NonNull;
import org.thoughtcrime.securesms.BuildConfig;
import org.thoughtcrime.securesms.util.AppSignatureUtil;
import org.thoughtcrime.securesms.util.ByteUnit;
import org.thoughtcrime.securesms.util.ServiceUtil;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
@@ -60,6 +62,7 @@ public class LogSectionSystemInfo implements LogSection {
} catch (PackageManager.NameNotFoundException nnfe) {
builder.append("Unknown\n");
}
builder.append("Package : ").append(BuildConfig.APPLICATION_ID).append(" (").append(getSigningString(context)).append(")");
return builder;
}
@@ -134,4 +137,8 @@ public class LogSectionSystemInfo implements LogSection {
private static @NonNull String getScreenRefreshRate(@NonNull Context context) {
return String.format(Locale.ENGLISH, "%.2f hz", ServiceUtil.getWindowManager(context).getDefaultDisplay().getRefreshRate());
}
private static String getSigningString(@NonNull Context context) {
return AppSignatureUtil.getAppSignature(context).or("Unknown");
}
}