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

Commit b1c02c7c authored by Marvin Ramin's avatar Marvin Ramin
Browse files

Expose APIs to TestApi that VDM CTS is using

These APIs are used in CTS tests today. To ensure CTS only relies on
TestApi (or more public APIs) this change promotes the used APIs to
@TestApi.

Bug: 324560285
Test: atest CtsVirtualDevicesAppLaunchTestCases
Flag: TEST_ONLY
Change-Id: Iee0968092993a24d2b780c8743ec6d09bfacce90
parent e252157b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1542,6 +1542,10 @@ package android.hardware {
    method @Deprecated public final void setPreviewSurface(android.view.Surface) throws java.io.IOException;
  }

  public final class Sensor {
    method public int getHandle();
  }

  public final class SensorPrivacyManager {
    method @FlaggedApi("com.android.internal.camera.flags.camera_privacy_allowlist") @RequiresPermission(android.Manifest.permission.MANAGE_SENSOR_PRIVACY) public void setCameraPrivacyAllowlist(@NonNull java.util.List<java.lang.String>);
    method @RequiresPermission(android.Manifest.permission.MANAGE_SENSOR_PRIVACY) public void setSensorPrivacy(int, int, boolean);
@@ -3665,7 +3669,11 @@ package android.view {
    method @Nullable public android.view.Display.Mode getUserPreferredDisplayMode();
    method public boolean hasAccess(int);
    method @RequiresPermission(android.Manifest.permission.MODIFY_USER_PREFERRED_DISPLAY_MODE) public void setUserPreferredDisplayMode(@NonNull android.view.Display.Mode);
    field public static final int FLAG_ALWAYS_UNLOCKED = 512; // 0x200
    field public static final int FLAG_OWN_FOCUS = 2048; // 0x800
    field public static final int FLAG_TOUCH_FEEDBACK_DISABLED = 1024; // 0x400
    field public static final int FLAG_TRUSTED = 128; // 0x80
    field public static final int REMOVE_MODE_DESTROY_CONTENT = 1; // 0x1
    field public static final int TYPE_EXTERNAL = 2; // 0x2
    field public static final int TYPE_INTERNAL = 1; // 0x1
    field public static final int TYPE_OVERLAY = 4; // 0x4
+4 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@

package android.hardware;

import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.hardware.input.InputSensorInfo;
import android.os.Build;
@@ -1182,6 +1184,8 @@ public final class Sensor {

    /** @hide */
    @UnsupportedAppUsage
    @SuppressLint("UnflaggedApi") // Promotion to TestApi
    @TestApi
    public int getHandle() {
        return mHandle;
    }
+8 −0
Original line number Diff line number Diff line
@@ -314,6 +314,8 @@ public final class Display {
     * @hide
     * @see #getFlags()
     */
    @SuppressLint("UnflaggedApi") // Promotion to TestApi
    @TestApi
    public static final int FLAG_ALWAYS_UNLOCKED = 1 << 9;

    /**
@@ -323,6 +325,8 @@ public final class Display {
     * @hide
     * @see #getFlags()
     */
    @SuppressLint("UnflaggedApi") // Promotion to TestApi
    @TestApi
    public static final int FLAG_TOUCH_FEEDBACK_DISABLED = 1 << 10;

    /**
@@ -336,6 +340,8 @@ public final class Display {
     * @see #FLAG_TRUSTED
     * @hide
     */
    @SuppressLint("UnflaggedApi") // Promotion to TestApi
    @TestApi
    public static final int FLAG_OWN_FOCUS = 1 << 11;

    /**
@@ -642,6 +648,8 @@ public final class Display {
     * @hide
     */
    // TODO (b/114338689): Remove the flag and use WindowManager#REMOVE_CONTENT_MODE_DESTROY
    @SuppressLint("UnflaggedApi") // Promotion to TestApi
    @TestApi
    public static final int REMOVE_MODE_DESTROY_CONTENT = 1;

    /** @hide */