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

Commit b3d8392d authored by Eric Laurent's avatar Eric Laurent
Browse files

audio: move private APIs to dark grey list

Add proper @UnsupportedAppUsage annotation for the following methods:
- AudioTrack.getLatency().
- AudioSystm.getPrimaryOutputSamplingRate()
- AudioSystem.getPrimaryOutputFrameCount()

Bug: 112561552
Test: make
Change-Id: I8480ad4699ab530e0b83a00a0897756e676c3cda
parent 845a41cb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager;
import android.media.audiopolicy.AudioMix;
import android.os.Build;
import android.util.Log;

import java.util.ArrayList;
@@ -864,9 +865,9 @@ public class AudioSystem
    public static native int setMasterMono(boolean mono);

    // helpers for android.media.AudioManager.getProperty(), see description there for meaning
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 112561552)
    public static native int getPrimaryOutputSamplingRate();
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 112561552)
    public static native int getPrimaryOutputFrameCount();
    @UnsupportedAppUsage
    public static native int getOutputLatency(int stream);
+2 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -1506,7 +1507,7 @@ public class AudioTrack extends PlayerBase
     * a better solution.
     * @hide
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 112561552)
    public int getLatency() {
        return native_get_latency();
    }