Commit b808f63a authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Disable suggestions for ipv6

parent f8aabbbd
...@@ -221,8 +221,8 @@ public class DNSCreationDialog extends UtilityDialog { ...@@ -221,8 +221,8 @@ public class DNSCreationDialog extends UtilityDialog {
private void setEditTextStates(){ private void setEditTextStates(){
if(settingV6 || customPorts){ if(settingV6 || customPorts){
ed_dns1.setInputType(InputType.TYPE_CLASS_TEXT); ed_dns1.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
ed_dns2.setInputType(InputType.TYPE_CLASS_TEXT); ed_dns2.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
} }
if(settingV6){ if(settingV6){
InputFilter filter = new InputCharacterFilter(customPorts ? InputFilter filter = new InputCharacterFilter(customPorts ?
......
...@@ -159,8 +159,8 @@ public class MainFragment extends Fragment { ...@@ -159,8 +159,8 @@ public class MainFragment extends Fragment {
startStopButton = (Button) findViewById(R.id.startStopButton); startStopButton = (Button) findViewById(R.id.startStopButton);
if(settingV6 || PreferencesAccessor.areCustomPortsEnabled(requireContext())){ if(settingV6 || PreferencesAccessor.areCustomPortsEnabled(requireContext())){
dns1.setInputType(InputType.TYPE_CLASS_TEXT); dns1.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
dns2.setInputType(InputType.TYPE_CLASS_TEXT); dns2.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
} }
startStopButton.setOnClickListener(new View.OnClickListener() { startStopButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -263,8 +263,8 @@ public class MainFragment extends Fragment { ...@@ -263,8 +263,8 @@ public class MainFragment extends Fragment {
private void setEditTextState(){ private void setEditTextState(){
boolean customPorts = PreferencesAccessor.areCustomPortsEnabled(requireContext()); boolean customPorts = PreferencesAccessor.areCustomPortsEnabled(requireContext());
if(settingV6 || customPorts){ if(settingV6 || customPorts){
dns1.setInputType(InputType.TYPE_CLASS_TEXT); dns1.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
dns2.setInputType(InputType.TYPE_CLASS_TEXT); dns2.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
} }
if(!settingV6){ if(!settingV6){
InputFilter filter = new InputCharacterFilter(customPorts ? InputFilter filter = new InputCharacterFilter(customPorts ?
...@@ -449,9 +449,9 @@ public class MainFragment extends Fragment { ...@@ -449,9 +449,9 @@ public class MainFragment extends Fragment {
} }
public boolean toggleCurrentInputFocus(){ public boolean toggleCurrentInputFocus(){
if(dns1.hasFocus()){ if(dns1 != null && dns1.hasFocus()){
dns2.requestFocus(); dns2.requestFocus();
}else if(dns2.hasFocus()){ }else if(dns2 != null && dns2.hasFocus()){
dns1.requestFocus(); dns1.requestFocus();
}else return false; }else return false;
return true; return true;
......
...@@ -320,8 +320,8 @@ public class ConfigureActivity extends AppCompatActivity { ...@@ -320,8 +320,8 @@ public class ConfigureActivity extends AppCompatActivity {
private void setInputType(){ private void setInputType(){
if(settingV6 || customPorts){ if(settingV6 || customPorts){
ed_dns1.setInputType(InputType.TYPE_CLASS_TEXT); ed_dns1.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
ed_dns2.setInputType(InputType.TYPE_CLASS_TEXT); ed_dns2.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
} }
InputFilter filter; InputFilter filter;
if(settingV6){ if(settingV6){
......
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