File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
xabber/src/main/java/com/xabber/android/ui/preferences Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ private String getSoundTitle(NotificationChannel channel) {
136136 if (channel == null ) return null ;
137137 Uri uri = channel .getSound ();
138138 Ringtone ringtone = RingtoneManager .getRingtone (getActivity (), uri );
139- return ringtone .getTitle (getActivity ());
139+ if (ringtone != null ) return ringtone .getTitle (getActivity ());
140+ else return "Unknown ringtone" ;
140141 }
141142
142143 @ Override
Original file line number Diff line number Diff line change @@ -123,13 +123,15 @@ private String getSoundTitle(NotificationChannel channel) {
123123 if (channel == null ) return null ;
124124 Uri uri = channel .getSound ();
125125 Ringtone ringtone = RingtoneManager .getRingtone (getActivity (), uri );
126- return ringtone .getTitle (getActivity ());
126+ if (ringtone != null ) return ringtone .getTitle (getActivity ());
127+ else return "Unknown ringtone" ;
127128 }
128129
129130 private String getSoundTitle (NotifyPrefs notifyPrefs ) {
130131 Uri uri = Uri .parse (notifyPrefs .getSound ());
131132 Ringtone ringtone = RingtoneManager .getRingtone (getActivity (), uri );
132- return ringtone .getTitle (getActivity ());
133+ if (ringtone != null ) return ringtone .getTitle (getActivity ());
134+ else return "Unknown ringtone" ;
133135 }
134136
135137 private String getVibroSummary (Context context , NotifyPrefs notifyPrefs ) {
You can’t perform that action at this time.
0 commit comments