As of 'N' we can no longer offer external ringtone selection

1. Replace custom ringtone picker with system Intent, since we
   don't need it anymore. Fixes #7174

2. Make sure 'silent' ringtone selection is stored appropriately
   Fixes #7115 Closes #7141

3. Replace any existing file:// notification URIs with the system
   default Fixes #7234
This commit is contained in:
Moxie Marlinspike
2017-12-01 12:55:24 -08:00
parent 4cb2ac7b27
commit 3523952ef9
11 changed files with 99 additions and 1129 deletions

View File

@@ -635,7 +635,17 @@ public class TextSecurePreferences {
}
public static String getNotificationRingtone(Context context) {
return getStringPreference(context, RINGTONE_PREF, Settings.System.DEFAULT_NOTIFICATION_URI.toString());
String result = getStringPreference(context, RINGTONE_PREF, Settings.System.DEFAULT_NOTIFICATION_URI.toString());
if (result != null && result.startsWith("file:")) {
result = Settings.System.DEFAULT_NOTIFICATION_URI.toString();
}
return result;
}
public static void setNotificationRingtone(Context context, String ringtone) {
setStringPreference(context, RINGTONE_PREF, ringtone);
}
public static boolean isNotificationVibrateEnabled(Context context) {