That fuck shit the fascists are using
1package org.tm.archive.devicetransfer;
2
3import androidx.annotation.NonNull;
4
5import static org.tm.archive.devicetransfer.SetupStep.VERIFY;
6
7/**
8 * State representation of the current {@link SetupStep} in the setup flow and
9 * the SAS if one has been provided.
10 */
11public final class DeviceSetupState {
12
13 private final SetupStep currentSetupStep;
14 private final int authenticationCode;
15
16 public DeviceSetupState() {
17 this(SetupStep.INITIAL, 0);
18 }
19
20 public DeviceSetupState(@NonNull SetupStep currentSetupStep, int authenticationCode) {
21 this.currentSetupStep = currentSetupStep;
22 this.authenticationCode = authenticationCode;
23 }
24
25 public @NonNull SetupStep getCurrentSetupStep() {
26 return currentSetupStep;
27 }
28
29 public int getAuthenticationCode() {
30 return authenticationCode;
31 }
32
33 public @NonNull DeviceSetupState updateStep(@NonNull SetupStep currentSetupStep) {
34 return new DeviceSetupState(currentSetupStep, this.authenticationCode);
35 }
36
37 public @NonNull DeviceSetupState updateVerificationRequired(int authenticationCode) {
38 return new DeviceSetupState(VERIFY, authenticationCode);
39 }
40}