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

Commit faf2ba91 authored by Anton Hansson's avatar Anton Hansson
Browse files

Make all typedefs SOURCE retention

The default retention is CLASS, but the correct retention is SOURCE.
There is a metalava check for typedef annotations correctly, but that
check is currently disabled. This is part of the work required to
re-enable that check.

Bug: 309971481
Test: m checkapi
Change-Id: I386efea9321bd2adb2722710056b1d57dd5401f5
parent e3ea9b5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4762,7 +4762,7 @@ package android.hardware.hdmi {
    method public void onChange(@NonNull String);
  }
  @IntDef({android.hardware.hdmi.HdmiControlManager.RESULT_SUCCESS, android.hardware.hdmi.HdmiControlManager.RESULT_TIMEOUT, android.hardware.hdmi.HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE, android.hardware.hdmi.HdmiControlManager.RESULT_TARGET_NOT_AVAILABLE, android.hardware.hdmi.HdmiControlManager.RESULT_ALREADY_IN_PROGRESS, android.hardware.hdmi.HdmiControlManager.RESULT_EXCEPTION, android.hardware.hdmi.HdmiControlManager.RESULT_INCORRECT_MODE, android.hardware.hdmi.HdmiControlManager.RESULT_COMMUNICATION_FAILED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public static @interface HdmiControlManager.ControlCallbackResult {
  @IntDef({android.hardware.hdmi.HdmiControlManager.RESULT_SUCCESS, android.hardware.hdmi.HdmiControlManager.RESULT_TIMEOUT, android.hardware.hdmi.HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE, android.hardware.hdmi.HdmiControlManager.RESULT_TARGET_NOT_AVAILABLE, android.hardware.hdmi.HdmiControlManager.RESULT_ALREADY_IN_PROGRESS, android.hardware.hdmi.HdmiControlManager.RESULT_EXCEPTION, android.hardware.hdmi.HdmiControlManager.RESULT_INCORRECT_MODE, android.hardware.hdmi.HdmiControlManager.RESULT_COMMUNICATION_FAILED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface HdmiControlManager.ControlCallbackResult {
  }
  public static interface HdmiControlManager.HotplugEventListener {
+1 −0
Original line number Diff line number Diff line
@@ -632,6 +632,7 @@ public class AccessibilityServiceInfo implements Parcelable {
            InputDevice.SOURCE_JOYSTICK,
            InputDevice.SOURCE_SENSOR
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface MotionEventSources {}

    /**
+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.util.ArrayMap;
import android.view.MotionEvent;
import android.view.accessibility.AccessibilityInteractionClient;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.Executor;
@@ -92,6 +94,7 @@ public final class TouchInteractionController {
        STATE_DRAGGING,
        STATE_DELEGATING
    })
    @Retention(RetentionPolicy.SOURCE)
    private @interface State {}

    // The maximum number of pointers that can be touching the screen at once. (See MAX_POINTER_ID
+4 −0
Original line number Diff line number Diff line
@@ -23,7 +23,9 @@ import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.inMultiWindowMode;
import static android.os.Process.myUid;

import static com.android.sdksandbox.flags.Flags.sandboxActivitySdkBasedContext;

import static java.lang.Character.MIN_VALUE;

import android.annotation.AnimRes;
@@ -1000,6 +1002,7 @@ public class Activity extends ContextThemeWrapper
            FULLSCREEN_MODE_REQUEST_EXIT,
            FULLSCREEN_MODE_REQUEST_ENTER
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface FullscreenModeRequest {}

    /** Request type of {@link #requestFullscreenMode(int, OutcomeReceiver)}, to request exiting the
@@ -1016,6 +1019,7 @@ public class Activity extends ContextThemeWrapper
            OVERRIDE_TRANSITION_OPEN,
            OVERRIDE_TRANSITION_CLOSE
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface OverrideTransition {}

    /**
+1 −0
Original line number Diff line number Diff line
@@ -4998,6 +4998,7 @@ public class ActivityManager {
            STOP_USER_ON_SWITCH_TRUE,
            STOP_USER_ON_SWITCH_FALSE
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface StopUserOnSwitch {}

    /**
Loading