Link priority setting to message channel setting on Oreo+

When using notification channels, us setting priority actually has
no effect. So instead of having a non-functional setting, we've
routed the notification priority setting to go to the system
notification channel settings page for our Messages channel.
This commit is contained in:
Greyson Parrelli
2018-08-15 12:11:10 -07:00
parent 10a790df88
commit a6473bc922
6 changed files with 47 additions and 6 deletions

View File

@@ -16,8 +16,9 @@ import org.thoughtcrime.securesms.util.ViewUtil;
public class SignalListPreference extends ListPreference {
private TextView rightSummary;
private TextView rightSummary;
private CharSequence summary;
private boolean dialogDisabled;
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public SignalListPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
@@ -63,4 +64,15 @@ public class SignalListPreference extends ListPreference {
this.rightSummary.setText(summary);
}
}
public void disableDialog() {
dialogDisabled = true;
}
@Override
protected void onClick() {
if (!dialogDisabled) {
super.onClick();
}
}
}