mirror of https://github.com/M66B/FairEmail.git
Allow silent sound on older Android versions
This commit is contained in:
parent
2d50c3e57f
commit
020454af87
|
@ -311,7 +311,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
|||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
|
||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, getString(R.string.title_advanced_sound));
|
||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
|
||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
|
||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
|
||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, sound == null ? null : Uri.parse(sound));
|
||||
startActivityForResult(Helper.getChooser(getContext(), intent), ActivitySetup.REQUEST_SOUND);
|
||||
}
|
||||
|
@ -333,7 +333,9 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
|||
tvNoChannels.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.VISIBLE : View.GONE);
|
||||
|
||||
grpChannel.setVisibility(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ? View.VISIBLE : View.GONE);
|
||||
grpNotification.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.VISIBLE : View.GONE);
|
||||
grpNotification.setVisibility(
|
||||
Build.VERSION.SDK_INT < Build.VERSION_CODES.O || BuildConfig.DEBUG
|
||||
? View.VISIBLE : View.GONE);
|
||||
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
|
||||
|
||||
|
|
Loading…
Reference in New Issue