Skip to content

Commit

Permalink
Allow any devices to be auditee
Browse files Browse the repository at this point in the history
  • Loading branch information
quh4gko8 committed Aug 8, 2023
1 parent e2c025e commit e487c76
Showing 1 changed file with 1 addition and 107 deletions.
108 changes: 1 addition & 107 deletions app/src/main/java/app/attestation/auditor/AttestationActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,106 +139,6 @@ private enum Stage {
}
});

private static final boolean isSupportedAuditee = ImmutableSet.of(
"ALP-L29",
"AUM-L29",
"Aquaris X2 Pro",
"BBF100-1",
"BBF100-6",
"BKL-L04",
"BKL-L09",
"CLT-L29",
"COL-L29",
"DUB-LX3",
"CPH1831",
"CPH1903",
"CPH1909",
"EML-L09",
"EXODUS 1",
"G8341",
"G8342",
"G8441",
"GM1913",
"H3113",
"H3123",
"H4113",
"H8216",
"H8314",
"H8324",
"HTC 2Q55100",
"JKM-LX3",
"LLD-L31",
"LG-Q710AL",
"LM-Q720",
"LYA-L29",
"Mi A2",
"Mi A2 Lite",
"MI 9",
"moto g(7)",
"motorola one vision",
"Nokia 3.1",
"Nokia 6.1",
"Nokia 6.1 Plus",
"Nokia 7.1",
"Nokia 7 plus",
"ONEPLUS A6003",
"ONEPLUS A6013",
"Pixel 2",
"Pixel 2 XL",
"Pixel 3",
"Pixel 3 XL",
"Pixel 3a",
"Pixel 3a XL",
"Pixel 4",
"Pixel 4 XL",
"Pixel 4a",
"Pixel 4a (5G)",
"Pixel 5",
"Pixel 5a",
"Pixel 6",
"Pixel 6 Pro",
"Pixel 6a",
"Pixel 7",
"Pixel 7 Pro",
"Pixel 7a",
"Pixel Tablet",
"Pixel Fold",
"POCOPHONE F1",
"POT-LX3",
"REVVL 2",
"RMX1941",
"SM-A705FN",
"SM-G960F",
"SM-G960U",
"SM-G960U1",
"SM-G960W",
"SM-G9600",
"SM-G965F",
"SM-G965U",
"SM-G965U1",
"SM-G965W",
"SM-G970F",
"SM-G975F",
"SM-J260A",
"SM-J260F",
"SM-J260T1",
"SM-J337A",
"SM-J337AZ",
"SM-J337T",
"SM-J720F",
"SM-J737T1",
"SM-M205F",
"SM-N960F",
"SM-N960U",
"SM-N970F",
"SM-N970U",
"SM-N975U",
"SM-S367VL",
"SM-T510",
"SM-T835",
"SNE-LX1",
"vivo 1807").contains(Build.MODEL);

private static int getFirstApiLevel() {
return Integer.parseInt(SystemProperties.get("ro.product.first_api_level",
Integer.toString(Build.VERSION.SDK_INT)));
Expand All @@ -260,10 +160,6 @@ protected void onCreate(Bundle savedInstanceState) {
snackbar = Snackbar.make(rootView, "", Snackbar.LENGTH_LONG);

binding.content.auditee.setOnClickListener((final View view) -> {
if (!isSupportedAuditee) {
snackbar.setText(R.string.unsupported_auditee).show();
return;
}
stage = Stage.Auditee;
startQrScanner();
});
Expand Down Expand Up @@ -493,7 +389,6 @@ public void onActivityResult(final int requestCode, final int resultCode, final
@Override
public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.menu_attestation, menu);
menu.findItem(R.id.action_clear_auditee).setEnabled(isSupportedAuditee);
canSubmitSample = potentialSupportedAuditee() && !BuildConfig.DEBUG;
menu.findItem(R.id.action_submit_sample).setEnabled(canSubmitSample);
return true;
Expand All @@ -502,8 +397,7 @@ public boolean onCreateOptionsMenu(final Menu menu) {
@Override
public boolean onPrepareOptionsMenu(final Menu menu) {
final boolean isRemoteVerifyEnabled = RemoteVerifyJob.isEnabled(this);
menu.findItem(R.id.action_enable_remote_verify)
.setEnabled(isSupportedAuditee && !isRemoteVerifyEnabled);
menu.findItem(R.id.action_enable_remote_verify).setEnabled(!isRemoteVerifyEnabled);
menu.findItem(R.id.action_disable_remote_verify).setEnabled(isRemoteVerifyEnabled);
menu.findItem(R.id.action_submit_sample).setEnabled(canSubmitSample &&
!SubmitSampleJob.isScheduled(this));
Expand Down

0 comments on commit e487c76

Please sign in to comment.