mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-01 12:54:07 +00:00
Fixed technical info
This commit is contained in:
parent
1164ae404e
commit
1f3e638dd0
2 changed files with 22 additions and 25 deletions
|
@ -9,8 +9,8 @@ model {
|
|||
applicationId = "eu.faircode.netguard"
|
||||
minSdkVersion.apiLevel = 14
|
||||
targetSdkVersion.apiLevel = 23
|
||||
versionCode = 2016020201
|
||||
versionName = "0.81"
|
||||
versionCode = 2016020202
|
||||
versionName = "0.81-beta"
|
||||
archivesBaseName = "NetGuard-v$versionName-$versionCode"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -224,31 +224,28 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
// Development
|
||||
screen.removePreference(screen.findPreference("category_development"));
|
||||
prefs.edit().remove("loglevel").apply();
|
||||
|
||||
// Technical info
|
||||
screen.removePreference(screen.findPreference("category_technical"));
|
||||
} else {
|
||||
// Handle technical info
|
||||
Preference.OnPreferenceClickListener listener = new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
updateTechnicalInfo();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Technical info
|
||||
Preference pref_technical_info = screen.findPreference("technical_info");
|
||||
Preference pref_technical_network = screen.findPreference("technical_network");
|
||||
Preference pref_technical_subscription = screen.findPreference("technical_subscription");
|
||||
pref_technical_info.setEnabled(INTENT_VPN_SETTINGS.resolveActivity(this.getPackageManager()) != null);
|
||||
pref_technical_info.setIntent(INTENT_VPN_SETTINGS);
|
||||
pref_technical_info.setOnPreferenceClickListener(listener);
|
||||
pref_technical_network.setOnPreferenceClickListener(listener);
|
||||
pref_technical_subscription.setOnPreferenceClickListener(listener);
|
||||
updateTechnicalInfo();
|
||||
}
|
||||
|
||||
// Handle technical info
|
||||
Preference.OnPreferenceClickListener listener = new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
updateTechnicalInfo();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Technical info
|
||||
Preference pref_technical_info = screen.findPreference("technical_info");
|
||||
Preference pref_technical_network = screen.findPreference("technical_network");
|
||||
Preference pref_technical_subscription = screen.findPreference("technical_subscription");
|
||||
pref_technical_info.setEnabled(INTENT_VPN_SETTINGS.resolveActivity(this.getPackageManager()) != null);
|
||||
pref_technical_info.setIntent(INTENT_VPN_SETTINGS);
|
||||
pref_technical_info.setOnPreferenceClickListener(listener);
|
||||
pref_technical_network.setOnPreferenceClickListener(listener);
|
||||
pref_technical_subscription.setOnPreferenceClickListener(listener);
|
||||
updateTechnicalInfo();
|
||||
|
||||
// Handle devices without wifi
|
||||
if (!Util.hasWifi(this)) {
|
||||
PreferenceCategory defaults = (PreferenceCategory) screen.findPreference("category_defaults");
|
||||
|
|
Loading…
Reference in a new issue