Skip to content

Commit d86077c

Browse files
gkastenAndroid (Google) Code Review
authored andcommitted
Merge "Expose android.media.AudioManager.getProperty()" into jb-mr1-dev
2 parents ca2cb18 + 62796aa commit d86077c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

api/current.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10854,6 +10854,7 @@ package android.media {
1085410854
method public void adjustVolume(int, int);
1085510855
method public int getMode();
1085610856
method public java.lang.String getParameters(java.lang.String);
10857+
method public java.lang.String getProperty(java.lang.String);
1085710858
method public int getRingerMode();
1085810859
method public deprecated int getRouting(int);
1085910860
method public int getStreamMaxVolume(int);
@@ -10931,6 +10932,8 @@ package android.media {
1093110932
field public static final int MODE_NORMAL = 0; // 0x0
1093210933
field public static final int MODE_RINGTONE = 1; // 0x1
1093310934
field public static final deprecated int NUM_STREAMS = 5; // 0x5
10935+
field public static final java.lang.String PROPERTY_OUTPUT_FRAMES_PER_BUFFER = "android.media.property.OUTPUT_FRAMES_PER_BUFFER";
10936+
field public static final java.lang.String PROPERTY_OUTPUT_SAMPLE_RATE = "android.media.property.OUTPUT_SAMPLE_RATE";
1093410937
field public static final java.lang.String RINGER_MODE_CHANGED_ACTION = "android.media.RINGER_MODE_CHANGED";
1093510938
field public static final int RINGER_MODE_NORMAL = 2; // 0x2
1093610939
field public static final int RINGER_MODE_SILENT = 0; // 0x0

media/java/android/media/AudioManager.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,30 +2445,29 @@ public IRingtonePlayer getRingtonePlayer() {
24452445
}
24462446

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

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

24632461
/**
2462+
* Returns the value of the property with the specified key.
24642463
* @param key One of the strings corresponding to a property key: either
2465-
* #PROPERTY_OUTPUT_SAMPLE_RATE or #PROPERTY_OUTPUT_FRAMES_PER_BUFFER
2464+
* {@link #PROPERTY_OUTPUT_SAMPLE_RATE} or
2465+
* {@link #PROPERTY_OUTPUT_FRAMES_PER_BUFFER}
24662466
* @return A string representing the associated value for that property key,
24672467
* or null if there is no value for that key.
2468-
* {@hide}
24692468
*/
24702469
public String getProperty(String key) {
2471-
// uses android.os.SystemProperties.get for selected keys, with suitable defaults
2470+
// implementation to be written
24722471
return null;
24732472
}
24742473

0 commit comments

Comments
 (0)