mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Log capabilities.
This commit is contained in:
committed by
Greyson Parrelli
parent
52747782a7
commit
2001fa86cf
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user