Log capabilities.

This commit is contained in:
Alan Evans
2020-06-24 17:23:16 -03:00
committed by Greyson Parrelli
parent 52747782a7
commit 2001fa86cf
3 changed files with 41 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
package org.thoughtcrime.securesms.logsubmit;
import android.content.Context;
import androidx.annotation.NonNull;
import org.thoughtcrime.securesms.AppCapabilities;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.whispersystems.signalservice.api.profiles.SignalServiceProfile;
public final class LogSectionCapabilities implements LogSection {
@Override
public @NonNull String getTitle() {
return "CAPABILITIES";
}
@Override
public @NonNull CharSequence getContent(@NonNull Context context) {
Recipient self = Recipient.self();
if (!self.isRegistered()) {
return "Unregistered";
} else {
SignalServiceProfile.Capabilities capabilities = AppCapabilities.getCapabilities(false);
return new StringBuilder().append("Local device UUID : ").append(capabilities.isUuid()).append("\n")
.append("Global UUID : ").append(self.getUuidCapability()).append("\n")
.append("Local device GV2 : ").append(capabilities.isGv2()).append("\n")
.append("Global GV2 : ").append(self.getGroupsV2Capability()).append("\n");
}
}
}

View File

@@ -60,6 +60,7 @@ public class SubmitDebugLogRepository {
}
add(new LogSectionPin());
add(new LogSectionThreads());
add(new LogSectionCapabilities());
add(new LogSectionFeatureFlags());
add(new LogSectionPermissions());
add(new LogSectionLogcat());