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

Commit f0b7d0ba authored by Artur Satayev's avatar Artur Satayev
Browse files

Add @UnsupportedAppUsage to test apis that are known to be used by apps.

go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
parent fe0e4a24
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -296,6 +296,7 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio
    /**
     * @hide
     */
    @UnsupportedAppUsage
    @TestApi
    public static void setDurationScale(float durationScale) {
        sDurationScale = durationScale;
@@ -304,6 +305,7 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio
    /**
     * @hide
     */
    @UnsupportedAppUsage
    @TestApi
    public static float getDurationScale() {
        return sDurationScale;
+1 −0
Original line number Diff line number Diff line
@@ -2797,6 +2797,7 @@ public class Activity extends ContextThemeWrapper
     * @see View#onMovedToDisplay(int, Configuration)
     * @hide
     */
    @UnsupportedAppUsage
    @TestApi
    public void onMovedToDisplay(int displayId, Configuration config) {
    }
+1 −0
Original line number Diff line number Diff line
@@ -2982,6 +2982,7 @@ public class ActivityManager {
         *
         * @hide
         */
        @UnsupportedAppUsage
        @TestApi
        public static final int IMPORTANCE_CANT_SAVE_STATE_PRE_26 = 170;

+8 −0
Original line number Diff line number Diff line
@@ -581,6 +581,7 @@ public class AppOpsManager {
    @UnsupportedAppUsage
    public static final int OP_NONE = -1;
    /** @hide Access to coarse location information. */
    @UnsupportedAppUsage
    @TestApi
    public static final int OP_COARSE_LOCATION = 0;
    /** @hide Access to fine location information. */
@@ -653,6 +654,7 @@ public class AppOpsManager {
    @UnsupportedAppUsage
    public static final int OP_WRITE_SETTINGS = 23;
    /** @hide Required to draw on top of other apps. */
    @UnsupportedAppUsage
    @TestApi
    public static final int OP_SYSTEM_ALERT_WINDOW = 24;
    /** @hide */
@@ -662,6 +664,7 @@ public class AppOpsManager {
    @UnsupportedAppUsage
    public static final int OP_CAMERA = 26;
    /** @hide */
    @UnsupportedAppUsage
    @TestApi
    public static final int OP_RECORD_AUDIO = 27;
    /** @hide */
@@ -809,6 +812,7 @@ public class AppOpsManager {
    @UnsupportedAppUsage
    public static final int OP_MANAGE_IPSEC_TUNNELS = 75;
    /** @hide Any app start foreground service. */
    @UnsupportedAppUsage
    @TestApi
    public static final int OP_START_FOREGROUND = 76;
    /** @hide */
@@ -2147,6 +2151,7 @@ public class AppOpsManager {
     * Retrieve the permission associated with an operation, or null if there is not one.
     * @hide
     */
    @UnsupportedAppUsage
    @TestApi
    public static String opToPermission(int op) {
        return sOpPerms[op];
@@ -2179,6 +2184,7 @@ public class AppOpsManager {
     * to the corresponding app op.
     * @hide
     */
    @UnsupportedAppUsage
    @TestApi
    public static int permissionToOpCode(String permission) {
        Integer boxedOpCode = sPermToOp.get(permission);
@@ -5281,6 +5287,7 @@ public class AppOpsManager {
    }

    /** @hide */
    @UnsupportedAppUsage
    @TestApi
    @RequiresPermission(android.Manifest.permission.MANAGE_APP_OPS_MODES)
    public void setMode(int code, int uid, String packageName, @Mode int mode) {
@@ -5627,6 +5634,7 @@ public class AppOpsManager {
    /**
     * {@hide}
     */
    @UnsupportedAppUsage
    @TestApi
    public static int strOpToOp(@NonNull String op) {
        Integer val = sOpStrToOp.get(op);
+1 −0
Original line number Diff line number Diff line
@@ -2361,6 +2361,7 @@ class ContextImpl extends Context {
        return (mFlags & Context.CONTEXT_IGNORE_SECURITY) != 0;
    }

    @UnsupportedAppUsage
    @TestApi
    @Override
    public Display getDisplay() {
Loading