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

Commit cfdbf4ef authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix inconsistency in ringtone list"

parents 05081aa3 19035013
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -521,12 +521,12 @@ public class RingtoneManager {
    public int getRingtonePosition(Uri ringtoneUri) {
        try {
            if (ringtoneUri == null) return -1;
            final long ringtoneId = ContentUris.parseId(ringtoneUri);

            final Cursor cursor = getCursor();
            cursor.moveToPosition(-1);
            while (cursor.moveToNext()) {
                if (ringtoneId == cursor.getLong(ID_COLUMN_INDEX)) {
                Uri uriFromCursor = getUriFromCursor(mContext, cursor);
                if (ringtoneUri.equals(uriFromCursor)) {
                    return cursor.getPosition();
                }
            }