Added requiresApi annotation for new internal APIs

Bug: 274616353
Test: m
Change-Id: I41203a6d472c2214a17cfbbf0b597aeb95128b7d
diff --git a/builtInServices/api/module-lib-current.txt b/builtInServices/api/module-lib-current.txt
index eb041d2..18f2efd 100644
--- a/builtInServices/api/module-lib-current.txt
+++ b/builtInServices/api/module-lib-current.txt
@@ -16,7 +16,7 @@
 
   public interface CarServiceHelperServiceUpdatable {
     method public void dump(@NonNull java.io.PrintWriter, @Nullable String[]);
-    method public com.android.server.wm.CarActivityInterceptorUpdatable getCarActivityInterceptorUpdatable();
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public com.android.server.wm.CarActivityInterceptorUpdatable getCarActivityInterceptorUpdatable();
     method public com.android.server.wm.CarLaunchParamsModifierUpdatable getCarLaunchParamsModifierUpdatable();
     method public void initBootUser();
     method public void onFactoryReset(@NonNull java.util.function.BiConsumer<java.lang.Integer,android.os.Bundle>);
@@ -30,15 +30,15 @@
 package com.android.server.wm {
 
   public final class ActivityInterceptResultWrapper {
-    method public static com.android.server.wm.ActivityInterceptResultWrapper create(android.content.Intent, android.app.ActivityOptions);
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public static com.android.server.wm.ActivityInterceptResultWrapper create(android.content.Intent, android.app.ActivityOptions);
   }
 
   public final class ActivityInterceptorInfoWrapper {
-    method public android.content.pm.ActivityInfo getActivityInfo();
-    method public String getCallingPackage();
-    method public com.android.server.wm.ActivityOptionsWrapper getCheckedOptions();
-    method public android.content.Intent getIntent();
-    method public int getUserId();
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public android.content.pm.ActivityInfo getActivityInfo();
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public String getCallingPackage();
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public com.android.server.wm.ActivityOptionsWrapper getCheckedOptions();
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public android.content.Intent getIntent();
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public int getUserId();
   }
 
   public final class ActivityOptionsWrapper {
@@ -46,7 +46,7 @@
     method public com.android.server.wm.TaskDisplayAreaWrapper getLaunchTaskDisplayArea();
     method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public int getLaunchWindowingMode();
     method public android.app.ActivityOptions getOptions();
-    method public void setLaunchRootTask(android.os.IBinder);
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public void setLaunchRootTask(android.os.IBinder);
     field @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public static final int WINDOWING_MODE_UNDEFINED = 0; // 0x0
   }
 
@@ -75,7 +75,7 @@
   }
 
   public interface CarActivityInterceptorUpdatable {
-    method @Nullable public com.android.server.wm.ActivityInterceptResultWrapper onInterceptActivityLaunch(com.android.server.wm.ActivityInterceptorInfoWrapper);
+    method @RequiresApi(android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) @Nullable public com.android.server.wm.ActivityInterceptResultWrapper onInterceptActivityLaunch(com.android.server.wm.ActivityInterceptorInfoWrapper);
   }
 
   public interface CarLaunchParamsModifierInterface {
diff --git a/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java b/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java
index c907c1b..41a6986 100644
--- a/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java
+++ b/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java
@@ -52,15 +52,15 @@
     /**
      * Gets the main display assigned to the user.
      */
-    @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+    @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     int getMainDisplayAssignedToUser(@UserIdInt int userId);
 
     /**
      * Gets the full user (i.e., not profile) assigned to the display.
      */
-    @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+    @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     int getUserAssignedToDisplay(int displayId);
 
     /**
diff --git a/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java b/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java
index 1d9555e..3fb8a52 100644
--- a/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java
+++ b/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java
@@ -17,8 +17,10 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.RequiresApi;
 import android.annotation.SystemApi;
 import android.car.builtin.annotation.PlatformVersion;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.UserHandle;
 
@@ -60,6 +62,7 @@
     @AddedIn(PlatformVersion.TIRAMISU_0)
     CarLaunchParamsModifierUpdatable getCarLaunchParamsModifierUpdatable();
 
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     CarActivityInterceptorUpdatable getCarActivityInterceptorUpdatable();
 }
diff --git a/builtInServices/src/com/android/server/wm/ActivityInterceptResultWrapper.java b/builtInServices/src/com/android/server/wm/ActivityInterceptResultWrapper.java
index f257257..5c9dea5 100644
--- a/builtInServices/src/com/android/server/wm/ActivityInterceptResultWrapper.java
+++ b/builtInServices/src/com/android/server/wm/ActivityInterceptResultWrapper.java
@@ -16,10 +16,12 @@
 
 package com.android.server.wm;
 
+import android.annotation.RequiresApi;
 import android.annotation.SystemApi;
 import android.app.ActivityOptions;
 import android.car.builtin.annotation.PlatformVersion;
 import android.content.Intent;
+import android.os.Build;
 
 import com.android.annotation.AddedIn;
 
@@ -40,6 +42,7 @@
     /**
      * Creates an instance of {@link ActivityInterceptResultWrapper}.
      */
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public static ActivityInterceptResultWrapper create(Intent intent,
             ActivityOptions activityOptions) {
@@ -50,6 +53,7 @@
     /**
      * @hide
      */
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public ActivityInterceptorCallback.ActivityInterceptResult getInterceptResult() {
         return mActivityInterceptorInfo;
diff --git a/builtInServices/src/com/android/server/wm/ActivityInterceptorInfoWrapper.java b/builtInServices/src/com/android/server/wm/ActivityInterceptorInfoWrapper.java
index cc274f0..eb2ebf1 100644
--- a/builtInServices/src/com/android/server/wm/ActivityInterceptorInfoWrapper.java
+++ b/builtInServices/src/com/android/server/wm/ActivityInterceptorInfoWrapper.java
@@ -16,10 +16,12 @@
 
 package com.android.server.wm;
 
+import android.annotation.RequiresApi;
 import android.annotation.SystemApi;
 import android.car.builtin.annotation.PlatformVersion;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
+import android.os.Build;
 
 import com.android.annotation.AddedIn;
 
@@ -43,33 +45,39 @@
      * @param interceptorInfo the original interceptorInfo that needs to be wrapped.
      * @hide
      */
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public static ActivityInterceptorInfoWrapper create(
             ActivityInterceptorCallback.ActivityInterceptorInfo interceptorInfo) {
         return new ActivityInterceptorInfoWrapper(interceptorInfo);
     }
 
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public Intent getIntent() {
         return mActivityInterceptorInfo.getIntent();
     }
 
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public ActivityInfo getActivityInfo() {
         return mActivityInterceptorInfo.getActivityInfo();
     }
 
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public ActivityOptionsWrapper getCheckedOptions() {
         return ActivityOptionsWrapper.create(mActivityInterceptorInfo.getCheckedOptions());
 
     }
 
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public String getCallingPackage() {
         return mActivityInterceptorInfo.getCallingPackage();
     }
 
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public int getUserId() {
         return mActivityInterceptorInfo.getUserId();
diff --git a/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java b/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java
index 417a343..7e35a6a 100644
--- a/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java
+++ b/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java
@@ -94,6 +94,7 @@
      * Sets the given {@code windowContainerToken} as the launch root task. See
      * {@link ActivityOptions#setLaunchRootTask(WindowContainerToken)} for more info.
      */
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     public void setLaunchRootTask(IBinder windowContainerToken) {
         WindowContainerToken launchRootTaskToken = WindowContainer.fromBinder(windowContainerToken)
diff --git a/builtInServices/src/com/android/server/wm/CarActivityInterceptorUpdatable.java b/builtInServices/src/com/android/server/wm/CarActivityInterceptorUpdatable.java
index d5df81a..2e60a55 100644
--- a/builtInServices/src/com/android/server/wm/CarActivityInterceptorUpdatable.java
+++ b/builtInServices/src/com/android/server/wm/CarActivityInterceptorUpdatable.java
@@ -17,8 +17,10 @@
 package com.android.server.wm;
 
 import android.annotation.Nullable;
+import android.annotation.RequiresApi;
 import android.annotation.SystemApi;
 import android.car.builtin.annotation.PlatformVersion;
+import android.os.Build;
 
 import com.android.annotation.AddedIn;
 
@@ -37,6 +39,7 @@
      *         {@code null} is returned when no modification is required on intent or activity
      *         options.
      */
+    @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
     @Nullable
     ActivityInterceptResultWrapper onInterceptActivityLaunch(