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

Commit a3ee6642 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

Unhide Virtualizer.getVirtualizationMode()

Unhide Virtualizer.getVirtualizationMode() method.
Added note in javadoc about the returned value.
Declared exceptions that can be thrown by the checkStatus(int)
  helper function.

Change-Id: I4da82d1db1e39ca9dae489559bf1fb5de112c26a
parent 4bf2736a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15930,6 +15930,7 @@ package android.media.audiofx {
    method public short getRoundedStrength() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public boolean getSpeakerAngles(int, int, int[]) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public boolean getStrengthSupported();
    method public int getVirtualizationMode() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setParameterListener(android.media.audiofx.Virtualizer.OnParameterChangeListener);
    method public void setProperties(android.media.audiofx.Virtualizer.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
    method public void setStrength(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
+11 −3
Original line number Diff line number Diff line
@@ -349,8 +349,6 @@ public class Virtualizer extends AudioEffect {
    }

    /**
     * @hide
     * CANDIDATE FOR PUBLIC API
     * Return the device type which reflects the virtualization mode being used, if any.
     * @return a device type (as defined in {@link AudioDevice}) which reflects the virtualization
     *     mode being used.
@@ -358,8 +356,18 @@ public class Virtualizer extends AudioEffect {
     *     {@link AudioDevice#DEVICE_TYPE_UNKNOWN}. Virtualization may not be active either because
     *     the effect is not enabled or because the current output device is not compatible with
     *     this virtualization implementation.
     *     <p>Note that the return value may differ from a device type successfully set with
     *     {@link #forceVirtualizationMode(int)} as the implementation
     *     may use a single mode for multiple devices. An example of this is with
     *     {@link AudioDevice#DEVICE_TYPE_WIRED_HEADSET} that would typically be handled
     *     like {@link AudioDevice#DEVICE_TYPE_WIRED_HEADPHONES} from a virtualization
     *     standpoint.
     * @throws IllegalStateException
     * @throws IllegalArgumentException
     * @throws UnsupportedOperationException
     */
    public int getVirtualizationMode() {
    public int getVirtualizationMode()
            throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
        int[] value = new int[1];
        int status = getParameter(PARAM_VIRTUALIZATION_MODE, value);
        if (status >= 0) {