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

Commit 57406a7e authored by Yiwen Chen's avatar Yiwen Chen Committed by Android (Google) Code Review
Browse files

Merge "Add Ramping Ringer platform flags and fix some Ringtone bugs."

parents 30dc0721 3d3ad023
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5556,6 +5556,12 @@ package android.provider {
    method public void onPropertyChanged(String, String, String);
  }
  public static interface DeviceConfig.Telephony {
    field public static final String NAMESPACE = "telephony";
    field public static final String PROPERTY_ENABLE_RAMPING_RINGER = "enable_ramping_ringer";
    field public static final String PROPERTY_RAMPING_RINGER_DURATION = "ramping_duration";
  }
  public final class DocumentsContract {
    method public static boolean isManageMode(android.net.Uri);
    method public static android.net.Uri setManageMode(android.net.Uri);
+18 −0
Original line number Diff line number Diff line
@@ -103,6 +103,24 @@ public final class DeviceConfig {
    @SystemApi
    public static final String NAMESPACE_NOTIFICATION_ASSISTANT = "notification_assistant";

    /**
     * Telephony related properties definitions.
     *
     * @hide
     */
    @SystemApi
    public interface Telephony {
        String NAMESPACE = "telephony";
        /**
         * Whether to apply ramping ringer on incoming phone calls.
         */
        String PROPERTY_ENABLE_RAMPING_RINGER = "enable_ramping_ringer";
        /**
         * Ringer ramping time in milliseconds.
         */
        String PROPERTY_RAMPING_RINGER_DURATION = "ramping_duration";
    }

    private static final Object sLock = new Object();
    @GuardedBy("sLock")
    private static Map<OnPropertyChangedListener, Pair<String, Executor>> sListeners =
+2 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ public class Ringtone {
        mAudioAttributes = attributes;
        // The audio attributes have to be set before the media player is prepared.
        // Re-initialize it.
        setUri(mUri);
        setUri(mUri, mVolumeShaperConfig);
    }

    /**
@@ -415,6 +415,7 @@ public class Ringtone {
            mLocalPlayer.reset();
            mLocalPlayer.release();
            mLocalPlayer = null;
            mVolumeShaper = null;
            synchronized (sActiveRingtones) {
                sActiveRingtones.remove(this);
            }