diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-08-30 23:21:39 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-08-30 23:21:39 +0000 |
commit | d51fa0e8517f7ff3e2cef4330f9bee44fc06d990 (patch) | |
tree | a76c960cbf231da739b1f215b540b796d66cd1f5 | |
parent | 8ccb3486fac282997d45f16adf543b7468ae8aff (diff) | |
parent | 1f503863215818adf15af92e53bdc013a70ad30f (diff) | |
download | services-d51fa0e8517f7ff3e2cef4330f9bee44fc06d990.tar.gz |
Snap for 9010110 from 1f503863215818adf15af92e53bdc013a70ad30f to tm-qpr1-releaseandroid-13.0.0_r30android-13.0.0_r29android-13.0.0_r28android-13.0.0_r27android-13.0.0_r24android-13.0.0_r23android-13.0.0_r22android-13.0.0_r21android-13.0.0_r20android-13.0.0_r19android-13.0.0_r18android-13.0.0_r17android-13.0.0_r16android13-qpr1-s8-releaseandroid13-qpr1-s7-releaseandroid13-qpr1-s6-releaseandroid13-qpr1-s5-releaseandroid13-qpr1-s4-releaseandroid13-qpr1-s3-releaseandroid13-qpr1-s2-releaseandroid13-qpr1-s1-releaseandroid13-qpr1-release
Change-Id: I0fbdf3410b9550201d659819ef558bf49c80d360
14 files changed, 145 insertions, 82 deletions
diff --git a/builtInServices/src/com/android/annotation/AddedIn.java b/builtInServices/src/com/android/annotation/AddedIn.java new file mode 100644 index 0000000..6cfceb4 --- /dev/null +++ b/builtInServices/src/com/android/annotation/AddedIn.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.annotation; + +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import android.car.builtin.annotation.PlatformVersion; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Defines in which version of platform this method / type / field was added. + * + * <p>Annotation should be used for APIs exposed to CarService module by {@code android.car.builtin} + * + * @hide + */ +@Retention(RUNTIME) +@Target({ANNOTATION_TYPE, FIELD, TYPE, METHOD}) +public @interface AddedIn { + PlatformVersion value(); +} diff --git a/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java b/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java index 4a139f6..e9a58a9 100644 --- a/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java +++ b/builtInServices/src/com/android/internal/car/CarServiceHelperInterface.java @@ -18,9 +18,11 @@ package com.android.internal.car; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.os.UserHandle; +import com.android.annotation.AddedIn; + import java.io.File; /** @@ -33,14 +35,14 @@ public interface CarServiceHelperInterface { /** * Sets safety mode */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void setSafetyMode(boolean safe); /** * Creates user even when disallowed */ @Nullable - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) UserHandle createUserEvenWhenDisallowed(@Nullable String name, @NonNull String userType, int flags); @@ -48,6 +50,6 @@ public interface CarServiceHelperInterface { * Dumps service stacks */ @Nullable - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) File dumpServiceStacks(); } diff --git a/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java b/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java index 61a9892..3409c15 100644 --- a/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java +++ b/builtInServices/src/com/android/internal/car/CarServiceHelperServiceUpdatable.java @@ -18,10 +18,11 @@ package com.android.internal.car; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.os.Bundle; import android.os.UserHandle; +import com.android.annotation.AddedIn; import com.android.server.wm.CarLaunchParamsModifierUpdatable; import java.io.PrintWriter; @@ -36,25 +37,25 @@ import java.util.function.BiConsumer; @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public interface CarServiceHelperServiceUpdatable { - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void onUserRemoved(@NonNull UserHandle userHandle); - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void onStart(); - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void dump(@NonNull PrintWriter pw, @Nullable String[] args); - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void sendUserLifecycleEvent(int eventType, @Nullable UserHandle userFrom, @NonNull UserHandle userTo); - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void onFactoryReset(@NonNull BiConsumer<Integer, Bundle> processFactoryReset); - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void initBootUser(); - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) CarLaunchParamsModifierUpdatable getCarLaunchParamsModifierUpdatable(); } diff --git a/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java b/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java index 71ceabb..b67e190 100644 --- a/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java +++ b/builtInServices/src/com/android/server/wm/ActivityOptionsWrapper.java @@ -18,9 +18,11 @@ package com.android.server.wm; import android.annotation.SystemApi; import android.app.ActivityOptions; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.window.WindowContainerToken; +import com.android.annotation.AddedIn; + /** * Wrapper of {@link ActivityOptions}. * @hide @@ -34,7 +36,7 @@ public final class ActivityOptionsWrapper { } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static ActivityOptionsWrapper create(ActivityOptions options) { if (options == null) return null; return new ActivityOptionsWrapper(options); @@ -44,7 +46,7 @@ public final class ActivityOptionsWrapper { * Gets the underlying {@link ActivityOptions} that is wrapped by this instance. */ // Exposed the original object in order to allow to use the public accessors. - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public ActivityOptions getOptions() { return mOptions; } @@ -52,7 +54,7 @@ public final class ActivityOptionsWrapper { /** * Gets {@link TaskDisplayAreaWrapper} to launch the Activity into */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskDisplayAreaWrapper getLaunchTaskDisplayArea() { WindowContainerToken daToken = mOptions.getLaunchTaskDisplayArea(); if (daToken == null) return null; @@ -61,7 +63,7 @@ public final class ActivityOptionsWrapper { } @Override - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public String toString() { return mOptions.toString(); } diff --git a/builtInServices/src/com/android/server/wm/ActivityRecordWrapper.java b/builtInServices/src/com/android/server/wm/ActivityRecordWrapper.java index da91220..210995f 100644 --- a/builtInServices/src/com/android/server/wm/ActivityRecordWrapper.java +++ b/builtInServices/src/com/android/server/wm/ActivityRecordWrapper.java @@ -18,10 +18,12 @@ package com.android.server.wm; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.content.ComponentName; import android.content.pm.ActivityInfo; +import com.android.annotation.AddedIn; + /** * Wrapper of {@link ActivityRecord}. * @hide @@ -35,14 +37,14 @@ public final class ActivityRecordWrapper { } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static ActivityRecordWrapper create(@Nullable ActivityRecord activityRecord) { if (activityRecord == null) return null; return new ActivityRecordWrapper(activityRecord); } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public ActivityRecord getActivityRecord() { return mActivityRecord; } @@ -50,7 +52,7 @@ public final class ActivityRecordWrapper { /** * Gets which user this Activity is running for. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public int getUserId() { return mActivityRecord.mUserId; } @@ -58,7 +60,7 @@ public final class ActivityRecordWrapper { /** * Gets the actual {@link ComponentName} of this Activity. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public ComponentName getComponentName() { if (mActivityRecord.info == null) return null; return mActivityRecord.info.getComponentName(); @@ -67,7 +69,7 @@ public final class ActivityRecordWrapper { /** * Gets the {@link TaskDisplayAreaWrapper} where this is located. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskDisplayAreaWrapper getDisplayArea() { return TaskDisplayAreaWrapper.create(mActivityRecord.getDisplayArea()); } @@ -75,7 +77,7 @@ public final class ActivityRecordWrapper { /** * Returns whether this Activity is not displayed. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public boolean isNoDisplay() { return mActivityRecord.noDisplay; } @@ -83,7 +85,7 @@ public final class ActivityRecordWrapper { /** * Gets {@link TaskDisplayAreaWrapper} where the handover Activity is supposed to launch */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskDisplayAreaWrapper getHandoverTaskDisplayArea() { return TaskDisplayAreaWrapper.create(mActivityRecord.mHandoverTaskDisplayArea); } @@ -91,7 +93,7 @@ public final class ActivityRecordWrapper { /** * Gets {@code displayId} where the handover Activity is supposed to launch */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public int getHandoverLaunchDisplayId() { return mActivityRecord.mHandoverLaunchDisplayId; } @@ -99,7 +101,7 @@ public final class ActivityRecordWrapper { /** * Returns whether this Activity allows to be embedded in the other Activity. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public boolean allowingEmbedded() { if (mActivityRecord.info == null) return false; return (mActivityRecord.info.flags & ActivityInfo.FLAG_ALLOW_EMBEDDED) != 0; @@ -108,13 +110,13 @@ public final class ActivityRecordWrapper { /** * Returns whether the display where this Activity is located is trusted. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public boolean isDisplayTrusted() { return mActivityRecord.getDisplayContent().isTrusted(); } @Override - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public String toString() { return mActivityRecord.toString(); } diff --git a/builtInServices/src/com/android/server/wm/CalculateParams.java b/builtInServices/src/com/android/server/wm/CalculateParams.java index 6e0ddd5..0973882 100644 --- a/builtInServices/src/com/android/server/wm/CalculateParams.java +++ b/builtInServices/src/com/android/server/wm/CalculateParams.java @@ -18,10 +18,12 @@ package com.android.server.wm; import android.annotation.SystemApi; import android.app.ActivityOptions; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.content.pm.ActivityInfo; import android.view.WindowLayout; +import com.android.annotation.AddedIn; + /** * Wrapper of the parameters of {@code LaunchParamsController.LaunchParamsModifier.onCalculate()} * @hide @@ -42,7 +44,7 @@ public final class CalculateParams { private CalculateParams() {} /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static CalculateParams create(Task task, ActivityInfo.WindowLayout layout, ActivityRecord actvity, ActivityRecord source, ActivityOptions options, ActivityStarter.Request request, int phase, @@ -66,7 +68,7 @@ public final class CalculateParams { /** * Gets the {@link TaskWrapper} currently being positioned. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskWrapper getTask() { return mTask; } @@ -74,7 +76,7 @@ public final class CalculateParams { /** * Gets the specified {@link WindowLayoutWrapper}. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public WindowLayoutWrapper getWindowLayout() { return mLayout; } @@ -82,7 +84,7 @@ public final class CalculateParams { /** * Gets the {@link ActivityRecordWrapper} currently being positioned. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public ActivityRecordWrapper getActivity() { return mActivity; } @@ -90,7 +92,7 @@ public final class CalculateParams { /** * Gets the {@link ActivityRecordWrapper} from which activity was started from. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public ActivityRecordWrapper getSource() { return mSource; } @@ -98,7 +100,7 @@ public final class CalculateParams { /** * Gets the {@link ActivityOptionsWrapper} specified for the activity. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public ActivityOptionsWrapper getOptions() { return mOptions; } @@ -106,7 +108,7 @@ public final class CalculateParams { /** * Gets the optional {@link RequestWrapper} from the activity starter. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public RequestWrapper getRequest() { return mRequest; } @@ -115,7 +117,7 @@ public final class CalculateParams { * Gets the {@link LaunchParamsController.LaunchParamsModifier.Phase} that the resolution should * finish. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public int getPhase() { return mPhase; } @@ -123,7 +125,7 @@ public final class CalculateParams { /** * Gets the current {@link LaunchParamsWrapper}. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public LaunchParamsWrapper getCurrentParams() { return mCurrentParams; } @@ -131,7 +133,7 @@ public final class CalculateParams { /** * Gets the resulting {@link LaunchParamsWrapper}. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public LaunchParamsWrapper getOutParams() { return mOutParams; } @@ -139,7 +141,7 @@ public final class CalculateParams { /** * Returns whether the current system supports the multiple display. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public boolean supportsMultiDisplay() { return mSupportsMultiDisplay; } diff --git a/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierInterface.java b/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierInterface.java index 80abda8..2627c74 100644 --- a/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierInterface.java +++ b/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierInterface.java @@ -19,10 +19,12 @@ package com.android.server.wm; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.graphics.Rect; import android.view.Display; +import com.android.annotation.AddedIn; + import java.util.List; /** @@ -40,19 +42,19 @@ public interface CarLaunchParamsModifierInterface { * Returns {@link TaskDisplayAreaWrapper} of the given {@code featureId} in the given * {@code displayId}. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) @Nullable TaskDisplayAreaWrapper findTaskDisplayArea(int displayId, int featureId); /** * Returns the default {@link TaskDisplayAreaWrapper} of the given {@code displayId}. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) @Nullable TaskDisplayAreaWrapper getDefaultTaskDisplayAreaOnDisplay(int displayId); /** * Returns the list of fallback {@link TaskDisplayAreaWrapper} from the source of the request. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) @NonNull List<TaskDisplayAreaWrapper> getFallbackDisplayAreasForActivity( @NonNull ActivityRecordWrapper activityRecord, @Nullable RequestWrapper request); diff --git a/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierUpdatable.java b/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierUpdatable.java index a8bbe5a..6ea45e2 100644 --- a/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierUpdatable.java +++ b/builtInServices/src/com/android/server/wm/CarLaunchParamsModifierUpdatable.java @@ -20,8 +20,8 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.UserIdInt; -import android.car.annotation.AddedIn; import android.car.app.CarActivityManager; +import android.car.builtin.annotation.PlatformVersion; import android.content.ComponentName; import android.hardware.display.DisplayManager; import android.os.ServiceSpecificException; @@ -32,6 +32,7 @@ import android.util.SparseIntArray; import android.view.Display; import android.window.DisplayAreaOrganizer; +import com.android.annotation.AddedIn; import com.android.internal.annotations.GuardedBy; import java.util.ArrayList; @@ -47,25 +48,25 @@ import java.util.List; public interface CarLaunchParamsModifierUpdatable { /** Returns {@link DisplayManager.DisplayListener} of CarLaunchParamsModifierUpdatable. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) DisplayManager.DisplayListener getDisplayListener(); /** Notifies user switching. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void handleCurrentUserSwitching(@UserIdInt int newUserId); /** Notifies user starting. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void handleUserStarting(@UserIdInt int startingUser); /** Notifies user stopped. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) void handleUserStopped(@UserIdInt int stoppedUser); /** * Calculates {@code outParams} based on the given arguments. * See {@code LaunchParamsController.LaunchParamsModifier.onCalculate()} for the detail. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) int calculate(CalculateParams params); } diff --git a/builtInServices/src/com/android/server/wm/LaunchParamsWrapper.java b/builtInServices/src/com/android/server/wm/LaunchParamsWrapper.java index 45112c4..8d36a5b 100644 --- a/builtInServices/src/com/android/server/wm/LaunchParamsWrapper.java +++ b/builtInServices/src/com/android/server/wm/LaunchParamsWrapper.java @@ -18,9 +18,11 @@ package com.android.server.wm; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.graphics.Rect; +import com.android.annotation.AddedIn; + /** * Wrapper of {@link com.android.server.wm.LaunchParamsController.LaunchParams}. * @hide @@ -28,19 +30,19 @@ import android.graphics.Rect; @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public final class LaunchParamsWrapper { /** Returned when the modifier does not want to influence the bounds calculation */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static int RESULT_SKIP = LaunchParamsController.LaunchParamsModifier.RESULT_SKIP; /** * Returned when the modifier has changed the bounds and would like its results to be the * final bounds applied. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static int RESULT_DONE = LaunchParamsController.LaunchParamsModifier.RESULT_DONE; /** * Returned when the modifier has changed the bounds but is okay with other modifiers * influencing the bounds. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static int RESULT_CONTINUE = LaunchParamsController.LaunchParamsModifier.RESULT_CONTINUE; private final LaunchParamsController.LaunchParams mLaunchParams; @@ -50,7 +52,7 @@ public final class LaunchParamsWrapper { } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static LaunchParamsWrapper create( @Nullable LaunchParamsController.LaunchParams launchParams) { if (launchParams == null) return null; @@ -60,7 +62,7 @@ public final class LaunchParamsWrapper { /** * Gets the {@link TaskDisplayAreaWrapper} the {@link Task} would prefer to be on. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskDisplayAreaWrapper getPreferredTaskDisplayArea() { return TaskDisplayAreaWrapper.create(mLaunchParams.mPreferredTaskDisplayArea); } @@ -68,7 +70,7 @@ public final class LaunchParamsWrapper { /** * Sets the {@link TaskDisplayAreaWrapper} the {@link Task} would prefer to be on. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public void setPreferredTaskDisplayArea(TaskDisplayAreaWrapper tda) { mLaunchParams.mPreferredTaskDisplayArea = tda.getTaskDisplayArea(); } @@ -76,7 +78,7 @@ public final class LaunchParamsWrapper { /** * Gets the windowing mode to be in. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public int getWindowingMode() { return mLaunchParams.mWindowingMode; } @@ -84,7 +86,7 @@ public final class LaunchParamsWrapper { /** * Sets the windowing mode to be in. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public void setWindowingMode(int windowingMode) { mLaunchParams.mWindowingMode = windowingMode; } @@ -92,7 +94,7 @@ public final class LaunchParamsWrapper { /** * Gets the bounds within the parent container. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public Rect getBounds() { return mLaunchParams.mBounds; } @@ -100,13 +102,13 @@ public final class LaunchParamsWrapper { /** * Sets the bounds within the parent container. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public void setBounds(Rect bounds) { mLaunchParams.mBounds.set(bounds); } @Override - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public String toString() { return "LaunchParams{" + "mPreferredTaskDisplayArea=" + mLaunchParams.mPreferredTaskDisplayArea + diff --git a/builtInServices/src/com/android/server/wm/RequestWrapper.java b/builtInServices/src/com/android/server/wm/RequestWrapper.java index 826b648..2bda2f1 100644 --- a/builtInServices/src/com/android/server/wm/RequestWrapper.java +++ b/builtInServices/src/com/android/server/wm/RequestWrapper.java @@ -18,7 +18,9 @@ package com.android.server.wm; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; + +import com.android.annotation.AddedIn; /** * Wrapper of {@link com.android.server.wm.ActivityStarter.Request}. @@ -33,20 +35,20 @@ public final class RequestWrapper { } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static RequestWrapper create(@Nullable ActivityStarter.Request request) { if (request == null) return null; return new RequestWrapper(request); } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public ActivityStarter.Request getRequest() { return mRequest; } @Override - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public String toString() { return mRequest.toString(); } diff --git a/builtInServices/src/com/android/server/wm/TaskDisplayAreaWrapper.java b/builtInServices/src/com/android/server/wm/TaskDisplayAreaWrapper.java index 1f51243..d703246 100644 --- a/builtInServices/src/com/android/server/wm/TaskDisplayAreaWrapper.java +++ b/builtInServices/src/com/android/server/wm/TaskDisplayAreaWrapper.java @@ -18,9 +18,11 @@ package com.android.server.wm; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.view.Display; +import com.android.annotation.AddedIn; + /** * Wrapper of {@link TaskDisplayArea}. * @hide @@ -34,14 +36,14 @@ public final class TaskDisplayAreaWrapper { } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static TaskDisplayAreaWrapper create(@Nullable TaskDisplayArea taskDisplayArea) { if (taskDisplayArea == null) return null; return new TaskDisplayAreaWrapper(taskDisplayArea); } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskDisplayArea getTaskDisplayArea() { return mTaskDisplayArea; } @@ -49,13 +51,13 @@ public final class TaskDisplayAreaWrapper { /** * Gets the display this {@link TaskDisplayAreaWrapper} is on. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public Display getDisplay() { return mTaskDisplayArea.getDisplayContent().getDisplay(); } @Override - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public String toString() { return mTaskDisplayArea.toString(); } diff --git a/builtInServices/src/com/android/server/wm/TaskWrapper.java b/builtInServices/src/com/android/server/wm/TaskWrapper.java index 275d141..3759f91 100644 --- a/builtInServices/src/com/android/server/wm/TaskWrapper.java +++ b/builtInServices/src/com/android/server/wm/TaskWrapper.java @@ -18,7 +18,9 @@ package com.android.server.wm; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; + +import com.android.annotation.AddedIn; /** * Wrapper of {@link Task}. @@ -33,7 +35,7 @@ public final class TaskWrapper { } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static TaskWrapper create(@Nullable Task task) { if (task == null) return null; return new TaskWrapper(task); @@ -42,7 +44,7 @@ public final class TaskWrapper { /** * Gets the {@code userId} of this {@link Task} is created for */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public int getUserId() { return mTask.mUserId; } @@ -50,7 +52,7 @@ public final class TaskWrapper { /** * Gets the root {@link TaskWrapper} of the this. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskWrapper getRootTask() { return create(mTask.getRootTask()); } @@ -58,13 +60,13 @@ public final class TaskWrapper { /** * Gets the {@link TaskDisplayAreaWrapper} this {@link Task} is on. */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public TaskDisplayAreaWrapper getTaskDisplayArea() { return TaskDisplayAreaWrapper.create(mTask.getTaskDisplayArea()); } @Override - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public String toString() { return mTask.toString(); } diff --git a/builtInServices/src/com/android/server/wm/WindowLayoutWrapper.java b/builtInServices/src/com/android/server/wm/WindowLayoutWrapper.java index ba2cee6..f55ce99 100644 --- a/builtInServices/src/com/android/server/wm/WindowLayoutWrapper.java +++ b/builtInServices/src/com/android/server/wm/WindowLayoutWrapper.java @@ -18,9 +18,11 @@ package com.android.server.wm; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.car.annotation.AddedIn; +import android.car.builtin.annotation.PlatformVersion; import android.content.pm.ActivityInfo; +import com.android.annotation.AddedIn; + /** * Wrapper of {@link android.content.pm.ActivityInfo.WindowLayout}. * @hide @@ -34,14 +36,14 @@ public final class WindowLayoutWrapper { } /** @hide */ - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public static WindowLayoutWrapper create(@Nullable ActivityInfo.WindowLayout layout) { if (layout == null) return null; return new WindowLayoutWrapper(layout); } @Override - @AddedIn(majorVersion = 33) + @AddedIn(PlatformVersion.TIRAMISU_0) public String toString() { return mLayout.toString(); } diff --git a/builtInServices/tests/src/com/android/server/wm/AnnotationTest.java b/builtInServices/tests/src/com/android/server/wm/AnnotationTest.java index 20239fa..8360985 100644 --- a/builtInServices/tests/src/com/android/server/wm/AnnotationTest.java +++ b/builtInServices/tests/src/com/android/server/wm/AnnotationTest.java @@ -18,7 +18,7 @@ package com.android.server.wm; import static com.google.common.truth.Truth.assertWithMessage; -import android.car.annotation.AddedIn; +import com.android.annotation.AddedIn; import static android.car.test.util.AnnotationHelper.checkForAnnotation; |