Commit 81168dd9 authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

Preparation

Not allow Badge connection if the application is not registered
parent db446747
......@@ -151,21 +151,28 @@ public class MainActivity extends NFCActivity {
dialog.dismiss();
final ProgressDialog ringProgressDialog = ProgressDialog.show(MainActivity.this, "Connexion ...", "A faire ...", true);
ringProgressDialog.setCancelable(false);
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(2000);
} catch (Exception e) {
if (registered) {
final ProgressDialog ringProgressDialog = ProgressDialog.show(MainActivity.this, "Connexion ...", "A faire ...", true);
ringProgressDialog.setCancelable(false);
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(2000);
} catch (Exception e) {
}
ringProgressDialog.dismiss();
}
ringProgressDialog.dismiss();
}
}).start();
}).start();
}
}
protected void badgeDialog(final String idBadge) {
if (!registered) {
dialog.errorDialog(getResources().getString(R.string.badge_connection), getResources().getString(R.string.badge_app_not_registered));
return;
}
final View pinView = getLayoutInflater().inflate(R.layout.dialog_badge, null);
final EditText pinInput = pinView.findViewById(R.id.input_pin);
......
......@@ -31,4 +31,6 @@
<string name="cas_error_connection">Login et/ou mot de passe non reconnu par le CAS</string>
<string name="cas_error_service_adding">Une erreur a été détectée lors de l\'ajout du service</string>
<string name="cas_error_service_connection">Erreur lors de la connexion au service depuis le CAS</string>
<string name="badge_connection">Connexion via badge</string>
<string name="badge_app_not_registered">Il est nécessaire que l\'application soit enregistrée pour permettre la connexion via badge</string>
</resources>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment