Copy in DNS test
This commit is contained in:
parent
de5574df45
commit
d4a5edac16
@ -53,6 +53,8 @@ public class RulesFragment extends Fragment {
|
||||
if (viewHolder instanceof RulesFragment.ViewHolder) {
|
||||
Rule rule = Rule.getRuleById(((ViewHolder) viewHolder).getId());
|
||||
if (rule != null && rule.isServiceAndUsing()) {
|
||||
Snackbar.make(view, R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null).show();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -94,6 +96,7 @@ public class RulesFragment extends Fragment {
|
||||
super.onDestroyView();
|
||||
|
||||
Daedalus.configurations.save();
|
||||
view = null;
|
||||
adapter = null;
|
||||
rule = null;
|
||||
}
|
||||
@ -222,6 +225,9 @@ public class RulesFragment extends Fragment {
|
||||
.putExtra(ConfigActivity.LAUNCH_ACTION_ID, Integer.parseInt(id))
|
||||
.putExtra(ConfigActivity.LAUNCH_ACTION_FRAGMENT, ConfigActivity.LAUNCH_FRAGMENT_RULE)
|
||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||
} else {
|
||||
Snackbar.make(view, R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null).show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -93,8 +93,7 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
}
|
||||
});
|
||||
|
||||
ListPreference checkUpdate = (ListPreference) findPreference("settings_check_update");
|
||||
checkUpdate.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
findPreference("settings_check_update").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/iTXTech/Daedalus/releases")));
|
||||
@ -102,8 +101,7 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
}
|
||||
});
|
||||
|
||||
ListPreference issueTracker = (ListPreference) findPreference("settings_issue_tracker");
|
||||
issueTracker.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
findPreference("settings_issue_tracker").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/iTXTech/Daedalus/issues")));
|
||||
@ -111,6 +109,14 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
}
|
||||
});
|
||||
|
||||
findPreference("settings_manual").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/iTXTech/Daedalus/wiki")));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
updateAdvancedOptions(advanced.isChecked());
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:id="@+id/textView_test_info"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="18sp"/>
|
||||
<org.itxtech.daedalus.widget.ClearAutoCompleteTextView
|
||||
android:completionThreshold="1"
|
||||
|
@ -27,7 +27,7 @@
|
||||
<string name="settings_count_number_of_queries">统计 DNS 查询次数</string>
|
||||
<string name="notification_queries">DNS 查询次数:</string>
|
||||
<string name="notice_legacy_api">当前 Android API 无法支持所有功能。</string>
|
||||
<string name="settings_bug_report">提交一个 Bug</string>
|
||||
<string name="settings_bug_report">提交反馈</string>
|
||||
<string name="settings_issue_summary">前往 GitHub 提交 Bug 反馈。</string>
|
||||
<string name="settings_dns_test_servers">DNS 测试服务器</string>
|
||||
<string name="navigation_drawer_close">关闭导航栏</string>
|
||||
@ -81,4 +81,6 @@
|
||||
<string name="settings_rule_import">导入</string>
|
||||
<string name="settings_rule_import_build_in">从内置规则导入</string>
|
||||
<string name="notice_after_stop">请在服务停止后更改启用的规则。</string>
|
||||
<string name="settings_manual">使用手册</string>
|
||||
<string name="settings_manual_summary">访问 GitHub wiki 页面。</string>
|
||||
</resources>
|
@ -81,4 +81,6 @@
|
||||
<string name="settings_rule_import">Import</string>
|
||||
<string name="settings_rule_import_build_in">Import from build in rules</string>
|
||||
<string name="notice_after_stop">Please modify activated rules after stopping service.</string>
|
||||
<string name="settings_manual">Manual</string>
|
||||
<string name="settings_manual_summary">Visit GitHub wiki page.</string>
|
||||
</resources>
|
||||
|
@ -72,5 +72,9 @@
|
||||
android:key="settings_issue_tracker"
|
||||
android:title="@string/settings_bug_report"
|
||||
android:summary="@string/settings_issue_summary"/>
|
||||
<org.itxtech.daedalus.widget.ClickPreference
|
||||
android:key="settings_manual"
|
||||
android:title="@string/settings_manual"
|
||||
android:summary="@string/settings_manual_summary"/>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user