Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe13eebe authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am 9d14e3ea: am 9b8b417c: Merge "When updating existing entries in the media...

am 9d14e3ea: am 9b8b417c: Merge "When updating existing entries in the media database, don\'t update the is_music, is_ringtone, etc columns. This ensures that custom ringtones will still be shown in the ringtone picker after a rescan. Bug 2594125 Change-Id: I56761240d

Merge commit '9d14e3ea' into kraken

* commit '9d14e3ea':
  When updating existing entries in the media database, don't update
parents 5b550c9e 9d14e3ea
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -714,7 +714,12 @@ public class MediaScanner
                    }
                }
            }
            if (isAudio) {
            long rowId = entry.mRowId;
            if (isAudio && rowId == 0) {
                // Only set these for new entries. For existing entries, they
                // may have been modified later, and we want to keep the current
                // values so that custom ringtones still show up in the ringtone
                // picker.
                values.put(Audio.Media.IS_RINGTONE, ringtones);
                values.put(Audio.Media.IS_NOTIFICATION, notifications);
                values.put(Audio.Media.IS_ALARM, alarms);
@@ -764,7 +769,6 @@ public class MediaScanner
            }

            Uri result = null;
            long rowId = entry.mRowId;
            if (rowId == 0) {
                // new file, insert it
                result = mMediaProvider.insert(tableUri, values);