Merge "RingtoneManager#setActualDefaultRingtone() open OutputStream of cacheUri with "wt" mode"

This commit is contained in:
Ian Baker
2023-02-22 11:42:17 +00:00
committed by Gerrit Code Review

View File

@@ -841,7 +841,7 @@ public class RingtoneManager {
if (ringtoneUri != null) {
final Uri cacheUri = getCacheForType(type, context.getUserId());
try (InputStream in = openRingtone(context, ringtoneUri);
OutputStream out = resolver.openOutputStream(cacheUri)) {
OutputStream out = resolver.openOutputStream(cacheUri, "wt")) {
FileUtils.copy(in, out);
} catch (IOException e) {
Log.w(TAG, "Failed to cache ringtone: " + e);