Update registration to allow PIN entry.

This commit is contained in:
Greyson Parrelli
2020-04-07 13:19:53 -04:00
parent 6b37675a81
commit acbfff89d3
46 changed files with 1206 additions and 161 deletions

View File

@@ -0,0 +1,30 @@
package org.thoughtcrime.securesms.logsubmit;
import android.content.Context;
import androidx.annotation.NonNull;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
public class LogSectionPin implements LogSection {
@Override
public @NonNull String getTitle() {
return "PIN STATE";
}
@Override
public @NonNull CharSequence getContent(@NonNull Context context) {
return new StringBuilder().append("State: ").append(SignalStore.pinValues().getPinState()).append("\n")
.append("Last Successful Reminder Entry: ").append(SignalStore.pinValues().getLastSuccessfulEntryTime()).append("\n")
.append("Next Reminder Interval: ").append(SignalStore.pinValues().getCurrentInterval()).append("\n")
.append("ReglockV1: ").append(TextSecurePreferences.isV1RegistrationLockEnabled(context)).append("\n")
.append("ReglockV2: ").append(SignalStore.kbsValues().isV2RegistrationLockEnabled()).append("\n")
.append("Signal PIN: ").append(SignalStore.kbsValues().hasPin()).append("\n")
.append("Needs Account Restore: ").append(SignalStore.storageServiceValues().needsAccountRestore()).append("\n")
.append("PIN Required at Registration: ").append(SignalStore.registrationValues().pinWasRequiredAtRegistration()).append("\n")
.append("Registration Complete: ").append(SignalStore.registrationValues().isRegistrationComplete());
}
}

View File

@@ -58,6 +58,7 @@ public class SubmitDebugLogRepository {
if (Build.VERSION.SDK_INT >= 28) {
add(new LogSectionPower());
}
add(new LogSectionPin());
add(new LogSectionThreads());
add(new LogSectionFeatureFlags());
add(new LogSectionPermissions());