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

Commit d86077c3 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Expose android.media.AudioManager.getProperty()" into jb-mr1-dev

parents ca2cb184 62796aac
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10854,6 +10854,7 @@ package android.media {
    method public void adjustVolume(int, int);
    method public int getMode();
    method public java.lang.String getParameters(java.lang.String);
    method public java.lang.String getProperty(java.lang.String);
    method public int getRingerMode();
    method public deprecated int getRouting(int);
    method public int getStreamMaxVolume(int);
@@ -10931,6 +10932,8 @@ package android.media {
    field public static final int MODE_NORMAL = 0; // 0x0
    field public static final int MODE_RINGTONE = 1; // 0x1
    field public static final deprecated int NUM_STREAMS = 5; // 0x5
    field public static final java.lang.String PROPERTY_OUTPUT_FRAMES_PER_BUFFER = "android.media.property.OUTPUT_FRAMES_PER_BUFFER";
    field public static final java.lang.String PROPERTY_OUTPUT_SAMPLE_RATE = "android.media.property.OUTPUT_SAMPLE_RATE";
    field public static final java.lang.String RINGER_MODE_CHANGED_ACTION = "android.media.RINGER_MODE_CHANGED";
    field public static final int RINGER_MODE_NORMAL = 2; // 0x2
    field public static final int RINGER_MODE_SILENT = 0; // 0x0
+8 −9
Original line number Diff line number Diff line
@@ -2445,30 +2445,29 @@ public class AudioManager {
    }

    /**
     * Used as a key for #getProperty to request the native or optimal output sample rate for
     * this device, in decimal Hz.
     * {@hide}
     * Used as a key for {@link #getProperty} to request the native or optimal output sample rate
     * for this device's primary output stream, in decimal Hz.
     */
    public static final String PROPERTY_OUTPUT_SAMPLE_RATE =
            "android.media.property.OUTPUT_SAMPLE_RATE";

    /**
     * Used as a key for #getProperty to request the native or optimal output buffer size for
     * this device, in decimal PCM frames.
     * {@hide}
     * Used as a key for {@link #getProperty} to request the native or optimal output buffer size
     * for this device's primary output stream, in decimal PCM frames.
     */
    public static final String PROPERTY_OUTPUT_FRAMES_PER_BUFFER =
            "android.media.property.OUTPUT_FRAMES_PER_BUFFER";

    /**
     * Returns the value of the property with the specified key.
     * @param key One of the strings corresponding to a property key: either
     *            #PROPERTY_OUTPUT_SAMPLE_RATE or #PROPERTY_OUTPUT_FRAMES_PER_BUFFER
     *            {@link #PROPERTY_OUTPUT_SAMPLE_RATE} or
     *            {@link #PROPERTY_OUTPUT_FRAMES_PER_BUFFER}
     * @return A string representing the associated value for that property key,
     *         or null if there is no value for that key.
     * {@hide}
     */
    public String getProperty(String key) {
        // uses android.os.SystemProperties.get for selected keys, with suitable defaults
        // implementation to be written
        return null;
    }