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

Commit d5f46b10 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Ringtone: set default ringtone for triple slots"

parents 009ab7e4 349f854d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1008,10 +1008,15 @@ public class MediaScanner
                    // memorize default system ringtone persistently
                    setSettingIfNotSet(Settings.System.DEFAULT_RINGTONE, tableUri, rowId);

                    // set default ringtone uri for at least three slots
                    // irrespective of how many sim cards are actually supported
                    setSettingIfNotSet(Settings.System.RINGTONE, tableUri, rowId);
                    setSettingIfNotSet(Settings.System.RINGTONE_2, tableUri, rowId);
                    setSettingIfNotSet(Settings.System.RINGTONE_3, tableUri, rowId);

                    if (MSimTelephonyManager.getDefault().isMultiSimEnabled()) {
                        int phoneCount = MSimTelephonyManager.getDefault().getPhoneCount();
                        for (int i = MSimConstants.SUB2; i < phoneCount; i++) {
                        for (int i = MSimConstants.SUB3+1; i < phoneCount; i++) {
                            // Set the default setting to the given URI for multi SIMs
                            setSettingIfNotSet((Settings.System.RINGTONE + "_" + (i+1)), tableUri, rowId);
                        }