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

Commit 9e4f2478 authored by Ronish Kalia's avatar Ronish Kalia Committed by Android (Google) Code Review
Browse files

Merge "Add support for directly opening ringtone picker"

parents 8d224da7 bbb49f38
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -58,6 +58,9 @@ public class SoundSettings extends DashboardFragment implements OnActivityResult
    private static final int REQUEST_CODE = 200;
    private static final int SAMPLE_CUTOFF = 2000;  // manually cap sample playback at 2 seconds

    private static final String EXTRA_OPEN_PHONE_RINGTONE_PICKER =
            "EXTRA_OPEN_PHONE_RINGTONE_PICKER";

    @VisibleForTesting
    static final int STOP_SAMPLE = 1;

@@ -102,6 +105,12 @@ public class SoundSettings extends DashboardFragment implements OnActivityResult
        replaceEnterpriseStringTitle("sound_work_settings",
                WORK_PROFILE_SOUND_SETTINGS_SECTION_HEADER,
                R.string.sound_work_settings);
        boolean openPhoneRingtonePicker = getIntent().getBooleanExtra(
                EXTRA_OPEN_PHONE_RINGTONE_PICKER, false);
        Preference phoneRingTonePreference = findPreference("phone_ringtone");
        if (phoneRingTonePreference != null && openPhoneRingtonePicker) {
            onPreferenceTreeClick(phoneRingTonePreference);
        }
    }

    @Override