Removed some unnecessary notifications
This commit is contained in:
parent
9b7bd3687d
commit
2a04f3a29b
@ -4,7 +4,6 @@ import android.content.Context;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.support.design.widget.Snackbar;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -174,9 +173,9 @@ public class DnsTestFragment extends ToolbarFragment {
|
|||||||
startTestBut.setOnClickListener(new View.OnClickListener() {
|
startTestBut.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Snackbar.make(v, R.string.notice_start_test, Snackbar.LENGTH_SHORT)
|
/*Snackbar.make(v, R.string.notice_start_test, Snackbar.LENGTH_SHORT)
|
||||||
.setAction("Action", null).show();
|
.setAction("Action", null).show();*/
|
||||||
startTestBut.setVisibility(View.INVISIBLE);
|
startTestBut.setEnabled(false);
|
||||||
|
|
||||||
InputMethodManager imm = (InputMethodManager) Daedalus.getInstance().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) Daedalus.getInstance().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||||
@ -249,7 +248,7 @@ public class DnsTestFragment extends ToolbarFragment {
|
|||||||
textViewTestInfo.setText((String) msg.obj);
|
textViewTestInfo.setText((String) msg.obj);
|
||||||
break;
|
break;
|
||||||
case MSG_TEST_DONE:
|
case MSG_TEST_DONE:
|
||||||
startTestBtn.setVisibility(View.VISIBLE);
|
startTestBtn.setEnabled(true);
|
||||||
stopThread();
|
stopThread();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,8 @@ public class GlobalConfigFragment extends PreferenceFragment {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
preference.setSummary(DNSServerHelper.getDescription((String) newValue, Daedalus.getInstance()));
|
preference.setSummary(DNSServerHelper.getDescription((String) newValue, Daedalus.getInstance()));
|
||||||
Snackbar.make(getView(), R.string.notice_need_restart, Snackbar.LENGTH_LONG)
|
/*Snackbar.make(getView(), R.string.notice_need_restart, Snackbar.LENGTH_LONG)
|
||||||
.setAction("Action", null).show();
|
.setAction("Action", null).show();*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -57,8 +57,8 @@ public class GlobalConfigFragment extends PreferenceFragment {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
preference.setSummary(DNSServerHelper.getDescription((String) newValue, Daedalus.getInstance()));
|
preference.setSummary(DNSServerHelper.getDescription((String) newValue, Daedalus.getInstance()));
|
||||||
Snackbar.make(getView(), R.string.notice_need_restart, Snackbar.LENGTH_LONG)
|
/*Snackbar.make(getView(), R.string.notice_need_restart, Snackbar.LENGTH_LONG)
|
||||||
.setAction("Action", null).show();
|
.setAction("Action", null).show();*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -62,8 +62,8 @@ public class RulesFragment extends ToolbarFragment implements Toolbar.OnMenuItem
|
|||||||
if (viewHolder instanceof RulesFragment.ViewHolder) {
|
if (viewHolder instanceof RulesFragment.ViewHolder) {
|
||||||
Rule rule = Rule.getRuleById(((ViewHolder) viewHolder).getId());
|
Rule rule = Rule.getRuleById(((ViewHolder) viewHolder).getId());
|
||||||
if (rule != null && rule.isServiceAndUsing()) {
|
if (rule != null && rule.isServiceAndUsing()) {
|
||||||
Snackbar.make(getView(), R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
/*Snackbar.make(getView(), R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
||||||
.setAction("Action", null).show();
|
.setAction("Action", null).show();*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,10 +229,10 @@ public class RulesFragment extends ToolbarFragment implements Toolbar.OnMenuItem
|
|||||||
rule.setUsing(!v.isSelected());
|
rule.setUsing(!v.isSelected());
|
||||||
v.setSelected(!v.isSelected());
|
v.setSelected(!v.isSelected());
|
||||||
}
|
}
|
||||||
} else {
|
}/* else {
|
||||||
Snackbar.make(view, R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
Snackbar.make(view, R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
||||||
.setAction("Action", null).show();
|
.setAction("Action", null).show();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -243,10 +243,10 @@ public class RulesFragment extends ToolbarFragment implements Toolbar.OnMenuItem
|
|||||||
.putExtra(ConfigActivity.LAUNCH_ACTION_ID, Integer.parseInt(id))
|
.putExtra(ConfigActivity.LAUNCH_ACTION_ID, Integer.parseInt(id))
|
||||||
.putExtra(ConfigActivity.LAUNCH_ACTION_FRAGMENT, ConfigActivity.LAUNCH_FRAGMENT_RULE)
|
.putExtra(ConfigActivity.LAUNCH_ACTION_FRAGMENT, ConfigActivity.LAUNCH_FRAGMENT_RULE)
|
||||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||||
} else {
|
}/* else {
|
||||||
Snackbar.make(view, R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
Snackbar.make(view, R.string.notice_after_stop, Snackbar.LENGTH_LONG)
|
||||||
.setAction("Action", null).show();
|
.setAction("Action", null).show();
|
||||||
}
|
}*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user