Commit 586b145c authored by Toni Beier's avatar Toni Beier

draft 2

parent f9f57d26
Pipeline #27837 failed with stages
in 1 minute and 26 seconds
......@@ -3,6 +3,9 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<compositeConfiguration>
<compositeBuild compositeDefinitionSource="SCRIPT" />
</compositeConfiguration>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
......@@ -12,6 +15,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="testRunner" value="PLATFORM" />
</GradleProjectSettings>
</option>
</component>
......
......@@ -5,26 +5,41 @@
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<list size="12">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="4" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="android.annotation.Nullable" />
<item index="7" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="10" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
<item index="11" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<list size="11">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="android.annotation.NonNull" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
package de.tu_chemnitz.wlan;
public class EduroamConfiguration {
private boolean eduroamConfigurationIsAvailable;
private boolean eduroamConfigurationIsValid;
}
package de.tu_chemnitz.wlan;
import android.content.Context;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import com.google.common.base.Optional;
import com.google.common.collect.FluentIterable;
import com.google.common.graph.ElementOrder;
import com.google.common.graph.Graph;
import com.google.common.graph.GraphBuilder;
import com.google.common.graph.ImmutableGraph;
public class EduroamWifiAnalyser {
public Graph execute( WifiManager wifiManager, Context context ) {
ImmutableGraph.Builder <StatusInfo> statusInfos = GraphBuilder
.directed()
.nodeOrder(ElementOrder.insertion())
.<StatusInfo>immutable();
WifiManager wifi = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
Optional<WifiConfiguration> eduroamWifiConfiguration = FluentIterable.from(wifi.getConfiguredNetworks())
.filter(wifiConfiguration -> wifiConfiguration.networkId != 0)
.filter(wifiConfiguration -> {
//some samsung devices return eduroam with leading and ending "-Symbols: "eduroam"
String wifiSSID = wifiConfiguration.SSID;
if (wifiSSID.startsWith("\"") && wifiSSID.endsWith("\"")) {
wifiSSID = wifiSSID.substring(1, wifiSSID.length() - 1);
}
return context.getString(R.string.eduroam_ssid).equals(wifiSSID);
})
.first();
if (eduroamWifiConfiguration.isPresent()) {
}
}
......@@ -89,9 +89,9 @@ class Helper {
//static ReentrantLock install_list_lock = new ReentrantLock();
static String[] status_tags = { // used to verify all needed for install is set
"wifiEnabled",
"hasInternet",
"isSecure"
StatusTag.WIFI_ENABLED.getLegacyStatusTagString(),
StatusTag.HAS_INTERNET.getLegacyStatusTagString(),
StatusTag.IS_SECURE.getLegacyStatusTagString()
};
static String[] install_order = { // used for display order & later UI changes
......@@ -195,14 +195,14 @@ class Helper {
queue.add(request);
}
static MainActivity.TickLine getByTag(List<MainActivity.TickLine> list, String tag) {
static MainActivity.TickLine getByTag(List<MainActivity.TickLine> list, String searchTag) {
if (list == null)
return null;
for (MainActivity.TickLine tick : list) {
if (tick != null && tag.equals(tick._tag))
return tick;
}
return null;
return FluentIterable.from(list)
.filter(Predicates.notNull())
.firstMatch( tickLine -> searchTag.equals(tickLine._tag))
.orNull();
}
/*static void getDeviceInfoPOSTString(Map<String, String> map) {
......@@ -591,178 +591,183 @@ class Helper {
List<MainActivity.TickLine> list = new ArrayList<>();
WifiManager wifi = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifi.isWifiEnabled()) {
MainActivity.TickLine tick = new MainActivity.TickLine(true, context.getResources().getString(R.string.tickline_message_wifi_enabled), context.getResources().getString(R.string.msg_available), false);
tick._tag = status_tags[0];
Optional<WifiConfiguration> eduroamWifiConfiguration = FluentIterable.from(wifi.getConfiguredNetworks())
.filter(wifiConfiguration -> wifiConfiguration.networkId != 0)
.filter(wifiConfiguration -> {
//some samsung devices return eduroam with leading and ending "-Symbols: "eduroam"
String wifiSSID = wifiConfiguration.SSID;
if (wifiSSID.startsWith("\"") && wifiSSID.endsWith("\"")) {
wifiSSID = wifiSSID.substring(1, wifiSSID.length() - 1);
}
return context.getString(R.string.eduroam_ssid).equals(wifiSSID);
})
.first();
if (eduroamWifiConfiguration.isPresent()) {
MainActivity.TickLine tick = new MainActivity.TickLine(true, context.getResources().getString(R.string.tickline_message_eduroam_is_configured), context.getResources().getString(R.string.tickline_category_eduroam_already_configured), false);
list.add(tick);
Optional<WifiConfiguration> eduroamWifiConfiguration = FluentIterable.from(wifi.getConfiguredNetworks()).firstMatch(wifiConfiguration -> {
//some samsung devices return eduroam with leading and ending "-Symbols: "eduroam"
String wifiSSID = wifiConfiguration.SSID;
if (wifiSSID.startsWith("\"") && wifiSSID.endsWith("\"")) {
wifiSSID = wifiSSID.substring(1, wifiSSID.length() - 1);
}
if (wifi.isWifiEnabled()) {
tick = new MainActivity.TickLine(true, context.getResources().getString(R.string.tickline_message_wifi_enabled), context.getResources().getString(R.string.msg_available), false);
tick._tag = status_tags[0];
list.add(tick);
if (eduroamWifiConfiguration.isPresent()) {
WifiConfiguration checkingEduroamWifiConfiguration = eduroamWifiConfiguration.get();
String message;
boolean ticked = true;
message = checkingEduroamWifiConfiguration.SSID;
if (checkingEduroamWifiConfiguration.allowedGroupCiphers.toString().contains(","))
message += " with mixed mode";
else if (checkingEduroamWifiConfiguration.allowedGroupCiphers.toString().contains("2"))
message += " with CCMP";
else if (checkingEduroamWifiConfiguration.allowedGroupCiphers.toString().contains("2"))
message += " with TKIP";
list.add(new MainActivity.TickLine(ticked, message, "SSID", false));
ticked = false;
message = checkingEduroamWifiConfiguration.enterpriseConfig.getIdentity();
if (message != null && !message.isEmpty()) {
if (message.contains("@")) {
message = message.substring(0, message.indexOf('@'));
if (message.contains("-")) {
message = message.substring(0, message.indexOf('-'));
ticked = true;
}
}
} else {
message = context.getString(R.string.tickline_subtext_user_identity_not_found);
ticked = false;
}
list.add(new MainActivity.TickLine(ticked, message, context.getString(R.string.tickline_category_user_identity), false));
return context.getString(R.string.eduroam_ssid).equals(wifiSSID) && wifiConfiguration.networkId != 0;
});
if (eduroamWifiConfiguration.isPresent()) {
WifiConfiguration checkingEduroamWifiConfiguration = eduroamWifiConfiguration.get();
String message;
boolean ticked = true;
message = checkingEduroamWifiConfiguration.SSID;
if (checkingEduroamWifiConfiguration.allowedGroupCiphers.toString().contains(","))
message += " with mixed mode";
else if (checkingEduroamWifiConfiguration.allowedGroupCiphers.toString().contains("2"))
message += " with CCMP";
else if (checkingEduroamWifiConfiguration.allowedGroupCiphers.toString().contains("2"))
message += " with TKIP";
list.add(new MainActivity.TickLine(ticked, message, "SSID", false));
ticked = false;
message = checkingEduroamWifiConfiguration.enterpriseConfig.getIdentity();
if (message != null && !message.isEmpty()) {
if (message.contains("@")) {
message = message.substring(0, message.indexOf('@'));
if (message.contains("-")) {
message = message.substring(0, message.indexOf('-'));
if (checkingEduroamWifiConfiguration.enterpriseConfig.getAnonymousIdentity().length() > 0) {
String anonymousIdentity = checkingEduroamWifiConfiguration.enterpriseConfig.getAnonymousIdentity();
if (!anonymousIdentity.equals(context.getString(R.string.edurom_anonymous_identity))) {
message = context.getString(R.string.edurom_error_old_configuration, anonymousIdentity);
ticked = false;
} else {
message = anonymousIdentity;
ticked = true;
}
} else {
message = context.getResources().getString(R.string.msg_not_set);
ticked = false;
}
} else {
message = context.getString(R.string.tickline_subtext_user_identity_not_found);
ticked = false;
}
list.add(new MainActivity.TickLine(ticked, message, context.getResources().getString(R.string.tickline_category_anonymous_identity), true));
list.add(new MainActivity.TickLine(ticked, message, context.getString(R.string.tickline_category_user_identity), false));
if (checkingEduroamWifiConfiguration.enterpriseConfig.getAnonymousIdentity().length() > 0) {
String anonymousIdentity = checkingEduroamWifiConfiguration.enterpriseConfig.getAnonymousIdentity();
if (!anonymousIdentity.equals(context.getString(R.string.edurom_anonymous_identity))) {
message = context.getString(R.string.edurom_error_old_configuration, anonymousIdentity);
ticked = true;
if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.PEAP)
message = "PEAP with ";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.PWD)
message = "PWD with ";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TLS)
message = "TLS";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TTLS)
message = "TTLS with ";
else {
message = "EAP Method error";
ticked = false;
} else {
message = anonymousIdentity;
ticked = true;
}
} else {
message = context.getResources().getString(R.string.msg_not_set);
ticked = false;
}
list.add(new MainActivity.TickLine(ticked, message, context.getResources().getString(R.string.tickline_category_anonymous_identity), true));
ticked = true;
if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.PEAP)
message = "PEAP with ";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.PWD)
message = "PWD with ";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TLS)
message = "TLS";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TTLS)
message = "TTLS with ";
else {
message = "EAP Method error";
ticked = false;
}
if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.TLS) {
if (checkingEduroamWifiConfiguration.enterpriseConfig.getPhase2Method() == WifiEnterpriseConfig.Phase2.MSCHAPV2)
message += "Phase2: MSCHAPv2";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getPhase2Method() == WifiEnterpriseConfig.Phase2.GTC)
message += "Phase2: GTC";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getPhase2Method() == WifiEnterpriseConfig.Phase2.PAP)
message += "Phase2: PAP";
else message += "Phase2 Missing";
}
list.add(new MainActivity.TickLine(ticked, message, "EAP Methode", true));
// WifiManager::getConfiguredNetworks return WifiConfiguration instances with incomplete information
// There is no right way to verify the CA certificate in a configured WLAN.
// Transforms WifiEnterpriseConfig instance to string value and check the ca_cert value
Map<String, String> currentWifiConfigurationValues = new HashMap<>();
// Parse string representation of enterprise config
for (String wifiConfigurationLine : checkingEduroamWifiConfiguration.enterpriseConfig.toString().split(String.valueOf('\n'))) {
String wifiConfigurationValueIdentifier = null;
String wifiConfigurationValue = null;
// Check if identifier has value and add identifier and maybe value to a map
String[] wifiConfigurationLineSegments = wifiConfigurationLine.split(String.valueOf(' '));
if (wifiConfigurationLineSegments.length >= 1) {
wifiConfigurationValueIdentifier = wifiConfigurationLineSegments[0];
if (wifiConfigurationLineSegments.length >= 2) {
wifiConfigurationValue = wifiConfigurationLineSegments[1];
if (checkingEduroamWifiConfiguration.enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.TLS) {
if (checkingEduroamWifiConfiguration.enterpriseConfig.getPhase2Method() == WifiEnterpriseConfig.Phase2.MSCHAPV2)
message += "Phase2: MSCHAPv2";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getPhase2Method() == WifiEnterpriseConfig.Phase2.GTC)
message += "Phase2: GTC";
else if (checkingEduroamWifiConfiguration.enterpriseConfig.getPhase2Method() == WifiEnterpriseConfig.Phase2.PAP)
message += "Phase2: PAP";
else message += "Phase2 Missing";
}
list.add(new MainActivity.TickLine(ticked, message, "EAP Methode", true));
// WifiManager::getConfiguredNetworks return WifiConfiguration instances with incomplete information
// There is no right way to verify the CA certificate in a configured WLAN.
// Transforms WifiEnterpriseConfig instance to string value and check the ca_cert value
Map<String, String> currentWifiConfigurationValues = new HashMap<>();
// Parse string representation of enterprise config
for (String wifiConfigurationLine : checkingEduroamWifiConfiguration.enterpriseConfig.toString().split(String.valueOf('\n'))) {
String wifiConfigurationValueIdentifier = null;
String wifiConfigurationValue = null;
// Check if identifier has value and add identifier and maybe value to a map
String[] wifiConfigurationLineSegments = wifiConfigurationLine.split(String.valueOf(' '));
if (wifiConfigurationLineSegments.length >= 1) {
wifiConfigurationValueIdentifier = wifiConfigurationLineSegments[0];
if (wifiConfigurationLineSegments.length >= 2) {
wifiConfigurationValue = wifiConfigurationLineSegments[1];
}
currentWifiConfigurationValues.put(wifiConfigurationValueIdentifier, wifiConfigurationValue);
}
currentWifiConfigurationValues.put(wifiConfigurationValueIdentifier, wifiConfigurationValue);
}
}
// If ca_cert is in map/string, then check value.
String currentWifiConfigurationCaCertValue = currentWifiConfigurationValues.get("ca_cert");
if (currentWifiConfigurationCaCertValue != null) {
if (currentWifiConfigurationCaCertValue.contains("PEAP") && currentWifiConfigurationCaCertValue.contains("eduroam")
&& currentWifiConfigurationCaCertValue.contains("EAPIEEE8021X") && currentWifiConfigurationCaCertValue.contains("PEAP")) {
message = context.getString(R.string.tickline_subtext_ca_cert_certificate_ok);
ticked = true;
// If ca_cert is in map/string, then check value.
String currentWifiConfigurationCaCertValue = currentWifiConfigurationValues.get("ca_cert");
if (currentWifiConfigurationCaCertValue != null) {
if (currentWifiConfigurationCaCertValue.contains("PEAP") && currentWifiConfigurationCaCertValue.contains("eduroam")
&& currentWifiConfigurationCaCertValue.contains("EAPIEEE8021X") && currentWifiConfigurationCaCertValue.contains("PEAP")) {
message = context.getString(R.string.tickline_subtext_ca_cert_certificate_ok);
ticked = true;
} else {
message = context.getString(R.string.tickline_subtext_ca_cert_certificate_wrong);
ticked = false;
}
} else {
message = context.getString(R.string.tickline_subtext_ca_cert_certificate_wrong);
message = context.getString(R.string.tickline_subtext_ca_cert_certificate_not_found);
ticked = false;
}
} else {
message = context.getString(R.string.tickline_subtext_ca_cert_certificate_not_found);
ticked = false;
}
list.add(new MainActivity.TickLine(ticked, message, context.getString(R.string.tickline_message_ca_cert), true));
list.add(new MainActivity.TickLine(ticked, message, context.getString(R.string.tickline_message_ca_cert), true));
String subjectMatch;
if (Build.VERSION.SDK_INT >= 23)
subjectMatch = checkingEduroamWifiConfiguration.enterpriseConfig.getAltSubjectMatch();
else
subjectMatch = checkingEduroamWifiConfiguration.enterpriseConfig.getSubjectMatch();
String subjectMatch;
if (Build.VERSION.SDK_INT >= 23)
subjectMatch = checkingEduroamWifiConfiguration.enterpriseConfig.getAltSubjectMatch();
else
subjectMatch = checkingEduroamWifiConfiguration.enterpriseConfig.getSubjectMatch();
if (subjectMatch != null && subjectMatch.length() > 0) {
message = context.getString(R.string.tickline_message_server_subject_match_ok);
ticked = true;
} else {
message = "Missing";
ticked = false;
}
list.add(new MainActivity.TickLine(ticked, message, "Server Subject Match", true));
if (subjectMatch != null && subjectMatch.length() > 0) {
message = context.getString(R.string.tickline_message_server_subject_match_ok);
ticked = true;
} else {
message = "Missing";
ticked = false;
}
list.add(new MainActivity.TickLine(ticked, message, "Server Subject Match", true));
message = context.getResources().getString(R.string.tickline_message_techincal_parameters);
if (list.get(3).ticked && list.get(4).ticked && list.get(5).ticked && list.get(6).ticked) {
message += " " + context.getResources().getString(R.string.tickline_message_are_correct);
ticked = true;
} else {
message += " " + context.getResources().getString(R.string.tickline_message_not_correct);
ticked = false;
}
list.add(3, new MainActivity.TickLine(ticked, message, "", false));
message = context.getResources().getString(R.string.tickline_message_techincal_parameters);
if (list.get(3).ticked && list.get(4).ticked && list.get(5).ticked && list.get(6).ticked) {
message += " " + context.getResources().getString(R.string.tickline_message_are_correct);
ticked = true;
} else {
message += " " + context.getResources().getString(R.string.tickline_message_not_correct);
ticked = false;
}
list.add(3, new MainActivity.TickLine(ticked, message, "", false));
// try to update network config without config change to check if config is managed by app
// if eduroam is not marked as writable, test it. Remember the result.
if (!IS_EDUROAM_WIFI_WRITABLE.get()) {
IS_EDUROAM_WIFI_WRITABLE.set(wifi.updateNetwork(checkingEduroamWifiConfiguration) != -1);
// try to update network config without config change to check if config is managed by app
// if eduroam is not marked as writable, test it. Remember the result.
if (!IS_EDUROAM_WIFI_WRITABLE.get()) {
IS_EDUROAM_WIFI_WRITABLE.set(wifi.updateNetwork(checkingEduroamWifiConfiguration) != -1);
}
tick = new MainActivity.TickLine(IS_EDUROAM_WIFI_WRITABLE.get(), context.getString(R.string.tickline_message_wifi_writable), IS_EDUROAM_WIFI_WRITABLE.get() ? context.getString(R.string.tickline_subtext_wifi_writable) : context.getString(R.string.tickline_subtext_wifi_notwritable), false);
tick._tag = context.getString(R.string.tick_tag_wifi_writable);
list.add(tick);
}
tick = new MainActivity.TickLine(IS_EDUROAM_WIFI_WRITABLE.get(), context.getString(R.string.tickline_message_wifi_writable), IS_EDUROAM_WIFI_WRITABLE.get() ? context.getString(R.string.tickline_subtext_wifi_writable) : context.getString(R.string.tickline_subtext_wifi_notwritable), false);
tick._tag = context.getString(R.string.tick_tag_wifi_writable);
} else {
tick = new MainActivity.TickLine(false, context.getResources().getString(R.string.tickline_message_wifi_disabled), context.getResources().getString(R.string.msg_available), false);
tick._tag = status_tags[0];
list.add(tick);
}
} else {
MainActivity.TickLine tick = new MainActivity.TickLine(false, context.getResources().getString(R.string.tickline_message_wifi_disabled), context.getResources().getString(R.string.msg_available), false);
tick._tag = status_tags[0];
MainActivity.TickLine tick = new MainActivity.TickLine(false, context.getResources().getString(R.string.tickline_message_eduroam_is_not_configured), context.getResources().getString(R.string.tickline_category_eduroam_already_configured), false);
list.add(tick);
}
MainActivity.TickLine tick = getByTag(list, status_tags[0]);
//Samsung gibt nicht eduroam als ssid zurück sondern "eduroam"
Collection<WifiConfiguration> avaliabelWifiConfiguration = ((WifiManager) context.getSystemService(Context.WIFI_SERVICE)).getConfiguredNetworks();
Optional<WifiConfiguration> eduroamWifiConfiguration = FluentIterable.from(avaliabelWifiConfiguration).firstMatch(wifiConfiguration -> wifiConfiguration.SSID.replace("\"", "").equals(context.getString(R.string.eduroam_ssid)));
if (!eduroamWifiConfiguration.isPresent()) {
list.add(new MainActivity.TickLine(false, context.getResources().getString(R.string.message_no_ssid_configuration, ssid), context.getResources().getString(R.string.msg_available), false));
}
return list;
}
......
......@@ -50,12 +50,25 @@ import static de.tu_chemnitz.wlan.Helper.username;
public class MainActivity extends AppCompatActivity {
static class TickLine {
private StatusTag statusTag;
TickLine(boolean ticked, String text, String subtext, boolean subentry, StatusTag statusTag) {
this.ticked = ticked;
this.text = text;
this.subtext = subtext;
this.subentry = subentry;
this.statusTag = statusTag;
this._tag = statusTag.getLegacyStatusTagString();
}
TickLine(boolean ticked, String text, String subtext, boolean subentry) {
this.ticked = ticked;
this.text = text;
this.subtext = subtext;
this.subentry = subentry;
}
String text, subtext, _tag;
boolean ticked, subentry, working;
......
package de.tu_chemnitz.wlan;
public class StatusInfo {
}
package de.tu_chemnitz.wlan;
public class StatusTag extends Enum {
public enum StatusTag {
public static final WIFI_ENABLED = new StatusTag( "WIFI_ENABLED", 0, "wifiEnabled"" );
WIFI_ENABLED ("wifiEnabled" ), HAS_INTERNET("hasInternet"), IS_SECURE("isSecure");
private String legacyStatusTagString;
private StatusTag( String name, int index, String legacyStatusTagString ) {
super( name, index );
StatusTag( String legacyStatusTagString ) {
this.legacyStatusTagString = legacyStatusTagString;
}
public String getLegacyStatusTagString() {
return legacyStatusTagString;
}
}
......@@ -14,6 +14,7 @@
<string name="tickline_message_wifi_disabled">WLAN ist deaktiviert</string>
<string name="tickline_category_wifi_availability">Verfügbarkeit</string>
<string name="tickline_category_app_version">App Version</string>
<string name="tickline_category_eduroam_already_configured">Vorhanden Eduroam Konfiguration</string>
<string name="tickline_message_server_subject_match_ok">OK</string>
<string name="tickline_message_wifi_writable">Zugriff auf WLAN Konfiguration</string>
<string name="tickline_subtext_wifi_writable">App darf eduraom konfigurieren</string>
......@@ -34,6 +35,8 @@
<string name="tickline_message_techincal_parameters">Technische Parameter </string>
<string name="tickline_message_are_correct">sicher</string>
<string name="tickline_message_not_correct">unsicher</string>
<string name="tickline_message_eduroam_is_configured">Eduroam Wifi gefunden</string>
<string name="tickline_message_eduroam_is_not_configured">Eduroam ist nicht auf ihrem Handy konfiguriert</string>
<plurals name="connect_to_internet_message">
<item quantity="one">Bitte stelle eine Internetverbindung mit einem WLAN oder über mobile Daten her.\nIn der TU Chemnitz kannst du das WLAN Netz %1$s verwenden.</item>
......
Markdown is supported
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