formatList);
+ /** @hide */
public static native int setSurroundFormatEnabled(int audioFormat, boolean enabled);
/**
+ * @hide
* Communicate UID of active assistant to audio policy service.
*/
public static native int setAssistantUid(int uid);
+
/**
+ * @hide
* Communicate UIDs of active accessibility services to audio policy service.
*/
public static native int setA11yServicesUids(int[] uids);
+
/**
+ * @hide
* Communicate UID of current InputMethodService to audio policy service.
*/
public static native int setCurrentImeUid(int uid);
/**
+ * @hide
* @see AudioManager#isHapticPlaybackSupported()
*/
public static native boolean isHapticPlaybackSupported();
/**
+ * @hide
* Send audio HAL server process pids to native audioserver process for use
* when generating audio HAL servers tombstones
*/
public static native int setAudioHalPids(int[] pids);
/**
+ * @hide
* @see AudioManager#isCallScreeningModeSupported()
*/
public static native boolean isCallScreeningModeSupported();
@@ -1258,6 +1437,7 @@ public class AudioSystem
// use case routing by product strategy
/**
+ * @hide
* Sets the preferred device to use for a given audio strategy in the audio policy engine
* @param strategy the id of the strategy to configure
* @param device the device type and address to route to when available
@@ -1270,6 +1450,7 @@ public class AudioSystem
device.getAddress());
}
/**
+ * @hide
* Set device routing per product strategy.
* @param strategy the id of the strategy to configure
* @param deviceType the native device type, NOT AudioDeviceInfo types
@@ -1280,6 +1461,7 @@ public class AudioSystem
int strategy, int deviceType, String deviceAddress);
/**
+ * @hide
* Remove preferred routing for the strategy
* @param strategy the id of the strategy to configure
* @return {@link #SUCCESS} if successfully removed
@@ -1287,6 +1469,7 @@ public class AudioSystem
public static native int removePreferredDeviceForStrategy(int strategy);
/**
+ * @hide
* Query previously set preferred device for a strategy
* @param strategy the id of the strategy to query for
* @param device an array of size 1 that will contain the preferred device, or null if
@@ -1300,6 +1483,7 @@ public class AudioSystem
// Items shared with audio service
/**
+ * @hide
* The delay before playing a sound. This small period exists so the user
* can press another key (non-volume keys, too) to have it NOT be audible.
*
@@ -1308,6 +1492,7 @@ public class AudioSystem
public static final int PLAY_SOUND_DELAY = 300;
/**
+ * @hide
* Constant to identify a focus stack entry that is used to hold the focus while the phone
* is ringing or during a call. Used by com.android.internal.telephony.CallManager when
* entering and exiting calls.
@@ -1315,6 +1500,7 @@ public class AudioSystem
public final static String IN_VOICE_COMM_FOCUS_ID = "AudioFocus_For_Phone_Ring_And_Calls";
/**
+ * @hide
* @see AudioManager#setVibrateSetting(int, int)
*/
public static int getValueForVibrateSetting(int existingValue, int vibrateType,
@@ -1330,10 +1516,12 @@ public class AudioSystem
return existingValue;
}
+ /** @hide */
public static int getDefaultStreamVolume(int streamType) {
return DEFAULT_STREAM_VOLUME[streamType];
}
+ /** @hide */
public static int[] DEFAULT_STREAM_VOLUME = new int[] {
4, // STREAM_VOICE_CALL
7, // STREAM_SYSTEM
@@ -1349,20 +1537,22 @@ public class AudioSystem
5, // STREAM_ASSISTANT
};
+ /** @hide */
public static String streamToString(int stream) {
if (stream >= 0 && stream < STREAM_NAMES.length) return STREAM_NAMES[stream];
if (stream == AudioManager.USE_DEFAULT_STREAM_TYPE) return "USE_DEFAULT_STREAM_TYPE";
return "UNKNOWN_STREAM_" + stream;
}
- /** The platform has no specific capabilities */
+ /** @hide The platform has no specific capabilities */
public static final int PLATFORM_DEFAULT = 0;
- /** The platform is voice call capable (a phone) */
+ /** @hide The platform is voice call capable (a phone) */
public static final int PLATFORM_VOICE = 1;
- /** The platform is a television or a set-top box */
+ /** @hide The platform is a television or a set-top box */
public static final int PLATFORM_TELEVISION = 2;
/**
+ * @hide
* Return the platform type that this is running on. One of:
*
* - {@link #PLATFORM_VOICE}
@@ -1392,6 +1582,7 @@ public class AudioSystem
}
/**
+ * @hide
* Return a set of audio device types from a bit mask audio device type, which may
* represent multiple audio device types.
* FIXME: Remove this when getting ride of bit mask usage of audio device types.
@@ -1409,6 +1600,7 @@ public class AudioSystem
}
/**
+ * @hide
* Return the intersection of two audio device types collections.
*/
public static Set intersectionAudioDeviceTypes(
@@ -1419,12 +1611,14 @@ public class AudioSystem
}
/**
+ * @hide
* Return true if the audio device types collection only contains the given device type.
*/
public static boolean isSingleAudioDeviceType(@NonNull Set types, int type) {
return types.size() == 1 && types.contains(type);
}
+ /** @hide */
public static final int DEFAULT_MUTE_STREAMS_AFFECTED =
(1 << STREAM_MUSIC) |
(1 << STREAM_RING) |
@@ -1434,6 +1628,7 @@ public class AudioSystem
(1 << STREAM_BLUETOOTH_SCO);
/**
+ * @hide
* Event posted by AudioTrack and AudioRecord JNI (JNIDeviceCallback) when routing changes.
* Keep in sync with core/jni/android_media_DeviceCallback.h.
*/