Merge "Remove --ignore-classes-on-classpath argument"
diff --git a/Android.bp b/Android.bp
index 084c9f5..02db27a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -67,6 +67,7 @@
name: "framework-non-updatable-sources",
srcs: [
// Java/AIDL sources under frameworks/base
+ ":framework-annotations",
":framework-blobstore-sources",
":framework-core-sources",
":framework-drm-sources",
@@ -341,46 +342,6 @@
}
filegroup {
- name: "framework-annotations",
- srcs: [
- "core/java/android/annotation/AnyThread.java",
- "core/java/android/annotation/AppIdInt.java",
- "core/java/android/annotation/BytesLong.java",
- "core/java/android/annotation/CallbackExecutor.java",
- "core/java/android/annotation/CallSuper.java",
- "core/java/android/annotation/CheckResult.java",
- "core/java/android/annotation/CurrentTimeMillisLong.java",
- "core/java/android/annotation/CurrentTimeSecondsLong.java",
- "core/java/android/annotation/DrawableRes.java",
- "core/java/android/annotation/DurationMillisLong.java",
- "core/java/android/annotation/Hide.java",
- "core/java/android/annotation/IntDef.java",
- "core/java/android/annotation/IntRange.java",
- "core/java/android/annotation/LongDef.java",
- "core/java/android/annotation/MainThread.java",
- "core/java/android/annotation/NonNull.java",
- "core/java/android/annotation/Nullable.java",
- "core/java/android/annotation/RequiresPermission.java",
- "core/java/android/annotation/SdkConstant.java",
- "core/java/android/annotation/StringDef.java",
- "core/java/android/annotation/SystemApi.java",
- "core/java/android/annotation/SystemService.java",
- "core/java/android/annotation/TestApi.java",
- "core/java/android/annotation/UserIdInt.java",
- "core/java/android/annotation/WorkerThread.java",
- "core/java/com/android/internal/annotations/GuardedBy.java",
- "core/java/com/android/internal/annotations/Immutable.java",
- "core/java/com/android/internal/annotations/VisibleForTesting.java",
- ],
-}
-
-java_library {
- name: "framework-annotations-lib",
- srcs: [":framework-annotations"],
- sdk_version: "core_current",
-}
-
-filegroup {
name: "framework-ike-shared-srcs",
visibility: ["//packages/modules/IPsec"],
srcs: [
diff --git a/core/api/current.txt b/core/api/current.txt
index d82cd72..7fd3bca 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -19377,8 +19377,10 @@
field public static final int ENCODING_DEFAULT = 1; // 0x1
field public static final int ENCODING_DOLBY_MAT = 19; // 0x13
field public static final int ENCODING_DOLBY_TRUEHD = 14; // 0xe
+ field public static final int ENCODING_DRA = 28; // 0x1c
field public static final int ENCODING_DTS = 7; // 0x7
field public static final int ENCODING_DTS_HD = 8; // 0x8
+ field public static final int ENCODING_DTS_UHD = 27; // 0x1b
field public static final int ENCODING_E_AC3 = 6; // 0x6
field public static final int ENCODING_E_AC3_JOC = 18; // 0x12
field public static final int ENCODING_IEC61937 = 13; // 0xd
@@ -40794,6 +40796,8 @@
method public static int getDefaultSmsSubscriptionId();
method public static int getDefaultSubscriptionId();
method public static int getDefaultVoiceSubscriptionId();
+ method public int getDeviceToDeviceStatusSharing(int);
+ method @NonNull public java.util.List<android.net.Uri> getDeviceToDeviceStatusSharingContacts(int);
method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.List<android.telephony.SubscriptionInfo> getOpportunisticSubscriptions();
method public static int getSlotIndex(int);
method @Nullable public int[] getSubscriptionIds(int);
@@ -40806,6 +40810,8 @@
method public void removeOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener);
method public void removeOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void removeSubscriptionsFromGroup(@NonNull java.util.List<java.lang.Integer>, @NonNull android.os.ParcelUuid);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDeviceToDeviceStatusSharing(int, int);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDeviceToDeviceStatusSharingContacts(@NonNull java.util.List<android.net.Uri>, int);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setOpportunistic(boolean, int);
method public void setSubscriptionOverrideCongested(int, boolean, long);
method public void setSubscriptionOverrideCongested(int, boolean, @NonNull int[], long);
@@ -40817,6 +40823,12 @@
field public static final String ACTION_DEFAULT_SUBSCRIPTION_CHANGED = "android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED";
field public static final String ACTION_MANAGE_SUBSCRIPTION_PLANS = "android.telephony.action.MANAGE_SUBSCRIPTION_PLANS";
field public static final String ACTION_REFRESH_SUBSCRIPTION_PLANS = "android.telephony.action.REFRESH_SUBSCRIPTION_PLANS";
+ field public static final int D2D_SHARING_ALL = 3; // 0x3
+ field public static final int D2D_SHARING_ALL_CONTACTS = 1; // 0x1
+ field public static final int D2D_SHARING_DISABLED = 0; // 0x0
+ field public static final int D2D_SHARING_SELECTED_CONTACTS = 2; // 0x2
+ field public static final String D2D_STATUS_SHARING = "d2d_sharing_status";
+ field public static final String D2D_STATUS_SHARING_SELECTED_CONTACTS = "d2d_sharing_contacts";
field public static final int DATA_ROAMING_DISABLE = 0; // 0x0
field public static final int DATA_ROAMING_ENABLE = 1; // 0x1
field public static final int DEFAULT_SUBSCRIPTION_ID = 2147483647; // 0x7fffffff
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 7e729e5..039c6b1 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -1503,7 +1503,7 @@
public static interface BluetoothAdapter.OobDataCallback {
method public void onError(int);
- method public void onOobData(int, @Nullable android.bluetooth.OobData);
+ method public void onOobData(int, @NonNull android.bluetooth.OobData);
}
public final class BluetoothDevice implements android.os.Parcelable {
@@ -1685,8 +1685,6 @@
}
public final class OobData implements android.os.Parcelable {
- method @NonNull public static android.bluetooth.OobData.ClassicBuilder createClassicBuilder(@NonNull byte[], @NonNull byte[], @NonNull byte[]);
- method @NonNull public static android.bluetooth.OobData.LeBuilder createLeBuilder(@NonNull byte[], @NonNull byte[], int);
method @NonNull public byte[] getClassOfDevice();
method @NonNull public byte[] getClassicLength();
method @NonNull public byte[] getConfirmationHash();
@@ -1719,6 +1717,7 @@
}
public static final class OobData.ClassicBuilder {
+ ctor public OobData.ClassicBuilder(@NonNull byte[], @NonNull byte[], @NonNull byte[]);
method @NonNull public android.bluetooth.OobData build();
method @NonNull public android.bluetooth.OobData.ClassicBuilder setClassOfDevice(@NonNull byte[]);
method @NonNull public android.bluetooth.OobData.ClassicBuilder setDeviceName(@NonNull byte[]);
@@ -1726,6 +1725,7 @@
}
public static final class OobData.LeBuilder {
+ ctor public OobData.LeBuilder(@NonNull byte[], @NonNull byte[], int);
method @NonNull public android.bluetooth.OobData build();
method @NonNull public android.bluetooth.OobData.LeBuilder setDeviceName(@NonNull byte[]);
method @NonNull public android.bluetooth.OobData.LeBuilder setLeFlags(int);
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index e2975ad..81b9428 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -1191,6 +1191,7 @@
public class VintfObject {
method public static String[] getHalNamesAndVersions();
+ method @NonNull public static String getPlatformSepolicyVersion();
method public static String getSepolicyVersion();
method public static Long getTargetFrameworkCompatibilityMatrixVersion();
method public static java.util.Map<java.lang.String,java.lang.String[]> getVndkSnapshots();
diff --git a/core/java/Android.bp b/core/java/Android.bp
index 965665d..874704e 100644
--- a/core/java/Android.bp
+++ b/core/java/Android.bp
@@ -46,43 +46,6 @@
"android/accounts/AccountsException.java",
"android/accounts/AuthenticatorException.java",
"android/accounts/OperationCanceledException.java",
- "android/annotation/AnimatorRes.java",
- "android/annotation/AnimRes.java",
- "android/annotation/AnyRes.java",
- "android/annotation/ArrayRes.java",
- "android/annotation/AttrRes.java",
- "android/annotation/BoolRes.java",
- "android/annotation/BroadcastBehavior.java",
- "android/annotation/CallbackExecutor.java",
- "android/annotation/CallSuper.java",
- "android/annotation/CheckResult.java",
- "android/annotation/ColorInt.java",
- "android/annotation/ColorRes.java",
- "android/annotation/DimenRes.java",
- "android/annotation/DrawableRes.java",
- "android/annotation/FontRes.java",
- "android/annotation/FractionRes.java",
- "android/annotation/IntDef.java",
- "android/annotation/IntegerRes.java",
- "android/annotation/IntRange.java",
- "android/annotation/LayoutRes.java",
- "android/annotation/NonNull.java",
- "android/annotation/Nullable.java",
- "android/annotation/PluralsRes.java",
- "android/annotation/RawRes.java",
- "android/annotation/RequiresPermission.java",
- "android/annotation/SdkConstant.java",
- "android/annotation/Size.java",
- "android/annotation/StringDef.java",
- "android/annotation/StringRes.java",
- "android/annotation/StyleableRes.java",
- "android/annotation/StyleRes.java",
- "android/annotation/SuppressLint.java",
- "android/annotation/SystemApi.java",
- "android/annotation/SystemService.java",
- "android/annotation/TestApi.java",
- "android/annotation/UserIdInt.java",
- "android/annotation/XmlRes.java",
"android/app/Application.java",
"android/app/IApplicationThread.aidl",
"android/app/IServiceConnection.aidl",
@@ -123,7 +86,6 @@
"android/util/AndroidException.java",
"android/view/DisplayAdjustments.java",
"android/view/ViewDebug.java",
- "com/android/internal/annotations/VisibleForTesting.java",
],
visibility: ["//frameworks/base/test-mock"],
}
diff --git a/core/java/android/annotation/AnimRes.java b/core/java/android/annotation/AnimRes.java
deleted file mode 100644
index 56f8acf..0000000
--- a/core/java/android/annotation/AnimRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an anim resource reference (e.g. {@link android.R.anim#fade_in}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface AnimRes {
-}
diff --git a/core/java/android/annotation/AnimatorRes.java b/core/java/android/annotation/AnimatorRes.java
deleted file mode 100644
index cd4c189..0000000
--- a/core/java/android/annotation/AnimatorRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an animator resource reference (e.g. {@link android.R.animator#fade_in}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface AnimatorRes {
-}
diff --git a/core/java/android/annotation/AnyRes.java b/core/java/android/annotation/AnyRes.java
deleted file mode 100644
index 44411a0..0000000
--- a/core/java/android/annotation/AnyRes.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a resource reference of any type. If the specific type is known, use
- * one of the more specific annotations instead, such as {@link StringRes} or
- * {@link DrawableRes}.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface AnyRes {
-}
diff --git a/core/java/android/annotation/AnyThread.java b/core/java/android/annotation/AnyThread.java
deleted file mode 100644
index ee36a42..0000000
--- a/core/java/android/annotation/AnyThread.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2016 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the annotated method can be called from any thread (e.g. it is
- * "thread safe".) If the annotated element is a class, then all methods in the
- * class can be called from any thread.
- * <p>
- * The main purpose of this method is to indicate that you believe a method can
- * be called from any thread; static tools can then check that nothing you call
- * from within this method or class have more strict threading requirements.
- * <p>
- * Example:
- *
- * <pre>
- * <code>
- * @AnyThread
- * public void deliverResult(D data) { ... }
- * </code>
- * </pre>
- *
- * @memberDoc This method is safe to call from any thread.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD,CONSTRUCTOR,TYPE,PARAMETER})
-public @interface AnyThread {
-}
diff --git a/core/java/android/annotation/AppIdInt.java b/core/java/android/annotation/AppIdInt.java
deleted file mode 100644
index 29838dd..0000000
--- a/core/java/android/annotation/AppIdInt.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2016 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the annotated element is a multi-user application ID. This is
- * <em>not</em> the same as a UID.
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface AppIdInt {
-}
diff --git a/core/java/android/annotation/ArrayRes.java b/core/java/android/annotation/ArrayRes.java
deleted file mode 100644
index 1407af1..0000000
--- a/core/java/android/annotation/ArrayRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an array resource reference (e.g. {@link android.R.array#phoneTypes}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface ArrayRes {
-}
diff --git a/core/java/android/annotation/AttrRes.java b/core/java/android/annotation/AttrRes.java
deleted file mode 100644
index 285b80c..0000000
--- a/core/java/android/annotation/AttrRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an attribute reference (e.g. {@link android.R.attr#action}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface AttrRes {
-}
diff --git a/core/java/android/annotation/BinderThread.java b/core/java/android/annotation/BinderThread.java
deleted file mode 100644
index ca5e14c..0000000
--- a/core/java/android/annotation/BinderThread.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated method should only be called on the binder thread.
- * If the annotated element is a class, then all methods in the class should be called
- * on the binder thread.
- * <p>
- * Example:
- * <pre><code>
- * @BinderThread
- * public BeamShareData createBeamShareData() { ... }
- * </code></pre>
- *
- * {@hide}
- */
-@Retention(SOURCE)
-@Target({METHOD,CONSTRUCTOR,TYPE,PARAMETER})
-public @interface BinderThread {
-}
\ No newline at end of file
diff --git a/core/java/android/annotation/BoolRes.java b/core/java/android/annotation/BoolRes.java
deleted file mode 100644
index f50785b..0000000
--- a/core/java/android/annotation/BoolRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a boolean resource reference.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface BoolRes {
-}
diff --git a/core/java/android/annotation/BroadcastBehavior.java b/core/java/android/annotation/BroadcastBehavior.java
deleted file mode 100644
index 70d82cb..0000000
--- a/core/java/android/annotation/BroadcastBehavior.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import android.content.Intent;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Description of how the annotated broadcast action behaves.
- *
- * @hide
- */
-@Target({ ElementType.FIELD })
-@Retention(RetentionPolicy.SOURCE)
-public @interface BroadcastBehavior {
- /**
- * This broadcast will only be delivered to an explicit target.
- *
- * @see Intent#setPackage(String)
- * @see Intent#setComponent(android.content.ComponentName)
- */
- boolean explicitOnly() default false;
-
- /**
- * This broadcast will only be delivered to registered receivers.
- *
- * @see Intent#FLAG_RECEIVER_REGISTERED_ONLY
- */
- boolean registeredOnly() default false;
-
- /**
- * This broadcast will include all {@code AndroidManifest.xml} receivers
- * regardless of process state.
- *
- * @see Intent#FLAG_RECEIVER_INCLUDE_BACKGROUND
- */
- boolean includeBackground() default false;
-
- /**
- * This broadcast is protected and can only be sent by the OS.
- */
- boolean protectedBroadcast() default false;
-}
diff --git a/core/java/android/annotation/BytesLong.java b/core/java/android/annotation/BytesLong.java
deleted file mode 100644
index f5e1a9c..0000000
--- a/core/java/android/annotation/BytesLong.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @memberDoc Value is a non-negative number of bytes.
- * @paramDoc Value is a non-negative number of bytes.
- * @returnDoc Value is a non-negative number of bytes.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface BytesLong {
-}
diff --git a/core/java/android/annotation/CallSuper.java b/core/java/android/annotation/CallSuper.java
deleted file mode 100644
index c16b511..0000000
--- a/core/java/android/annotation/CallSuper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that any overriding methods should invoke this method as well.
- * <p>
- * Example:
- *
- * <pre>
- * <code>
- * @CallSuper
- * public abstract void onFocusLost();
- * </code>
- * </pre>
- *
- * @memberDoc If you override this method you <em>must</em> call through to the
- * superclass implementation.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD})
-public @interface CallSuper {
-}
diff --git a/core/java/android/annotation/CallbackExecutor.java b/core/java/android/annotation/CallbackExecutor.java
deleted file mode 100644
index 4258f73..0000000
--- a/core/java/android/annotation/CallbackExecutor.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.util.concurrent.Executor;
-
-/**
- * @paramDoc Callback and listener events are dispatched through this
- * {@link Executor}, providing an easy way to control which thread is
- * used. To dispatch events through the main thread of your
- * application, you can use
- * {@link android.content.Context#getMainExecutor() Context.getMainExecutor()}.
- * To dispatch events through a shared thread pool, you can use
- * {@link android.os.AsyncTask#THREAD_POOL_EXECUTOR AsyncTask#THREAD_POOL_EXECUTOR}.
- * @hide
- */
-@Retention(SOURCE)
-@Target(PARAMETER)
-public @interface CallbackExecutor {
-}
diff --git a/core/java/android/annotation/CheckResult.java b/core/java/android/annotation/CheckResult.java
deleted file mode 100644
index 97d031a..0000000
--- a/core/java/android/annotation/CheckResult.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated method returns a result that it typically is
- * an error to ignore. This is usually used for methods that have no side effect,
- * so calling it without actually looking at the result usually means the developer
- * has misunderstood what the method does.
- * <p>
- * Example:
- * <pre>{@code
- * public @CheckResult String trim(String s) { return s.trim(); }
- * ...
- * s.trim(); // this is probably an error
- * s = s.trim(); // ok
- * }</pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD})
-public @interface CheckResult {
- /** Defines the name of the suggested method to use instead, if applicable (using
- * the same signature format as javadoc.) If there is more than one possibility,
- * list them all separated by commas.
- * <p>
- * For example, ProcessBuilder has a method named {@code redirectErrorStream()}
- * which sounds like it might redirect the error stream. It does not. It's just
- * a getter which returns whether the process builder will redirect the error stream,
- * and to actually set it, you must call {@code redirectErrorStream(boolean)}.
- * In that case, the method should be defined like this:
- * <pre>
- * @CheckResult(suggest="#redirectErrorStream(boolean)")
- * public boolean redirectErrorStream() { ... }
- * </pre>
- */
- String suggest() default "";
-}
\ No newline at end of file
diff --git a/core/java/android/annotation/ColorInt.java b/core/java/android/annotation/ColorInt.java
deleted file mode 100644
index 4671b1b..0000000
--- a/core/java/android/annotation/ColorInt.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated element represents a packed color
- * int, {@code AARRGGBB}. If applied to an int array, every element
- * in the array represents a color integer.
- * <p>
- * Example:
- * <pre>{@code
- * public abstract void setTextColor(@ColorInt int color);
- * }</pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({PARAMETER,METHOD,LOCAL_VARIABLE,FIELD})
-public @interface ColorInt {
-}
\ No newline at end of file
diff --git a/core/java/android/annotation/ColorLong.java b/core/java/android/annotation/ColorLong.java
deleted file mode 100644
index 9b19c76..0000000
--- a/core/java/android/annotation/ColorLong.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2016 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * <p>Denotes that the annotated element represents a packed color
- * long. If applied to a long array, every element in the array
- * represents a color long. For more information on how colors
- * are packed in a long, please refer to the documentation of
- * the {@link android.graphics.Color} class.</p>
- *
- * <p>Example:</p>
- *
- * <pre>{@code
- * public void setFillColor(@ColorLong long color);
- * }</pre>
- *
- * @see android.graphics.Color
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({PARAMETER,METHOD,LOCAL_VARIABLE,FIELD})
-public @interface ColorLong {
-}
diff --git a/core/java/android/annotation/ColorRes.java b/core/java/android/annotation/ColorRes.java
deleted file mode 100644
index 061faa0..0000000
--- a/core/java/android/annotation/ColorRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a color resource reference (e.g. {@link android.R.color#black}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface ColorRes {
-}
diff --git a/core/java/android/annotation/Condemned.java b/core/java/android/annotation/Condemned.java
deleted file mode 100644
index 186409b..0000000
--- a/core/java/android/annotation/Condemned.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * A program element annotated @Condemned is one that programmers are
- * blocked from using, typically because it's about to be completely destroyed.
- * <p>
- * This is a stronger version of @Deprecated, and it's typically used to
- * mark APIs that only existed temporarily in a preview SDK, and which only
- * continue to exist temporarily to support binary compatibility.
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target(value={CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})
-public @interface Condemned {
-}
diff --git a/core/java/android/annotation/CurrentTimeMillisLong.java b/core/java/android/annotation/CurrentTimeMillisLong.java
deleted file mode 100644
index 355bb5a..0000000
--- a/core/java/android/annotation/CurrentTimeMillisLong.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @memberDoc Value is a non-negative timestamp measured as the number of
- * milliseconds since 1970-01-01T00:00:00Z.
- * @paramDoc Value is a non-negative timestamp measured as the number of
- * milliseconds since 1970-01-01T00:00:00Z.
- * @returnDoc Value is a non-negative timestamp measured as the number of
- * milliseconds since 1970-01-01T00:00:00Z.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface CurrentTimeMillisLong {
-}
diff --git a/core/java/android/annotation/CurrentTimeSecondsLong.java b/core/java/android/annotation/CurrentTimeSecondsLong.java
deleted file mode 100644
index 2b4ffd7..0000000
--- a/core/java/android/annotation/CurrentTimeSecondsLong.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @memberDoc Value is a non-negative timestamp measured as the number of
- * seconds since 1970-01-01T00:00:00Z.
- * @paramDoc Value is a non-negative timestamp measured as the number of
- * seconds since 1970-01-01T00:00:00Z.
- * @returnDoc Value is a non-negative timestamp measured as the number of
- * seconds since 1970-01-01T00:00:00Z.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface CurrentTimeSecondsLong {
-}
diff --git a/core/java/android/annotation/DimenRes.java b/core/java/android/annotation/DimenRes.java
deleted file mode 100644
index 02ae00c..0000000
--- a/core/java/android/annotation/DimenRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a dimension resource reference (e.g. {@link android.R.dimen#app_icon_size}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface DimenRes {
-}
diff --git a/core/java/android/annotation/Dimension.java b/core/java/android/annotation/Dimension.java
deleted file mode 100644
index 5f705ad5..0000000
--- a/core/java/android/annotation/Dimension.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2016 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that a numeric parameter, field or method return value is expected
- * to represent a dimension.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE,ANNOTATION_TYPE})
-public @interface Dimension {
- @Unit
- int unit() default PX;
-
- int DP = 0;
- int PX = 1;
- int SP = 2;
-
- @IntDef({PX, DP, SP})
- @Retention(SOURCE)
- @interface Unit {}
-}
diff --git a/core/java/android/annotation/DrawableRes.java b/core/java/android/annotation/DrawableRes.java
deleted file mode 100644
index ebefa1d..0000000
--- a/core/java/android/annotation/DrawableRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a drawable resource reference (e.g. {@link android.R.attr#alertDialogIcon}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface DrawableRes {
-}
diff --git a/core/java/android/annotation/DurationMillisLong.java b/core/java/android/annotation/DurationMillisLong.java
deleted file mode 100644
index ce77532..0000000
--- a/core/java/android/annotation/DurationMillisLong.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @memberDoc Value is a non-negative duration in milliseconds.
- * @paramDoc Value is a non-negative duration in milliseconds.
- * @returnDoc Value is a non-negative duration in milliseconds.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface DurationMillisLong {
-}
diff --git a/core/java/android/annotation/ElapsedRealtimeLong.java b/core/java/android/annotation/ElapsedRealtimeLong.java
deleted file mode 100644
index f77ff72..0000000
--- a/core/java/android/annotation/ElapsedRealtimeLong.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import android.os.SystemClock;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @memberDoc Value is a non-negative timestamp in the
- * {@link SystemClock#elapsedRealtime()} time base.
- * @paramDoc Value is a non-negative timestamp in the
- * {@link SystemClock#elapsedRealtime()} time base.
- * @returnDoc Value is a non-negative timestamp in the
- * {@link SystemClock#elapsedRealtime()} time base.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface ElapsedRealtimeLong {
-}
diff --git a/core/java/android/annotation/FloatRange.java b/core/java/android/annotation/FloatRange.java
deleted file mode 100644
index 05b51680..0000000
--- a/core/java/android/annotation/FloatRange.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated element should be a float or double in the given range
- * <p>
- * Example:
- * <pre><code>
- * @FloatRange(from=0.0,to=1.0)
- * public float getAlpha() {
- * ...
- * }
- * </code></pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE})
-public @interface FloatRange {
- /** Smallest value. Whether it is inclusive or not is determined
- * by {@link #fromInclusive} */
- double from() default Double.NEGATIVE_INFINITY;
- /** Largest value. Whether it is inclusive or not is determined
- * by {@link #toInclusive} */
- double to() default Double.POSITIVE_INFINITY;
-
- /** Whether the from value is included in the range */
- boolean fromInclusive() default true;
-
- /** Whether the to value is included in the range */
- boolean toInclusive() default true;
-}
\ No newline at end of file
diff --git a/core/java/android/annotation/FontRes.java b/core/java/android/annotation/FontRes.java
deleted file mode 100644
index dbacb58..0000000
--- a/core/java/android/annotation/FontRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a Font resource reference (e.g. R.font.myfont).
- *
- * @hide
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface FontRes {
-}
diff --git a/core/java/android/annotation/FractionRes.java b/core/java/android/annotation/FractionRes.java
deleted file mode 100644
index fd84d3e..0000000
--- a/core/java/android/annotation/FractionRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a fraction resource reference.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface FractionRes {
-}
diff --git a/core/java/android/annotation/HalfFloat.java b/core/java/android/annotation/HalfFloat.java
deleted file mode 100644
index 256008c..0000000
--- a/core/java/android/annotation/HalfFloat.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2016 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * <p>Denotes that the annotated element represents a half-precision floating point
- * value. Such values are stored in short data types and can be manipulated with
- * the {@link android.util.Half} class. If applied to an array of short, every
- * element in the array represents a half-precision float.</p>
- *
- * <p>Example:</p>
- *
- * <pre>{@code
- * public abstract void setPosition(@HalfFloat short x, @HalfFloat short y, @HalfFloat short z);
- * }</pre>
- *
- * @see android.util.Half
- * @see android.util.Half#toHalf(float)
- * @see android.util.Half#toFloat(short)
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({PARAMETER, METHOD, LOCAL_VARIABLE, FIELD})
-public @interface HalfFloat {
-}
diff --git a/core/java/android/annotation/Hide.java b/core/java/android/annotation/Hide.java
deleted file mode 100644
index c8e5a4a..0000000
--- a/core/java/android/annotation/Hide.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2019 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 android.annotation;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Indicates that an API is hidden by default, in a similar fashion to the
- * <pre>@hide</pre> javadoc tag.
- *
- * <p>Note that, in order for this to work, metalava has to be invoked with
- * the flag {@code --hide-annotation android.annotation.Hide}.
- * @hide
- */
-@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
-@Retention(RetentionPolicy.CLASS)
-public @interface Hide {
-}
diff --git a/core/java/android/annotation/IdRes.java b/core/java/android/annotation/IdRes.java
deleted file mode 100644
index b286965..0000000
--- a/core/java/android/annotation/IdRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an id resource reference (e.g. {@link android.R.id#copy}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface IdRes {
-}
diff --git a/core/java/android/annotation/IntDef.java b/core/java/android/annotation/IntDef.java
deleted file mode 100644
index f84a676..0000000
--- a/core/java/android/annotation/IntDef.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated element of integer type, represents
- * a logical type and that its value should be one of the explicitly
- * named constants. If the {@link #flag()} attribute is set to true,
- * multiple constants can be combined.
- * <p>
- * <pre><code>
- * @Retention(SOURCE)
- * @IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
- * public @interface NavigationMode {}
- * public static final int NAVIGATION_MODE_STANDARD = 0;
- * public static final int NAVIGATION_MODE_LIST = 1;
- * public static final int NAVIGATION_MODE_TABS = 2;
- * ...
- * public abstract void setNavigationMode(@NavigationMode int mode);
- * @NavigationMode
- * public abstract int getNavigationMode();
- * </code></pre>
- * For a flag, set the flag attribute:
- * <pre><code>
- * @IntDef(
- * flag = true,
- * value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
- * </code></pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({ANNOTATION_TYPE})
-public @interface IntDef {
- /** Defines the constant prefix for this element */
- String[] prefix() default {};
- /** Defines the constant suffix for this element */
- String[] suffix() default {};
-
- /** Defines the allowed constants for this element */
- int[] value() default {};
-
- /** Defines whether the constants can be used as a flag, or just as an enum (the default) */
- boolean flag() default false;
-}
diff --git a/core/java/android/annotation/IntRange.java b/core/java/android/annotation/IntRange.java
deleted file mode 100644
index c043e2d..0000000
--- a/core/java/android/annotation/IntRange.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated element should be an int or long in the given range
- * <p>
- * Example:
- * <pre><code>
- * @IntRange(from=0,to=255)
- * public int getAlpha() {
- * ...
- * }
- * </code></pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE,ANNOTATION_TYPE})
-public @interface IntRange {
- /** Smallest value, inclusive */
- long from() default Long.MIN_VALUE;
- /** Largest value, inclusive */
- long to() default Long.MAX_VALUE;
-}
\ No newline at end of file
diff --git a/core/java/android/annotation/IntegerRes.java b/core/java/android/annotation/IntegerRes.java
deleted file mode 100644
index 5313f4a..0000000
--- a/core/java/android/annotation/IntegerRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an integer resource reference (e.g. {@link android.R.integer#config_shortAnimTime}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface IntegerRes {
-}
diff --git a/core/java/android/annotation/InterpolatorRes.java b/core/java/android/annotation/InterpolatorRes.java
deleted file mode 100644
index 8877a5f..0000000
--- a/core/java/android/annotation/InterpolatorRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an interpolator resource reference (e.g. {@link android.R.interpolator#cycle}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface InterpolatorRes {
-}
diff --git a/core/java/android/annotation/LayoutRes.java b/core/java/android/annotation/LayoutRes.java
deleted file mode 100644
index 15ba86f..0000000
--- a/core/java/android/annotation/LayoutRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a layout resource reference (e.g. {@link android.R.layout#list_content}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface LayoutRes {
-}
diff --git a/core/java/android/annotation/LongDef.java b/core/java/android/annotation/LongDef.java
deleted file mode 100644
index 8723eef8..0000000
--- a/core/java/android/annotation/LongDef.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated long element represents
- * a logical type and that its value should be one of the explicitly
- * named constants. If the {@link #flag()} attribute is set to true,
- * multiple constants can be combined.
- * <p>
- * <pre><code>
- * @Retention(SOURCE)
- * @LongDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
- * public @interface NavigationMode {}
- * public static final long NAVIGATION_MODE_STANDARD = 0;
- * public static final long NAVIGATION_MODE_LIST = 1;
- * public static final long NAVIGATION_MODE_TABS = 2;
- * ...
- * public abstract void setNavigationMode(@NavigationMode long mode);
- * @NavigationMode
- * public abstract long getNavigationMode();
- * </code></pre>
- * For a flag, set the flag attribute:
- * <pre><code>
- * @LongDef(
- * flag = true,
- * value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
- * </code></pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({ANNOTATION_TYPE})
-public @interface LongDef {
- /** Defines the constant prefix for this element */
- String[] prefix() default "";
-
- /** Defines the allowed constants for this element */
- long[] value() default {};
-
- /** Defines whether the constants can be used as a flag, or just as an enum (the default) */
- boolean flag() default false;
-}
diff --git a/core/java/android/annotation/MainThread.java b/core/java/android/annotation/MainThread.java
deleted file mode 100644
index a070246..0000000
--- a/core/java/android/annotation/MainThread.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the annotated method should only be called on the main thread.
- * If the annotated element is a class, then all methods in the class should be
- * called on the main thread.
- * <p>
- * Example:
- *
- * <pre>
- * <code>
- * @MainThread
- * public void deliverResult(D data) { ... }
- * </code>
- * </pre>
- *
- * @memberDoc This method must be called from the main thread of your app.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD,CONSTRUCTOR,TYPE,PARAMETER})
-public @interface MainThread {
-}
diff --git a/core/java/android/annotation/MenuRes.java b/core/java/android/annotation/MenuRes.java
deleted file mode 100644
index b6dcc46..0000000
--- a/core/java/android/annotation/MenuRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a menu resource reference.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface MenuRes {
-}
diff --git a/core/java/android/annotation/NavigationRes.java b/core/java/android/annotation/NavigationRes.java
deleted file mode 100644
index 3af5ecf..0000000
--- a/core/java/android/annotation/NavigationRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a navigation resource reference (e.g. {@code R.navigation.flow}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface NavigationRes {
-}
diff --git a/core/java/android/annotation/NonNull.java b/core/java/android/annotation/NonNull.java
deleted file mode 100644
index 20472ba..0000000
--- a/core/java/android/annotation/NonNull.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that a parameter, field or method return value can never be null.
- * <p>
- * This is a marker annotation and it has no specific attributes.
- *
- * @paramDoc This value cannot be {@code null}.
- * @returnDoc This value cannot be {@code null}.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface NonNull {
-}
diff --git a/core/java/android/annotation/Nullable.java b/core/java/android/annotation/Nullable.java
deleted file mode 100644
index b8473e7..0000000
--- a/core/java/android/annotation/Nullable.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that a parameter, field or method return value can be null.
- * <p>
- * When decorating a method call parameter, this denotes that the parameter can
- * legitimately be null and the method will gracefully deal with it. Typically
- * used on optional parameters.
- * <p>
- * When decorating a method, this denotes the method might legitimately return
- * null.
- * <p>
- * This is a marker annotation and it has no specific attributes.
- *
- * @paramDoc This value may be {@code null}.
- * @returnDoc This value may be {@code null}.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface Nullable {
-}
diff --git a/core/java/android/annotation/OWNERS b/core/java/android/annotation/OWNERS
deleted file mode 100644
index e1ef544..0000000
--- a/core/java/android/annotation/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-tnorbye@google.com
-aurimas@google.com
-per-file UnsupportedAppUsage.java = mathewi@google.com, satayev@google.com, andreionea@google.com
diff --git a/core/java/android/annotation/PluralsRes.java b/core/java/android/annotation/PluralsRes.java
deleted file mode 100644
index 31ac729..0000000
--- a/core/java/android/annotation/PluralsRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a plurals resource reference.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface PluralsRes {
-}
diff --git a/core/java/android/annotation/Px.java b/core/java/android/annotation/Px.java
deleted file mode 100644
index cec7f80..0000000
--- a/core/java/android/annotation/Px.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2016 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that a numeric parameter, field or method return value is expected
- * to represent a pixel dimension.
- *
- * @memberDoc This units of this value are pixels.
- * @paramDoc This units of this value are pixels.
- * @returnDoc This units of this value are pixels.
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD, LOCAL_VARIABLE})
-@Dimension(unit = Dimension.PX)
-public @interface Px {
-}
diff --git a/core/java/android/annotation/RawRes.java b/core/java/android/annotation/RawRes.java
deleted file mode 100644
index 39970b3..0000000
--- a/core/java/android/annotation/RawRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a raw resource reference.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface RawRes {
-}
diff --git a/core/java/android/annotation/RequiresFeature.java b/core/java/android/annotation/RequiresFeature.java
deleted file mode 100644
index 08861d4..0000000
--- a/core/java/android/annotation/RequiresFeature.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2018 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-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.SOURCE;
-
-import android.content.pm.PackageManager;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the annotated element requires one or more device features. This
- * is used to auto-generate documentation.
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({TYPE,FIELD,METHOD,CONSTRUCTOR})
-public @interface RequiresFeature {
- /**
- * The name of the device feature that is required.
- */
- String value();
-
- /**
- * Defines the name of the method that should be called to check whether the feature is
- * available, using the same signature format as javadoc. The feature checking method can have
- * multiple parameters, but the feature name parameter must be of type String and must also be
- * the first String-type parameter.
- * <p>
- * By default, the enforcement is {@link PackageManager#hasSystemFeature(String)}.
- */
- String enforcement() default("android.content.pm.PackageManager#hasSystemFeature");
-}
diff --git a/core/java/android/annotation/RequiresPermission.java b/core/java/android/annotation/RequiresPermission.java
deleted file mode 100644
index 1d89e31..0000000
--- a/core/java/android/annotation/RequiresPermission.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the annotated element requires (or may require) one or more permissions.
- * <p/>
- * Example of requiring a single permission:
- * <pre>{@code
- * {@literal @}RequiresPermission(Manifest.permission.SET_WALLPAPER)
- * public abstract void setWallpaper(Bitmap bitmap) throws IOException;
- *
- * {@literal @}RequiresPermission(ACCESS_COARSE_LOCATION)
- * public abstract Location getLastKnownLocation(String provider);
- * }</pre>
- * Example of requiring at least one permission from a set:
- * <pre>{@code
- * {@literal @}RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
- * public abstract Location getLastKnownLocation(String provider);
- * }</pre>
- * Example of requiring multiple permissions:
- * <pre>{@code
- * {@literal @}RequiresPermission(allOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
- * public abstract Location getLastKnownLocation(String provider);
- * }</pre>
- * Example of requiring separate read and write permissions for a content provider:
- * <pre>{@code
- * {@literal @}RequiresPermission.Read(@RequiresPermission(READ_HISTORY_BOOKMARKS))
- * {@literal @}RequiresPermission.Write(@RequiresPermission(WRITE_HISTORY_BOOKMARKS))
- * public static final Uri BOOKMARKS_URI = Uri.parse("content://browser/bookmarks");
- * }</pre>
- * <p>
- * When specified on a parameter, the annotation indicates that the method requires
- * a permission which depends on the value of the parameter. For example, consider
- * {@link android.app.Activity#startActivity(android.content.Intent)
- * Activity#startActivity(Intent)}:
- * <pre>{@code
- * public void startActivity(@RequiresPermission Intent intent) { ... }
- * }</pre>
- * Notice how there are no actual permission names listed in the annotation. The actual
- * permissions required will depend on the particular intent passed in. For example,
- * the code may look like this:
- * <pre>{@code
- * Intent intent = new Intent(Intent.ACTION_CALL);
- * startActivity(intent);
- * }</pre>
- * and the actual permission requirement for this particular intent is described on
- * the Intent name itself:
- * <pre>{@code
- * {@literal @}RequiresPermission(Manifest.permission.CALL_PHONE)
- * public static final String ACTION_CALL = "android.intent.action.CALL";
- * }</pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({ANNOTATION_TYPE,METHOD,CONSTRUCTOR,FIELD,PARAMETER})
-public @interface RequiresPermission {
- /**
- * The name of the permission that is required, if precisely one permission
- * is required. If more than one permission is required, specify either
- * {@link #allOf()} or {@link #anyOf()} instead.
- * <p>
- * If specified, {@link #anyOf()} and {@link #allOf()} must both be null.
- */
- String value() default "";
-
- /**
- * Specifies a list of permission names that are all required.
- * <p>
- * If specified, {@link #anyOf()} and {@link #value()} must both be null.
- */
- String[] allOf() default {};
-
- /**
- * Specifies a list of permission names where at least one is required
- * <p>
- * If specified, {@link #allOf()} and {@link #value()} must both be null.
- */
- String[] anyOf() default {};
-
- /**
- * If true, the permission may not be required in all cases (e.g. it may only be
- * enforced on certain platforms, or for certain call parameters, etc.
- */
- boolean conditional() default false;
-
- /**
- * Specifies that the given permission is required for read operations.
- * <p>
- * When specified on a parameter, the annotation indicates that the method requires
- * a permission which depends on the value of the parameter (and typically
- * the corresponding field passed in will be one of a set of constants which have
- * been annotated with a <code>@RequiresPermission</code> annotation.)
- */
- @Target({FIELD, METHOD, PARAMETER})
- @interface Read {
- RequiresPermission value() default @RequiresPermission;
- }
-
- /**
- * Specifies that the given permission is required for write operations.
- * <p>
- * When specified on a parameter, the annotation indicates that the method requires
- * a permission which depends on the value of the parameter (and typically
- * the corresponding field passed in will be one of a set of constants which have
- * been annotated with a <code>@RequiresPermission</code> annotation.)
- */
- @Target({FIELD, METHOD, PARAMETER})
- @interface Write {
- RequiresPermission value() default @RequiresPermission;
- }
-}
diff --git a/core/java/android/annotation/SdkConstant.java b/core/java/android/annotation/SdkConstant.java
deleted file mode 100644
index 0a53186..0000000
--- a/core/java/android/annotation/SdkConstant.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008 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 android.annotation;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Indicates a constant field value should be exported to be used in the SDK tools.
- * @hide
- */
-@Target({ ElementType.FIELD })
-@Retention(RetentionPolicy.SOURCE)
-public @interface SdkConstant {
- public static enum SdkConstantType {
- ACTIVITY_INTENT_ACTION, BROADCAST_INTENT_ACTION, SERVICE_ACTION, INTENT_CATEGORY, FEATURE;
- }
-
- SdkConstantType value();
-}
diff --git a/core/java/android/annotation/Size.java b/core/java/android/annotation/Size.java
deleted file mode 100644
index 7c3e70f..0000000
--- a/core/java/android/annotation/Size.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated element should have a given size or length.
- * Note that "-1" means "unset". Typically used with a parameter or
- * return value of type array or collection.
- * <p>
- * Example:
- * <pre>{@code
- * public void getLocationInWindow(@Size(2) int[] location) {
- * ...
- * }
- * }</pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({PARAMETER,LOCAL_VARIABLE,METHOD,FIELD})
-public @interface Size {
- /** An exact size (or -1 if not specified) */
- long value() default -1;
- /** A minimum size, inclusive */
- long min() default Long.MIN_VALUE;
- /** A maximum size, inclusive */
- long max() default Long.MAX_VALUE;
- /** The size must be a multiple of this factor */
- long multiple() default 1;
-}
\ No newline at end of file
diff --git a/core/java/android/annotation/StringDef.java b/core/java/android/annotation/StringDef.java
deleted file mode 100644
index a37535b..0000000
--- a/core/java/android/annotation/StringDef.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated String element, represents a logical
- * type and that its value should be one of the explicitly named constants.
- * <p>
- * Example:
- * <pre><code>
- * @Retention(SOURCE)
- * @StringDef({
- * POWER_SERVICE,
- * WINDOW_SERVICE,
- * LAYOUT_INFLATER_SERVICE
- * })
- * public @interface ServiceName {}
- * public static final String POWER_SERVICE = "power";
- * public static final String WINDOW_SERVICE = "window";
- * public static final String LAYOUT_INFLATER_SERVICE = "layout_inflater";
- * ...
- * public abstract Object getSystemService(@ServiceName String name);
- * </code></pre>
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({ANNOTATION_TYPE})
-public @interface StringDef {
- /** Defines the constant prefix for this element */
- String[] prefix() default {};
- /** Defines the constant suffix for this element */
- String[] suffix() default {};
-
- /** Defines the allowed constants for this element */
- String[] value() default {};
-}
diff --git a/core/java/android/annotation/StringRes.java b/core/java/android/annotation/StringRes.java
deleted file mode 100644
index 190b68a..0000000
--- a/core/java/android/annotation/StringRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a String resource reference (e.g. {@link android.R.string#ok}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface StringRes {
-}
diff --git a/core/java/android/annotation/StyleRes.java b/core/java/android/annotation/StyleRes.java
deleted file mode 100644
index 4453b8d..0000000
--- a/core/java/android/annotation/StyleRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that a integer parameter, field or method return value is expected
- * to be a style resource reference (e.g. {@link android.R.style#TextAppearance}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface StyleRes {
-}
diff --git a/core/java/android/annotation/StyleableRes.java b/core/java/android/annotation/StyleableRes.java
deleted file mode 100644
index 3c1895e..0000000
--- a/core/java/android/annotation/StyleableRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that a integer parameter, field or method return value is expected
- * to be a styleable resource reference (e.g. {@link android.R.styleable#TextView_text}).
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface StyleableRes {
-}
diff --git a/core/java/android/annotation/SuppressAutoDoc.java b/core/java/android/annotation/SuppressAutoDoc.java
deleted file mode 100644
index e34e03b..0000000
--- a/core/java/android/annotation/SuppressAutoDoc.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that any automatically generated documentation should be suppressed
- * for the annotated method, parameter, or field.
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
-public @interface SuppressAutoDoc {
-}
diff --git a/core/java/android/annotation/SuppressLint.java b/core/java/android/annotation/SuppressLint.java
deleted file mode 100644
index 2d3456b..0000000
--- a/core/java/android/annotation/SuppressLint.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2012 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/** Indicates that Lint should ignore the specified warnings for the annotated element. */
-@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
-@Retention(RetentionPolicy.CLASS)
-public @interface SuppressLint {
- /**
- * The set of warnings (identified by the lint issue id) that should be
- * ignored by lint. It is not an error to specify an unrecognized name.
- */
- String[] value();
-}
diff --git a/core/java/android/annotation/SystemApi.java b/core/java/android/annotation/SystemApi.java
deleted file mode 100644
index a468439..0000000
--- a/core/java/android/annotation/SystemApi.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2014 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 android.annotation;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Indicates an API is exposed for use by bundled system applications.
- * <p>
- * These APIs are not guaranteed to remain consistent release-to-release,
- * and are not for use by apps linking against the Android SDK.
- * </p><p>
- * This annotation should only appear on API that is already marked <pre>@hide</pre>.
- * </p>
- *
- * @hide
- */
-@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface SystemApi {
- enum Client {
- /**
- * Specifies that the intended clients of a SystemApi are privileged apps.
- * This is the default value for {@link #client}.
- */
- PRIVILEGED_APPS,
-
- /**
- * Specifies that the intended clients of a SystemApi are used by classes in
- * <pre>BOOTCLASSPATH</pre> in mainline modules. Mainline modules can also expose
- * this type of system APIs too when they're used only by the non-updatable
- * platform code.
- */
- MODULE_LIBRARIES,
-
- /**
- * Specifies that the system API is available only in the system server process.
- * Use this to expose APIs from code loaded by the system server process <em>but</em>
- * not in <pre>BOOTCLASSPATH</pre>.
- */
- SYSTEM_SERVER
- }
-
- /**
- * The intended client of this SystemAPI.
- */
- Client client() default android.annotation.SystemApi.Client.PRIVILEGED_APPS;
-
- /**
- * Container for {@link SystemApi} that allows it to be applied repeatedly to types.
- */
- @Retention(RetentionPolicy.RUNTIME)
- @Target(TYPE)
- @interface Container {
- SystemApi[] value();
- }
-}
diff --git a/core/java/android/annotation/SystemService.java b/core/java/android/annotation/SystemService.java
deleted file mode 100644
index c05c1ba..0000000
--- a/core/java/android/annotation/SystemService.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2017 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 android.annotation;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Description of a system service available through
- * {@link android.content.Context#getSystemService(Class)}. This is used to auto-generate
- * documentation explaining how to obtain a reference to the service.
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target(TYPE)
-public @interface SystemService {
- /**
- * The string name of the system service that can be passed to
- * {@link android.content.Context#getSystemService(String)}.
- *
- * @see android.content.Context#getSystemServiceName(Class)
- */
- String value();
-}
diff --git a/core/java/android/annotation/TargetApi.java b/core/java/android/annotation/TargetApi.java
deleted file mode 100644
index 975318e..0000000
--- a/core/java/android/annotation/TargetApi.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2012 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/** Indicates that Lint should treat this type as targeting a given API level, no matter what the
- project target is. */
-@Target({TYPE, METHOD, CONSTRUCTOR, FIELD})
-@Retention(RetentionPolicy.CLASS)
-public @interface TargetApi {
- /**
- * This sets the target api level for the type..
- */
- int value();
-}
diff --git a/core/java/android/annotation/TestApi.java b/core/java/android/annotation/TestApi.java
deleted file mode 100644
index 0e9ed37..0000000
--- a/core/java/android/annotation/TestApi.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Indicates an API is exposed for use by CTS.
- * <p>
- * These APIs are not guaranteed to remain consistent release-to-release,
- * and are not for use by apps linking against the Android SDK.
- * </p>
- *
- * @hide
- */
-@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
-@Retention(RetentionPolicy.SOURCE)
-public @interface TestApi {
-}
diff --git a/core/java/android/annotation/TransitionRes.java b/core/java/android/annotation/TransitionRes.java
deleted file mode 100644
index 06bac74..0000000
--- a/core/java/android/annotation/TransitionRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be a transition resource reference.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface TransitionRes {
-}
diff --git a/core/java/android/annotation/UiThread.java b/core/java/android/annotation/UiThread.java
deleted file mode 100644
index 6d7eedc..0000000
--- a/core/java/android/annotation/UiThread.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import android.os.Looper;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the annotated method or constructor should only be called on the
- * UI thread. If the annotated element is a class, then all methods in the class
- * should be called on the UI thread.
- * <p>
- * Example:
- *
- * <pre>
- * <code>
- * @UiThread
- * public abstract void setText(@NonNull String text) { ... }
- * </code>
- * </pre>
- *
- * @memberDoc This method must be called on the thread that originally created
- * this UI element. This is typically the
- * {@linkplain Looper#getMainLooper() main thread} of your app.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD,CONSTRUCTOR,TYPE,PARAMETER})
-public @interface UiThread {
-}
diff --git a/core/java/android/annotation/UserHandleAware.java b/core/java/android/annotation/UserHandleAware.java
deleted file mode 100644
index 7d3d20b..0000000
--- a/core/java/android/annotation/UserHandleAware.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2019 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 android.annotation;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Indicates an API that uses {@code context.getUser} or {@code context.getUserId}
- * to operate across users (as the user associated with the context)
- * <p>
- * To create a {@link android.content.Context} associated with a different user,
- * use {@link android.content.Context#createContextAsUser} or
- * {@link android.content.Context#createPackageContextAsUser}
- * <p>
- * Example:
- * <pre>{@code
- * {@literal @}UserHandleAware
- * public abstract PackageInfo getPackageInfo({@literal @}NonNull String packageName,
- * {@literal @}PackageInfoFlags int flags) throws NameNotFoundException;
- * }</pre>
- *
- * @memberDoc This method uses {@linkplain android.content.Context#getUser}
- * or {@linkplain android.content.Context#getUserId} to execute across users.
- * @hide
- */
-@Retention(SOURCE)
-@Target({TYPE, METHOD, CONSTRUCTOR, PACKAGE})
-public @interface UserHandleAware {
-}
diff --git a/core/java/android/annotation/UserIdInt.java b/core/java/android/annotation/UserIdInt.java
deleted file mode 100644
index 7b9ce25..0000000
--- a/core/java/android/annotation/UserIdInt.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2016 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 android.annotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Denotes that the annotated element is a multi-user user ID. This is
- * <em>not</em> the same as a UID.
- *
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface UserIdInt {
-}
diff --git a/core/java/android/annotation/Widget.java b/core/java/android/annotation/Widget.java
deleted file mode 100644
index 6756cd7..0000000
--- a/core/java/android/annotation/Widget.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008 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 android.annotation;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Indicates a class is a widget usable by application developers to create UI.
- * <p>
- * This must be used in cases where:
- * <ul>
- * <li>The widget is not in the package <code>android.widget</code></li>
- * <li>The widget extends <code>android.view.ViewGroup</code></li>
- * </ul>
- * @hide
- */
-@Target({ ElementType.TYPE })
-@Retention(RetentionPolicy.SOURCE)
-public @interface Widget {
-}
diff --git a/core/java/android/annotation/WorkerThread.java b/core/java/android/annotation/WorkerThread.java
deleted file mode 100644
index 8c2a4d3..0000000
--- a/core/java/android/annotation/WorkerThread.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2015 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 android.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.CONSTRUCTOR;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that the annotated method should only be called on a worker thread.
- * If the annotated element is a class, then all methods in the class should be
- * called on a worker thread.
- * <p>
- * Example:
- *
- * <pre>
- * <code>
- * @WorkerThread
- * protected abstract FilterResults performFiltering(CharSequence constraint);
- * </code>
- * </pre>
- *
- * @memberDoc This method may take several seconds to complete, so it should
- * only be called from a worker thread.
- * @hide
- */
-@Retention(SOURCE)
-@Target({METHOD,CONSTRUCTOR,TYPE,PARAMETER})
-public @interface WorkerThread {
-}
diff --git a/core/java/android/annotation/XmlRes.java b/core/java/android/annotation/XmlRes.java
deleted file mode 100644
index 5fb8a4a..0000000
--- a/core/java/android/annotation/XmlRes.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-/**
- * Denotes that an integer parameter, field or method return value is expected
- * to be an XML resource reference.
- *
- * {@hide}
- */
-@Documented
-@Retention(SOURCE)
-@Target({METHOD, PARAMETER, FIELD})
-public @interface XmlRes {
-}
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 3802289..63221c5 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -3063,7 +3063,7 @@
* @param transport - whether the {@link OobData} is generated for LE or Classic.
* @param oobData - data generated in the host stack(LE) or controller (Classic)
*/
- void onOobData(@Transport int transport, @Nullable OobData oobData);
+ void onOobData(@Transport int transport, @NonNull OobData oobData);
/**
* Provides feedback when things don't go as expected.
@@ -3104,7 +3104,7 @@
*
* @hide
*/
- public void onOobData(@Transport int transport, OobData oobData) {
+ public void onOobData(@Transport int transport, @NonNull OobData oobData) {
mExecutor.execute(new Runnable() {
public void run() {
mCallback.onOobData(transport, oobData);
diff --git a/core/java/android/bluetooth/OobData.java b/core/java/android/bluetooth/OobData.java
index d6868e0..2dfa91d 100644
--- a/core/java/android/bluetooth/OobData.java
+++ b/core/java/android/bluetooth/OobData.java
@@ -25,7 +25,6 @@
import com.android.internal.util.Preconditions;
-import java.lang.IllegalArgumentException;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -165,68 +164,6 @@
public static final int LE_FLAG_SIMULTANEOUS_HOST = 0x04;
/**
- * Main creation method for creating a Classic version of {@link OobData}.
- *
- * <p>This object will allow the caller to call {@link ClassicBuilder#build()}
- * to build the data object or add any option information to the builder.
- *
- * @param confirmationHash byte array consisting of {@link OobData#CONFIRMATION_OCTETS} octets
- * of data. Data is derived from controller/host stack and is required for pairing OOB.
- * @param classicLength byte array representing the length of data from 8-65535 across 2
- * octets (0xXXXX).
- * @param deviceAddressWithType byte array representing the Bluetooth Address of the device
- * that owns the OOB data. (i.e. the originator) [6 octets]
- *
- * @return a Classic Builder instance with all the given data set or null.
- *
- * @throws IllegalArgumentException if any of the values fail to be set.
- * @throws NullPointerException if any argument is null.
- *
- * @hide
- */
- @NonNull
- @SystemApi
- public static ClassicBuilder createClassicBuilder(@NonNull byte[] confirmationHash,
- @NonNull byte[] classicLength, @NonNull byte[] deviceAddressWithType) {
- return new ClassicBuilder(confirmationHash, classicLength, deviceAddressWithType);
- }
-
- /**
- * Main creation method for creating a LE version of {@link OobData}.
- *
- * <p>This object will allow the caller to call {@link LeBuilder#build()}
- * to build the data object or add any option information to the builder.
- *
- * @param deviceAddressWithType the LE device address plus the address type (7 octets);
- * not null.
- * @param leDeviceRole whether the device supports Peripheral, Central,
- * Both including preference; not null. (1 octet)
- * @param confirmationHash Array consisting of {@link OobData#CONFIRMATION_OCTETS} octets
- * of data. Data is derived from controller/host stack and is
- * required for pairing OOB.
- *
- * <p>Possible LE Device Role Values:
- * 0x00 Only Peripheral supported
- * 0x01 Only Central supported
- * 0x02 Central & Peripheral supported; Peripheral Preferred
- * 0x03 Only peripheral supported; Central Preferred
- * 0x04 - 0xFF Reserved
- *
- * @return a LeBuilder instance with all the given data set or null.
- *
- * @throws IllegalArgumentException if any of the values fail to be set.
- * @throws NullPointerException if any argument is null.
- *
- * @hide
- */
- @NonNull
- @SystemApi
- public static LeBuilder createLeBuilder(@NonNull byte[] confirmationHash,
- @NonNull byte[] deviceAddressWithType, @LeRole int leDeviceRole) {
- return new LeBuilder(confirmationHash, deviceAddressWithType, leDeviceRole);
- }
-
- /**
* Builds an {@link OobData} object and validates that the required combination
* of values are present to create the LE specific OobData type.
*
@@ -342,16 +279,18 @@
private @LeFlag int mLeFlags = LE_FLAG_GENERAL_DISCOVERY_MODE; // Invalid default
/**
- * Constructing an OobData object for use with LE requires
- * a LE Device Address and LE Device Role as well as the Confirmation
- * and optionally, the Randomizer, however it is recommended to use.
+ * Main creation method for creating a LE version of {@link OobData}.
*
- * @param confirmationHash byte array consisting of {@link OobData#CONFIRMATION_OCTETS}
- * octets of data. Data is derived from controller/host stack and is required for
- * pairing OOB.
- * @param deviceAddressWithType 7 bytes containing the 6 byte address with the 1 byte
- * address type.
- * @param leDeviceRole indicating device's role and preferences (Central or Peripheral)
+ * <p>This object will allow the caller to call {@link LeBuilder#build()}
+ * to build the data object or add any option information to the builder.
+ *
+ * @param deviceAddressWithType the LE device address plus the address type (7 octets);
+ * not null.
+ * @param leDeviceRole whether the device supports Peripheral, Central,
+ * Both including preference; not null. (1 octet)
+ * @param confirmationHash Array consisting of {@link OobData#CONFIRMATION_OCTETS} octets
+ * of data. Data is derived from controller/host stack and is
+ * required for pairing OOB.
*
* <p>Possible Values:
* {@link LE_DEVICE_ROLE_PERIPHERAL_ONLY} Only Peripheral supported
@@ -361,11 +300,13 @@
* {@link LE_DEVICE_ROLE_BOTH_PREFER_CENTRAL} Only peripheral supported; Central Preferred
* 0x04 - 0xFF Reserved
*
- * @throws IllegalArgumentException if deviceAddressWithType is not
- * {@link LE_DEVICE_ADDRESS_OCTETS} octets
+ * @throws IllegalArgumentException if any of the values fail to be set.
* @throws NullPointerException if any argument is null.
+ *
+ * @hide
*/
- private LeBuilder(@NonNull byte[] confirmationHash, @NonNull byte[] deviceAddressWithType,
+ @SystemApi
+ public LeBuilder(@NonNull byte[] confirmationHash, @NonNull byte[] deviceAddressWithType,
@LeRole int leDeviceRole) {
Preconditions.checkNotNull(confirmationHash);
Preconditions.checkNotNull(deviceAddressWithType);
@@ -572,25 +513,26 @@
private byte[] mClassOfDevice = null;
/**
+ * Main creation method for creating a Classic version of {@link OobData}.
+ *
+ * <p>This object will allow the caller to call {@link ClassicBuilder#build()}
+ * to build the data object or add any option information to the builder.
+ *
* @param confirmationHash byte array consisting of {@link OobData#CONFIRMATION_OCTETS}
* octets of data. Data is derived from controller/host stack and is required for pairing
* OOB.
- * @param randomizerHash byte array consisting of {@link OobData#RANDOMIZER_OCTETS} octets
- * of data. Data is derived from controller/host stack and is required
- * for pairing OOB. Also, randomizerHash may be all 0s or null in which case
- * it becomes all 0s.
* @param classicLength byte array representing the length of data from 8-65535 across 2
- * octets (0xXXXX). Inclusive of this value in the length.
+ * octets (0xXXXX).
* @param deviceAddressWithType byte array representing the Bluetooth Address of the device
- * that owns the OOB data. (i.e. the originator) [7 octets] this includes the Address Type
- * as the last octet.
+ * that owns the OOB data. (i.e. the originator) [6 octets]
*
- * @throws IllegalArgumentException if any value is not the correct length
- * @throws NullPointerException if anything passed is null
+ * @throws IllegalArgumentException if any of the values fail to be set.
+ * @throws NullPointerException if any argument is null.
*
* @hide
*/
- private ClassicBuilder(@NonNull byte[] confirmationHash, @NonNull byte[] classicLength,
+ @SystemApi
+ public ClassicBuilder(@NonNull byte[] confirmationHash, @NonNull byte[] classicLength,
@NonNull byte[] deviceAddressWithType) {
Preconditions.checkNotNull(confirmationHash);
Preconditions.checkNotNull(classicLength);
diff --git a/core/java/android/database/sqlite/package.html b/core/java/android/database/sqlite/package.html
index 4d6ba28..6ececa2 100644
--- a/core/java/android/database/sqlite/package.html
+++ b/core/java/android/database/sqlite/package.html
@@ -20,6 +20,9 @@
<p>The version of SQLite depends on the version of Android. See the following table:
<table style="width:auto;">
<tr><th>Android API</th><th>SQLite Version</th></tr>
+ <tr><td>API 31</td><td>3.32</td></tr>
+ <tr><td>API 30</td><td>3.28</td></tr>
+ <tr><td>API 28</td><td>3.22</td></tr>
<tr><td>API 27</td><td>3.19</td></tr>
<tr><td>API 26</td><td>3.18</td></tr>
<tr><td>API 24</td><td>3.9</td></tr>
diff --git a/core/java/android/os/VintfObject.java b/core/java/android/os/VintfObject.java
index 7af8f71..bf0b655 100644
--- a/core/java/android/os/VintfObject.java
+++ b/core/java/android/os/VintfObject.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.NonNull;
import android.annotation.TestApi;
import android.util.Slog;
@@ -112,6 +113,15 @@
public static native String getSepolicyVersion();
/**
+ * @return the PLATFORM_SEPOLICY_VERSION build flag available in framework
+ * compatibility matrix.
+ *
+ * @hide
+ */
+ @TestApi
+ public static native @NonNull String getPlatformSepolicyVersion();
+
+ /**
* @return a list of VNDK snapshots supported by the framework, as
* specified in framework manifest. For example,
* [("27", ["libjpeg.so", "libbase.so"]),
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index a3a910a..d22f7e3 100644
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -5327,5 +5327,29 @@
* @hide
*/
public static final String COLUMN_RCS_CONFIG = "rcs_config";
+
+ /**
+ * TelephonyProvider column name for device to device sharing status.
+ *
+ * @hide
+ */
+ public static final String COLUMN_D2D_STATUS_SHARING = "d2d_sharing_status";
+
+ /**
+ * TelephonyProvider column name for VoIMS provisioning. Default is 0.
+ * <P>Type: INTEGER </P>
+ *
+ * @hide
+ */
+ public static final String COLUMN_VOIMS_OPT_IN_STATUS = "voims_opt_in_status";
+
+ /**
+ * TelephonyProvider column name for information selected contacts that allow device to
+ * device sharing.
+ *
+ * @hide
+ */
+ public static final String COLUMN_D2D_STATUS_SHARING_SELECTED_CONTACTS =
+ "d2d_sharing_contacts";
}
}
diff --git a/core/java/com/android/internal/annotations/GuardedBy.java b/core/java/com/android/internal/annotations/GuardedBy.java
deleted file mode 100644
index 0e63214..0000000
--- a/core/java/com/android/internal/annotations/GuardedBy.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2012 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.internal.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation type used to mark a method or field that can only be accessed when
- * holding the referenced locks.
- */
-@Target({ ElementType.FIELD, ElementType.METHOD })
-@Retention(RetentionPolicy.CLASS)
-public @interface GuardedBy {
- String[] value();
-}
diff --git a/core/java/com/android/internal/annotations/Immutable.java b/core/java/com/android/internal/annotations/Immutable.java
deleted file mode 100644
index b424275..0000000
--- a/core/java/com/android/internal/annotations/Immutable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2012 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.internal.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation type used to mark a class which is immutable.
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.CLASS)
-public @interface Immutable {
-}
diff --git a/core/java/com/android/internal/annotations/VisibleForNative.java b/core/java/com/android/internal/annotations/VisibleForNative.java
deleted file mode 100644
index e6a3fc6..0000000
--- a/core/java/com/android/internal/annotations/VisibleForNative.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2018 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.internal.annotations;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Denotes that the class, method or field has its visibility relaxed so
- * that native code can access it.
- */
-@Retention(RetentionPolicy.CLASS)
-public @interface VisibleForNative {
-}
diff --git a/core/java/com/android/internal/annotations/VisibleForTesting.java b/core/java/com/android/internal/annotations/VisibleForTesting.java
deleted file mode 100644
index 99512ac6..0000000
--- a/core/java/com/android/internal/annotations/VisibleForTesting.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2012 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.internal.annotations;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Denotes that the class, method or field has its visibility relaxed so
- * that unit tests can access it.
- * <p/>
- * The <code>visibility</code> argument can be used to specific what the original
- * visibility should have been if it had not been made public or package-private for testing.
- * The default is to consider the element private.
- */
-@Retention(RetentionPolicy.CLASS)
-public @interface VisibleForTesting {
- /**
- * Intended visibility if the element had not been made public or package-private for
- * testing.
- */
- enum Visibility {
- /** The element should be considered protected. */
- PROTECTED,
- /** The element should be considered package-private. */
- PACKAGE,
- /** The element should be considered private. */
- PRIVATE
- }
-
- /**
- * Intended visibility if the element had not been made public or package-private for testing.
- * If not specified, one should assume the element originally intended to be private.
- */
- Visibility visibility() default Visibility.PRIVATE;
-}
diff --git a/core/jni/android_media_AudioFormat.h b/core/jni/android_media_AudioFormat.h
index 5630a1e..0e6b587 100644
--- a/core/jni/android_media_AudioFormat.h
+++ b/core/jni/android_media_AudioFormat.h
@@ -45,6 +45,8 @@
#define ENCODING_MPEGH_BL_L4 24
#define ENCODING_MPEGH_LC_L3 25
#define ENCODING_MPEGH_LC_L4 26
+#define ENCODING_DTS_UHD 27
+#define ENCODING_DRA 28
#define ENCODING_INVALID 0
#define ENCODING_DEFAULT 1
@@ -110,6 +112,10 @@
return AUDIO_FORMAT_MPEGH_LC_L3;
case ENCODING_MPEGH_LC_L4:
return AUDIO_FORMAT_MPEGH_LC_L4;
+ case ENCODING_DTS_UHD:
+ return AUDIO_FORMAT_DTS_UHD;
+ case ENCODING_DRA:
+ return AUDIO_FORMAT_DRA;
default:
return AUDIO_FORMAT_INVALID;
}
@@ -179,6 +185,10 @@
return ENCODING_MPEGH_LC_L3;
case AUDIO_FORMAT_MPEGH_LC_L4:
return ENCODING_MPEGH_LC_L4;
+ case AUDIO_FORMAT_DTS_UHD:
+ return ENCODING_DTS_UHD;
+ case AUDIO_FORMAT_DRA:
+ return ENCODING_DRA;
case AUDIO_FORMAT_DEFAULT:
return ENCODING_DEFAULT;
default:
diff --git a/core/jni/android_os_VintfObject.cpp b/core/jni/android_os_VintfObject.cpp
index 4bd33a9..1baea2a 100644
--- a/core/jni/android_os_VintfObject.cpp
+++ b/core/jni/android_os_VintfObject.cpp
@@ -37,11 +37,13 @@
namespace android {
+using vintf::CompatibilityMatrix;
using vintf::HalManifest;
using vintf::Level;
using vintf::SchemaType;
using vintf::to_string;
using vintf::toXml;
+using vintf::Version;
using vintf::VintfObject;
using vintf::Vndk;
@@ -119,6 +121,28 @@
return env->NewStringUTF(cString.c_str());
}
+static jstring android_os_VintfObject_getPlatformSepolicyVersion(JNIEnv* env, jclass) {
+ std::shared_ptr<const CompatibilityMatrix> matrix =
+ VintfObject::GetFrameworkCompatibilityMatrix();
+ if (matrix == nullptr || matrix->type() != SchemaType::FRAMEWORK) {
+ jniThrowRuntimeException(env, "Cannot get framework compatibility matrix");
+ return nullptr;
+ }
+
+ auto versions = matrix->getSepolicyVersions();
+ if (versions.empty()) {
+ jniThrowRuntimeException(env,
+ "sepolicy_version in framework compatibility matrix is empty");
+ return nullptr;
+ }
+
+ Version latest;
+ for (const auto& range : versions) {
+ latest = std::max(latest, range.maxVer());
+ }
+ return env->NewStringUTF(to_string(latest).c_str());
+}
+
static jobject android_os_VintfObject_getVndkSnapshots(JNIEnv* env, jclass) {
std::shared_ptr<const HalManifest> manifest = VintfObject::GetFrameworkHalManifest();
if (manifest == nullptr || manifest->type() != SchemaType::FRAMEWORK) {
@@ -145,12 +169,17 @@
// ----------------------------------------------------------------------------
static const JNINativeMethod gVintfObjectMethods[] = {
- {"report", "()[Ljava/lang/String;", (void*)android_os_VintfObject_report},
- {"verifyWithoutAvb", "()I", (void*)android_os_VintfObject_verifyWithoutAvb},
- {"getHalNamesAndVersions", "()[Ljava/lang/String;", (void*)android_os_VintfObject_getHalNamesAndVersions},
- {"getSepolicyVersion", "()Ljava/lang/String;", (void*)android_os_VintfObject_getSepolicyVersion},
- {"getVndkSnapshots", "()Ljava/util/Map;", (void*)android_os_VintfObject_getVndkSnapshots},
- {"getTargetFrameworkCompatibilityMatrixVersion", "()Ljava/lang/Long;", (void*)android_os_VintfObject_getTargetFrameworkCompatibilityMatrixVersion},
+ {"report", "()[Ljava/lang/String;", (void*)android_os_VintfObject_report},
+ {"verifyWithoutAvb", "()I", (void*)android_os_VintfObject_verifyWithoutAvb},
+ {"getHalNamesAndVersions", "()[Ljava/lang/String;",
+ (void*)android_os_VintfObject_getHalNamesAndVersions},
+ {"getSepolicyVersion", "()Ljava/lang/String;",
+ (void*)android_os_VintfObject_getSepolicyVersion},
+ {"getPlatformSepolicyVersion", "()Ljava/lang/String;",
+ (void*)android_os_VintfObject_getPlatformSepolicyVersion},
+ {"getVndkSnapshots", "()Ljava/util/Map;", (void*)android_os_VintfObject_getVndkSnapshots},
+ {"getTargetFrameworkCompatibilityMatrixVersion", "()Ljava/lang/Long;",
+ (void*)android_os_VintfObject_getTargetFrameworkCompatibilityMatrixVersion},
};
const char* const kVintfObjectPathName = "android/os/VintfObject";
diff --git a/libs/androidfw/PosixUtils.cpp b/libs/androidfw/PosixUtils.cpp
index f1ab149..4ec525a 100644
--- a/libs/androidfw/PosixUtils.cpp
+++ b/libs/androidfw/PosixUtils.cpp
@@ -72,7 +72,8 @@
argv0[i] = argv[i].c_str();
}
argv0[argv.size()] = nullptr;
- switch (fork()) {
+ int pid = fork();
+ switch (pid) {
case -1: // error
free(argv0);
PLOG(ERROR) << "fork";
@@ -104,8 +105,10 @@
close(stdout[1]);
close(stderr[1]);
int status;
- wait(&status);
+ waitpid(pid, &status, 0);
if (!WIFEXITED(status)) {
+ close(stdout[0]);
+ close(stderr[0]);
return nullptr;
}
std::unique_ptr<ProcResult> result(new ProcResult());
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index c77f418..bd2524f 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -324,6 +324,10 @@
public static final int ENCODING_MPEGH_LC_L3 = 25;
/** Audio data format: MPEG-H low complexity profile, level 4 */
public static final int ENCODING_MPEGH_LC_L4 = 26;
+ /** Audio data format: DTS UHD compressed */
+ public static final int ENCODING_DTS_UHD = 27;
+ /** Audio data format: DRA compressed */
+ public static final int ENCODING_DRA = 28;
/** @hide */
public static String toLogFriendlyEncoding(int enc) {
@@ -380,6 +384,10 @@
return "ENCODING_MPEGH_LC_L3";
case ENCODING_MPEGH_LC_L4:
return "ENCODING_MPEGH_LC_L4";
+ case ENCODING_DTS_UHD:
+ return "ENCODING_DTS_UHD";
+ case ENCODING_DRA:
+ return "ENCODING_DRA";
default :
return "invalid encoding " + enc;
}
@@ -659,6 +667,8 @@
case ENCODING_MPEGH_BL_L4:
case ENCODING_MPEGH_LC_L3:
case ENCODING_MPEGH_LC_L4:
+ case ENCODING_DTS_UHD:
+ case ENCODING_DRA:
return true;
default:
return false;
@@ -694,6 +704,8 @@
case ENCODING_MPEGH_BL_L4:
case ENCODING_MPEGH_LC_L3:
case ENCODING_MPEGH_LC_L4:
+ case ENCODING_DTS_UHD:
+ case ENCODING_DRA:
return true;
default:
return false;
@@ -732,6 +744,8 @@
case ENCODING_MPEGH_BL_L4:
case ENCODING_MPEGH_LC_L3:
case ENCODING_MPEGH_LC_L4:
+ case ENCODING_DTS_UHD:
+ case ENCODING_DRA:
return false;
case ENCODING_INVALID:
default:
@@ -770,6 +784,8 @@
case ENCODING_MPEGH_BL_L4:
case ENCODING_MPEGH_LC_L3:
case ENCODING_MPEGH_LC_L4:
+ case ENCODING_DTS_UHD:
+ case ENCODING_DRA:
return false;
case ENCODING_INVALID:
default:
@@ -1056,6 +1072,8 @@
case ENCODING_MPEGH_BL_L4:
case ENCODING_MPEGH_LC_L3:
case ENCODING_MPEGH_LC_L4:
+ case ENCODING_DTS_UHD:
+ case ENCODING_DRA:
mEncoding = encoding;
break;
case ENCODING_INVALID:
@@ -1282,7 +1300,9 @@
ENCODING_MPEGH_BL_L3,
ENCODING_MPEGH_BL_L4,
ENCODING_MPEGH_LC_L3,
- ENCODING_MPEGH_LC_L4 }
+ ENCODING_MPEGH_LC_L4,
+ ENCODING_DTS_UHD,
+ ENCODING_DRA }
)
@Retention(RetentionPolicy.SOURCE)
public @interface Encoding {}
@@ -1302,6 +1322,8 @@
ENCODING_MPEGH_BL_L4,
ENCODING_MPEGH_LC_L3,
ENCODING_MPEGH_LC_L4,
+ ENCODING_DTS_UHD,
+ ENCODING_DRA
};
/** @hide */
@@ -1318,7 +1340,9 @@
ENCODING_MPEGH_BL_L3,
ENCODING_MPEGH_BL_L4,
ENCODING_MPEGH_LC_L3,
- ENCODING_MPEGH_LC_L4 }
+ ENCODING_MPEGH_LC_L4,
+ ENCODING_DTS_UHD,
+ ENCODING_DRA }
)
@Retention(RetentionPolicy.SOURCE)
public @interface SurroundSoundEncoding {}
@@ -1360,6 +1384,10 @@
return "MPEG-H 3D Audio low complexity profile level 3";
case ENCODING_MPEGH_LC_L4:
return "MPEG-H 3D Audio low complexity profile level 4";
+ case ENCODING_DTS_UHD:
+ return "DTS UHD";
+ case ENCODING_DRA:
+ return "DRA";
default:
return "Unknown surround sound format";
}
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index 18c8a72..8425185 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -424,6 +424,10 @@
return "AUDIO_FORMAT_MAT_2_0"; // (MAT | MAT_SUB_2_0)
case /* AUDIO_FORMAT_MAT_2_1 */ 0x24000003:
return "AUDIO_FORMAT_MAT_2_1"; // (MAT | MAT_SUB_2_1)
+ case /* AUDIO_FORMAT_DTS_UHD */ 0x2E000000:
+ return "AUDIO_FORMAT_DTS_UHD";
+ case /* AUDIO_FORMAT_DRA */ 0x2F000000:
+ return "AUDIO_FORMAT_DRA";
default:
return "AUDIO_FORMAT_(" + audioFormat + ")";
}
diff --git a/mime/java/android/content/type/DefaultMimeMapFactory.java b/mime/java/android/content/type/DefaultMimeMapFactory.java
index 11d20d4..bcd0eb0 100644
--- a/mime/java/android/content/type/DefaultMimeMapFactory.java
+++ b/mime/java/android/content/type/DefaultMimeMapFactory.java
@@ -96,7 +96,7 @@
specs.add(spec);
startIdx = endIdx + 1; // skip over the space
} while (startIdx < line.length());
- builder.put(specs.get(0), specs.subList(1, specs.size()));
+ builder.addMimeMapping(specs.get(0), specs.subList(1, specs.size()));
}
} catch (IOException | RuntimeException e) {
throw new RuntimeException("Failed to parse " + resourceName, e);
diff --git a/packages/Connectivity/framework/src/android/net/ConnectivityManager.java b/packages/Connectivity/framework/src/android/net/ConnectivityManager.java
index 3e2fbea..19764dd 100644
--- a/packages/Connectivity/framework/src/android/net/ConnectivityManager.java
+++ b/packages/Connectivity/framework/src/android/net/ConnectivityManager.java
@@ -1561,7 +1561,7 @@
/**
* Get the {@link NetworkCapabilities} for the given {@link Network}. This
- * will return {@code null} if the network is unknown.
+ * will return {@code null} if the network is unknown or if the |network| argument is null.
*
* This will remove any location sensitive data in {@link TransportInfo} embedded in
* {@link NetworkCapabilities#getTransportInfo()}. Some transport info instances like
diff --git a/services/core/java/com/android/server/biometrics/OWNERS b/services/core/java/com/android/server/biometrics/OWNERS
index 8765c9a..4eac972 100644
--- a/services/core/java/com/android/server/biometrics/OWNERS
+++ b/services/core/java/com/android/server/biometrics/OWNERS
@@ -5,3 +5,4 @@
curtislb@google.com
ilyamaty@google.com
joshmccloskey@google.com
+jbolinger@google.com
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java
index afaae8a..0677bd5 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java
@@ -806,7 +806,6 @@
Arrays.stream(device.getEncodings()).mapToObj(
AudioFormat::toLogFriendlyEncoding
).collect(Collectors.joining(", ")));
- // TODO(b/80297701) use the actual device type that system audio mode is connected to.
if (device.getType() == AudioDeviceInfo.TYPE_HDMI_ARC) {
return device;
}
@@ -1225,7 +1224,6 @@
if (isSystemAudioActivated() && port < 0) {
// If system audio mode is on and the new active source is not under the current device,
// Will switch to ARC input.
- // TODO(b/115637145): handle system aduio without ARC
routeToInputFromPortId(Constants.CEC_SWITCH_ARC);
} else if (mIsSwitchDevice && port >= 0) {
// If current device is a switch and the new active source is under it,
@@ -1326,7 +1324,6 @@
// Handle the system audio(ARC) part of the logic on receiving routing change or information.
private void handleRoutingChangeAndInformationForSystemAudio() {
- // TODO(b/115637145): handle system aduio without ARC
routeToInputFromPortId(Constants.CEC_SWITCH_ARC);
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java
index 3f949ba..ec41a2f 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java
@@ -475,7 +475,6 @@
* @return newly created {@link HdmiCecMessage}
*/
static HdmiCecMessage buildReportShortAudioDescriptor(int src, int des, byte[] sadBytes) {
- // TODO(b/80297701) validate.
return buildCommand(src, des, Constants.MESSAGE_REPORT_SHORT_AUDIO_DESCRIPTOR, sadBytes);
}
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioInitiationActionFromAvr.java b/services/core/java/com/android/server/hdmi/SystemAudioInitiationActionFromAvr.java
index 0907e5d..0864a44 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioInitiationActionFromAvr.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioInitiationActionFromAvr.java
@@ -142,8 +142,4 @@
}
});
}
-
- private void switchToRelevantInputForDeviceAt(int physicalAddress) {
- // TODO(shubang): implement this method
- }
}
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index ea1c68d..07ac14f 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsService.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java
@@ -29,6 +29,8 @@
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PATTERN;
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PIN;
import static com.android.internal.widget.LockPatternUtils.EscrowTokenStateChangeCallback;
+import static com.android.internal.widget.LockPatternUtils.PROFILE_KEY_NAME_DECRYPT;
+import static com.android.internal.widget.LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT;
import static com.android.internal.widget.LockPatternUtils.SYNTHETIC_PASSWORD_HANDLE_KEY;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE;
@@ -99,6 +101,7 @@
import android.security.keystore.recovery.KeyChainSnapshot;
import android.security.keystore.recovery.RecoveryCertPath;
import android.security.keystore.recovery.WrappedApplicationKey;
+import android.security.keystore2.AndroidKeyStoreLoadStoreParameter;
import android.security.keystore2.AndroidKeyStoreProvider;
import android.service.gatekeeper.GateKeeperResponse;
import android.service.gatekeeper.IGateKeeperService;
@@ -153,6 +156,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
+import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
@@ -225,6 +229,7 @@
private final SyntheticPasswordManager mSpManager;
private final KeyStore mKeyStore;
+ private final java.security.KeyStore mJavaKeyStore;
private final RecoverableKeyStoreManager mRecoverableKeyStoreManager;
private ManagedProfilePasswordCache mManagedProfilePasswordCache;
@@ -543,16 +548,22 @@
return Settings.Secure.getIntForUser(contentResolver, keyName, defaultValue, userId);
}
- public @NonNull ManagedProfilePasswordCache getManagedProfilePasswordCache() {
+ public java.security.KeyStore getJavaKeyStore() {
try {
java.security.KeyStore ks = java.security.KeyStore.getInstance(
SyntheticPasswordCrypto.androidKeystoreProviderName());
- ks.load(null);
- return new ManagedProfilePasswordCache(ks, getUserManager());
+ ks.load(new AndroidKeyStoreLoadStoreParameter(
+ SyntheticPasswordCrypto.keyNamespace()));
+ return ks;
} catch (Exception e) {
throw new IllegalStateException("Cannot load keystore", e);
}
}
+
+ public @NonNull ManagedProfilePasswordCache getManagedProfilePasswordCache(
+ java.security.KeyStore ks) {
+ return new ManagedProfilePasswordCache(ks, getUserManager());
+ }
}
public LockSettingsService(Context context) {
@@ -564,6 +575,7 @@
mInjector = injector;
mContext = injector.getContext();
mKeyStore = injector.getKeyStore();
+ mJavaKeyStore = injector.getJavaKeyStore();
mRecoverableKeyStoreManager = injector.getRecoverableKeyStoreManager();
mHandler = injector.getHandler(injector.getServiceThread());
mStrongAuth = injector.getStrongAuth();
@@ -586,7 +598,7 @@
mStrongAuthTracker.register(mStrongAuth);
mSpManager = injector.getSyntheticPasswordManager(mStorage);
- mManagedProfilePasswordCache = injector.getManagedProfilePasswordCache();
+ mManagedProfilePasswordCache = injector.getManagedProfilePasswordCache(mJavaKeyStore);
mRebootEscrowManager = injector.getRebootEscrowManager(new RebootEscrowCallbacks(),
mStorage);
@@ -959,6 +971,21 @@
setString("migrated_wear_lockscreen_disabled", "true", 0);
Slog.i(TAG, "Migrated lockscreen_disabled for Wear devices");
}
+
+ if (getString("migrated_keystore_namespace", null, 0) == null) {
+ boolean success = true;
+ synchronized (mSpManager) {
+ success &= mSpManager.migrateKeyNamespace();
+ }
+ success &= migrateProfileLockKeys();
+ if (success) {
+ setString("migrated_keystore_namespace", "true", 0);
+ Slog.i(TAG, "Migrated keys to LSS namespace");
+ } else {
+ Slog.w(TAG, "Failed to migrate keys to LSS namespace");
+ }
+ }
+
}
private void migrateOldDataAfterSystemReady() {
@@ -999,6 +1026,22 @@
}
}
+ private boolean migrateProfileLockKeys() {
+ boolean success = true;
+ final List<UserInfo> users = mUserManager.getUsers();
+ final int userCount = users.size();
+ for (int i = 0; i < userCount; i++) {
+ UserInfo user = users.get(i);
+ if (user.isManagedProfile() && !getSeparateProfileChallengeEnabledInternal(user.id)) {
+ success &= SyntheticPasswordCrypto.migrateLockSettingsKey(
+ PROFILE_KEY_NAME_ENCRYPT + user.id);
+ success &= SyntheticPasswordCrypto.migrateLockSettingsKey(
+ PROFILE_KEY_NAME_DECRYPT + user.id);
+ }
+ }
+ return success;
+ }
+
/**
* Returns the lowest password quality that still presents the same UI for entering it.
*
@@ -1284,11 +1327,8 @@
byte[] encryptedPassword = Arrays.copyOfRange(storedData, PROFILE_KEY_IV_SIZE,
storedData.length);
byte[] decryptionResult;
- java.security.KeyStore keyStore = java.security.KeyStore.getInstance(
- SyntheticPasswordCrypto.androidKeystoreProviderName());
- keyStore.load(null);
- SecretKey decryptionKey = (SecretKey) keyStore.getKey(
- LockPatternUtils.PROFILE_KEY_NAME_DECRYPT + userId, null);
+ SecretKey decryptionKey = (SecretKey) mJavaKeyStore.getKey(
+ PROFILE_KEY_NAME_DECRYPT + userId, null);
Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/"
+ KeyProperties.BLOCK_MODE_GCM + "/" + KeyProperties.ENCRYPTION_PADDING_NONE);
@@ -1744,30 +1784,26 @@
KeyGenerator keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES);
keyGenerator.init(new SecureRandom());
SecretKey secretKey = keyGenerator.generateKey();
- java.security.KeyStore keyStore = java.security.KeyStore.getInstance(
- SyntheticPasswordCrypto.androidKeystoreProviderName());
- keyStore.load(null);
try {
- keyStore.setEntry(
- LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT + userId,
+ mJavaKeyStore.setEntry(
+ PROFILE_KEY_NAME_ENCRYPT + userId,
new java.security.KeyStore.SecretKeyEntry(secretKey),
new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT)
.setBlockModes(KeyProperties.BLOCK_MODE_GCM)
.setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
.build());
- keyStore.setEntry(
- LockPatternUtils.PROFILE_KEY_NAME_DECRYPT + userId,
+ mJavaKeyStore.setEntry(
+ PROFILE_KEY_NAME_DECRYPT + userId,
new java.security.KeyStore.SecretKeyEntry(secretKey),
new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT)
.setBlockModes(KeyProperties.BLOCK_MODE_GCM)
.setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
.setUserAuthenticationRequired(true)
.setUserAuthenticationValidityDurationSeconds(30)
- .setCriticalToDeviceEncryption(true)
.build());
// Key imported, obtain a reference to it.
- SecretKey keyStoreEncryptionKey = (SecretKey) keyStore.getKey(
- LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT + userId, null);
+ SecretKey keyStoreEncryptionKey = (SecretKey) mJavaKeyStore.getKey(
+ PROFILE_KEY_NAME_ENCRYPT + userId, null);
Cipher cipher = Cipher.getInstance(
KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_GCM + "/"
+ KeyProperties.ENCRYPTION_PADDING_NONE);
@@ -1776,10 +1812,10 @@
iv = cipher.getIV();
} finally {
// The original key can now be discarded.
- keyStore.deleteEntry(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT + userId);
+ mJavaKeyStore.deleteEntry(PROFILE_KEY_NAME_ENCRYPT + userId);
}
- } catch (CertificateException | UnrecoverableKeyException
- | IOException | BadPaddingException | IllegalBlockSizeException | KeyStoreException
+ } catch (UnrecoverableKeyException
+ | BadPaddingException | IllegalBlockSizeException | KeyStoreException
| NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException e) {
throw new IllegalStateException("Failed to encrypt key", e);
}
@@ -2300,13 +2336,9 @@
private void removeKeystoreProfileKey(int targetUserId) {
Slog.i(TAG, "Remove keystore profile key for user: " + targetUserId);
try {
- java.security.KeyStore keyStore = java.security.KeyStore.getInstance(
- SyntheticPasswordCrypto.androidKeystoreProviderName());
- keyStore.load(null);
- keyStore.deleteEntry(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT + targetUserId);
- keyStore.deleteEntry(LockPatternUtils.PROFILE_KEY_NAME_DECRYPT + targetUserId);
- } catch (KeyStoreException | NoSuchAlgorithmException | CertificateException
- | IOException e) {
+ mJavaKeyStore.deleteEntry(PROFILE_KEY_NAME_ENCRYPT + targetUserId);
+ mJavaKeyStore.deleteEntry(PROFILE_KEY_NAME_DECRYPT + targetUserId);
+ } catch (KeyStoreException e) {
// We have tried our best to remove all keys
Slog.e(TAG, "Unable to remove keystore profile key for user:" + targetUserId, e);
}
@@ -3257,6 +3289,12 @@
pw.println();
pw.decreaseIndent();
+ pw.println("Keys in namespace:");
+ pw.increaseIndent();
+ dumpKeystoreKeys(pw);
+ pw.println();
+ pw.decreaseIndent();
+
pw.println("Storage:");
pw.increaseIndent();
mStorage.dump(pw);
@@ -3276,6 +3314,18 @@
pw.decreaseIndent();
}
+ private void dumpKeystoreKeys(IndentingPrintWriter pw) {
+ try {
+ final Enumeration<String> aliases = mJavaKeyStore.aliases();
+ while (aliases.hasMoreElements()) {
+ pw.println(aliases.nextElement());
+ }
+ } catch (KeyStoreException e) {
+ pw.println("Unable to get keys: " + e.toString());
+ Slog.d(TAG, "Dump error", e);
+ }
+ }
+
/**
* Cryptographically disable escrow token support for the current user, if the user is not
* managed (either user has a profile owner, or if device is managed). Do not disable
diff --git a/services/core/java/com/android/server/locksettings/ManagedProfilePasswordCache.java b/services/core/java/com/android/server/locksettings/ManagedProfilePasswordCache.java
index fa477c8..672c3f7 100644
--- a/services/core/java/com/android/server/locksettings/ManagedProfilePasswordCache.java
+++ b/services/core/java/com/android/server/locksettings/ManagedProfilePasswordCache.java
@@ -23,7 +23,6 @@
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
import android.security.keystore.UserNotAuthenticatedException;
-import android.security.keystore2.AndroidKeyStoreSpi;
import android.util.Slog;
import android.util.SparseArray;
@@ -95,11 +94,12 @@
SecretKey key;
try {
generator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES,
- AndroidKeyStoreSpi.NAME);
+ mKeyStore.getProvider());
generator.init(new KeyGenParameterSpec.Builder(
keyName, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT)
.setKeySize(KEY_LENGTH)
.setBlockModes(KeyProperties.BLOCK_MODE_GCM)
+ .setNamespace(SyntheticPasswordCrypto.keyNamespace())
.setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
// Generate auth-bound key to user 0 (since we the caller is user 0)
.setUserAuthenticationRequired(true)
diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java
index 35e6489..3386408 100644
--- a/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java
+++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java
@@ -16,8 +16,12 @@
package com.android.server.locksettings;
+import android.security.AndroidKeyStoreMaintenance;
import android.security.keystore.KeyProperties;
import android.security.keystore.KeyProtection;
+import android.security.keystore2.AndroidKeyStoreLoadStoreParameter;
+import android.system.keystore2.Domain;
+import android.system.keystore2.KeyDescriptor;
import android.util.Slog;
import java.io.ByteArrayOutputStream;
@@ -125,9 +129,7 @@
public static byte[] decryptBlobV1(String keyAlias, byte[] blob, byte[] applicationId) {
try {
- KeyStore keyStore = KeyStore.getInstance(androidKeystoreProviderName());
- keyStore.load(null);
-
+ KeyStore keyStore = getKeyStore();
SecretKey decryptionKey = (SecretKey) keyStore.getKey(keyAlias, null);
if (decryptionKey == null) {
throw new IllegalStateException("SP key is missing: " + keyAlias);
@@ -144,10 +146,20 @@
return "AndroidKeyStore";
}
+ static int keyNamespace() {
+ return KeyProperties.NAMESPACE_LOCKSETTINGS;
+ }
+
+ private static KeyStore getKeyStore()
+ throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException {
+ KeyStore keyStore = KeyStore.getInstance(androidKeystoreProviderName());
+ keyStore.load(new AndroidKeyStoreLoadStoreParameter(keyNamespace()));
+ return keyStore;
+ }
+
public static byte[] decryptBlob(String keyAlias, byte[] blob, byte[] applicationId) {
try {
- KeyStore keyStore = KeyStore.getInstance(androidKeystoreProviderName());
- keyStore.load(null);
+ final KeyStore keyStore = getKeyStore();
SecretKey decryptionKey = (SecretKey) keyStore.getKey(keyAlias, null);
if (decryptionKey == null) {
@@ -170,8 +182,7 @@
KeyGenerator keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES);
keyGenerator.init(AES_KEY_LENGTH * 8, new SecureRandom());
SecretKey secretKey = keyGenerator.generateKey();
- KeyStore keyStore = KeyStore.getInstance(androidKeystoreProviderName());
- keyStore.load(null);
+ final KeyStore keyStore = getKeyStore();
KeyProtection.Builder builder = new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT)
.setBlockModes(KeyProperties.BLOCK_MODE_GCM)
.setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
@@ -200,8 +211,7 @@
public static void destroyBlobKey(String keyAlias) {
KeyStore keyStore;
try {
- keyStore = KeyStore.getInstance(androidKeystoreProviderName());
- keyStore.load(null);
+ keyStore = getKeyStore();
keyStore.deleteEntry(keyAlias);
Slog.i(TAG, "SP key deleted: " + keyAlias);
} catch (KeyStoreException | NoSuchAlgorithmException | CertificateException
@@ -229,4 +239,32 @@
throw new IllegalStateException("NoSuchAlgorithmException for SHA-512", e);
}
}
+
+ static boolean migrateLockSettingsKey(String alias) {
+ final KeyDescriptor legacyKey = new KeyDescriptor();
+ legacyKey.domain = Domain.APP;
+ legacyKey.nspace = KeyProperties.NAMESPACE_APPLICATION;
+ legacyKey.alias = alias;
+
+ final KeyDescriptor newKey = new KeyDescriptor();
+ newKey.domain = Domain.SELINUX;
+ newKey.nspace = SyntheticPasswordCrypto.keyNamespace();
+ newKey.alias = alias;
+ Slog.i(TAG, "Migrating key " + alias);
+ int err = AndroidKeyStoreMaintenance.migrateKeyNamespace(legacyKey, newKey);
+ if (err == 0) {
+ return true;
+ } else if (err == AndroidKeyStoreMaintenance.KEY_NOT_FOUND) {
+ Slog.i(TAG, "Key does not exist");
+ // Treat this as a success so we don't migrate again.
+ return true;
+ } else if (err == AndroidKeyStoreMaintenance.INVALID_ARGUMENT) {
+ Slog.i(TAG, "Key already exists");
+ // Treat this as a success so we don't migrate again.
+ return true;
+ } else {
+ Slog.e(TAG, String.format("Failed to migrate key: %d", err));
+ return false;
+ }
+ }
}
diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
index 6b5295f..0c182a0 100644
--- a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
+++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
@@ -519,7 +519,7 @@
public void removeUser(int userId) {
for (long handle : mStorage.listSyntheticPasswordHandlesForUser(SP_BLOB_NAME, userId)) {
destroyWeaverSlot(handle, userId);
- destroySPBlobKey(getHandleName(handle));
+ destroySPBlobKey(getKeyName(handle));
}
}
@@ -955,7 +955,7 @@
} else {
secret = authToken.getSyntheticPassword();
}
- byte[] content = createSPBlob(getHandleName(handle), secret, applicationId, sid);
+ byte[] content = createSPBlob(getKeyName(handle), secret, applicationId, sid);
byte[] blob = new byte[content.length + 1 + 1];
/*
* We can upgrade from v1 to v2 because that's just a change in the way that
@@ -1137,10 +1137,10 @@
}
final byte[] secret;
if (version == SYNTHETIC_PASSWORD_VERSION_V1) {
- secret = SyntheticPasswordCrypto.decryptBlobV1(getHandleName(handle),
+ secret = SyntheticPasswordCrypto.decryptBlobV1(getKeyName(handle),
Arrays.copyOfRange(blob, 2, blob.length), applicationId);
} else {
- secret = decryptSPBlob(getHandleName(handle),
+ secret = decryptSPBlob(getKeyName(handle),
Arrays.copyOfRange(blob, 2, blob.length), applicationId);
}
if (secret == null) {
@@ -1235,7 +1235,7 @@
private void destroySyntheticPassword(long handle, int userId) {
destroyState(SP_BLOB_NAME, handle, userId);
- destroySPBlobKey(getHandleName(handle));
+ destroySPBlobKey(getKeyName(handle));
if (hasState(WEAVER_SLOT_NAME, handle, userId)) {
destroyWeaverSlot(handle, userId);
}
@@ -1351,7 +1351,7 @@
}
}
- private String getHandleName(long handle) {
+ private String getKeyName(long handle) {
return String.format("%s%x", LockPatternUtils.SYNTHETIC_PASSWORD_KEY_PREFIX, handle);
}
@@ -1412,4 +1412,19 @@
}
return hexBytes;
}
+
+ /**
+ * Migrate all existing SP keystore keys from uid 1000 app domain to LSS selinux domain
+ */
+ public boolean migrateKeyNamespace() {
+ boolean success = true;
+ final Map<Integer, List<Long>> allHandles =
+ mStorage.listSyntheticPasswordHandlesForAllUsers(SP_BLOB_NAME);
+ for (List<Long> userHandles : allHandles.values()) {
+ for (long handle : userHandles) {
+ success &= SyntheticPasswordCrypto.migrateLockSettingsKey(getKeyName(handle));
+ }
+ }
+ return success;
+ }
}
diff --git a/services/core/java/com/android/server/pm/ApexManager.java b/services/core/java/com/android/server/pm/ApexManager.java
index c6a55b4..cb0af11 100644
--- a/services/core/java/com/android/server/pm/ApexManager.java
+++ b/services/core/java/com/android/server/pm/ApexManager.java
@@ -25,6 +25,7 @@
import android.apex.ApexInfoList;
import android.apex.ApexSessionInfo;
import android.apex.ApexSessionParams;
+import android.apex.CompressedApexInfoList;
import android.apex.IApexService;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
@@ -357,6 +358,21 @@
public abstract void markBootCompleted();
/**
+ * Estimate how much storage space is needed on /data/ for decompressing apexes
+ * @param infoList List of apexes that are compressed in target build.
+ * @return Size, in bytes, the amount of space needed on /data/
+ */
+ public abstract long calculateSizeForCompressedApex(CompressedApexInfoList infoList)
+ throws RemoteException;
+
+ /**
+ * Reserve space on /data so that apexes can be decompressed after OTA
+ * @param infoList List of apexes that are compressed in target build.
+ */
+ public abstract void reserveSpaceForCompressedApex(CompressedApexInfoList infoList)
+ throws RemoteException;
+
+ /**
* Dumps various state information to the provided {@link PrintWriter} object.
*
* @param pw the {@link PrintWriter} object to send information to.
@@ -898,6 +914,18 @@
}
}
+ @Override
+ public long calculateSizeForCompressedApex(CompressedApexInfoList infoList)
+ throws RemoteException {
+ return waitForApexService().calculateSizeForCompressedApex(infoList);
+ }
+
+ @Override
+ public void reserveSpaceForCompressedApex(CompressedApexInfoList infoList)
+ throws RemoteException {
+ waitForApexService().reserveSpaceForCompressedApex(infoList);
+ }
+
/**
* Dump information about the packages contained in a particular cache
* @param packagesCache the cache to print information about.
@@ -1150,6 +1178,16 @@
}
@Override
+ public long calculateSizeForCompressedApex(CompressedApexInfoList infoList) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void reserveSpaceForCompressedApex(CompressedApexInfoList infoList) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
void dump(PrintWriter pw, String packageName) {
// No-op
}
diff --git a/services/core/java/com/android/server/telecom/TelecomLoaderService.java b/services/core/java/com/android/server/telecom/TelecomLoaderService.java
index 52ad893..8236836 100644
--- a/services/core/java/com/android/server/telecom/TelecomLoaderService.java
+++ b/services/core/java/com/android/server/telecom/TelecomLoaderService.java
@@ -31,6 +31,7 @@
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.telephony.CarrierConfigManager;
+import android.telephony.SubscriptionManager;
import android.util.IntArray;
import android.util.Slog;
@@ -44,6 +45,9 @@
import com.android.server.pm.UserManagerService;
import com.android.server.pm.permission.PermissionManagerServiceInternal;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* Starts the telecom component by binding to its ITelecomService implementation. Telecom is setup
* to run in the system-server process so once it is loaded into memory it will stay running.
@@ -208,13 +212,23 @@
return null;
}
}
+ SubscriptionManager subscriptionManager =
+ mContext.getSystemService(SubscriptionManager.class);
+ if (subscriptionManager == null) {
+ return null;
+ }
TelecomManager telecomManager =
(TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
- PhoneAccountHandle phoneAccount = telecomManager.getSimCallManager(userId);
- if (phoneAccount != null) {
- return new String[]{phoneAccount.getComponentName().getPackageName()};
+ List<String> packages = new ArrayList<>();
+ int[] subIds = subscriptionManager.getActiveSubscriptionIdList();
+ for (int subId : subIds) {
+ PhoneAccountHandle phoneAccount =
+ telecomManager.getSimCallManagerForSubscription(subId);
+ if (phoneAccount != null) {
+ packages.add(phoneAccount.getComponentName().getPackageName());
+ }
}
- return null;
+ return packages.toArray(new String[] {});
});
}
diff --git a/services/core/java/com/android/server/vcn/Vcn.java b/services/core/java/com/android/server/vcn/Vcn.java
index cccb096..e1747f7 100644
--- a/services/core/java/com/android/server/vcn/Vcn.java
+++ b/services/core/java/com/android/server/vcn/Vcn.java
@@ -396,6 +396,15 @@
continue;
}
+ // This should never happen, by virtue of checking for the above check for
+ // pre-existing VcnGatewayConnections that satisfy a given request, but if state
+ // that affects the satsifying of requests changes, this is theoretically possible.
+ if (mVcnGatewayConnections.containsKey(gatewayConnectionConfig)) {
+ Slog.wtf(getLogTag(), "Attempted to bring up VcnGatewayConnection for config "
+ + "with existing VcnGatewayConnection");
+ return;
+ }
+
final VcnGatewayConnection vcnGatewayConnection =
mDeps.newVcnGatewayConnection(
mVcnContext,
@@ -467,6 +476,9 @@
}
}
}
+
+ // Trigger re-evaluation of all requests; mobile data state impacts supported caps.
+ mVcnContext.getVcnNetworkProvider().resendAllRequests(mRequestListener);
}
}
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java
index 41562bb..a8b10f6 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java
@@ -155,7 +155,8 @@
}
@Override
- public ManagedProfilePasswordCache getManagedProfilePasswordCache() {
+ public ManagedProfilePasswordCache getManagedProfilePasswordCache(
+ java.security.KeyStore ks) {
return mock(ManagedProfilePasswordCache.class);
}
diff --git a/telecomm/java/android/telecom/CallScreeningService.java b/telecomm/java/android/telecom/CallScreeningService.java
index 7988b03..b980d3f 100644
--- a/telecomm/java/android/telecom/CallScreeningService.java
+++ b/telecomm/java/android/telecom/CallScreeningService.java
@@ -305,7 +305,7 @@
* called with {@code false}, and all other parameters in this builder will be ignored.
* <p>
* This request will only be honored if the {@link CallScreeningService} shares the same
- * uid as the default dialer app. Otherwise, the call will go through as usual.
+ * uid as the system dialer app. Otherwise, the call will go through as usual.
* <p>
* Apps built with SDK version {@link android.os.Build.VERSION_CODES#R} or later which
* are using the microphone as part of audio processing should specify the
diff --git a/telecomm/java/android/telecom/Logging/Session.java b/telecomm/java/android/telecom/Logging/Session.java
index 4aa3614..e2fb601 100644
--- a/telecomm/java/android/telecom/Logging/Session.java
+++ b/telecomm/java/android/telecom/Logging/Session.java
@@ -453,19 +453,19 @@
@Override
public String toString() {
- if (mParentSession != null && mIsStartedFromActiveSession) {
+ Session sessionToPrint = this;
+ if (getParentSession() != null && isStartedFromActiveSession()) {
// Log.startSession was called from within another active session. Use the parent's
// Id instead of the child to reduce confusion.
- return mParentSession.toString();
- } else {
- StringBuilder methodName = new StringBuilder();
- methodName.append(getFullMethodPath(false /*truncatePath*/));
- if (mOwnerInfo != null && !mOwnerInfo.isEmpty()) {
- methodName.append("(");
- methodName.append(mOwnerInfo);
- methodName.append(")");
- }
- return methodName.toString() + "@" + getFullSessionId();
+ sessionToPrint = getRootSession("toString");
}
+ StringBuilder methodName = new StringBuilder();
+ methodName.append(sessionToPrint.getFullMethodPath(false /*truncatePath*/));
+ if (sessionToPrint.getOwnerInfo() != null && !sessionToPrint.getOwnerInfo().isEmpty()) {
+ methodName.append("(");
+ methodName.append(sessionToPrint.getOwnerInfo());
+ methodName.append(")");
+ }
+ return methodName.toString() + "@" + sessionToPrint.getFullSessionId();
}
}
diff --git a/telephony/common/com/android/internal/telephony/SipMessageParsingUtils.java b/telephony/common/com/android/internal/telephony/SipMessageParsingUtils.java
index 33b0bbd2..804d1ed 100644
--- a/telephony/common/com/android/internal/telephony/SipMessageParsingUtils.java
+++ b/telephony/common/com/android/internal/telephony/SipMessageParsingUtils.java
@@ -17,6 +17,7 @@
package com.android.internal.telephony;
import android.net.Uri;
+import android.util.ArraySet;
import android.util.Log;
import android.util.Pair;
@@ -24,6 +25,8 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
/**
* Utility methods for parsing parts of {@link android.telephony.ims.SipMessage}s.
@@ -70,6 +73,24 @@
// compact form of the call-id header key
private static final String CALL_ID_SIP_HEADER_KEY_COMPACT = "i";
+ // from header key
+ private static final String FROM_HEADER_KEY = "from";
+ // compact form of the from header key
+ private static final String FROM_HEADER_KEY_COMPACT = "f";
+
+ // to header key
+ private static final String TO_HEADER_KEY = "to";
+ // compact form of the to header key
+ private static final String TO_HEADER_KEY_COMPACT = "t";
+
+ // The tag parameter found in both the from and to headers
+ private static final String TAG_PARAM_KEY = "tag";
+
+ // accept-contact header key
+ private static final String ACCEPT_CONTACT_HEADER_KEY = "accept-contact";
+ // compact form of the accept-contact header key
+ private static final String ACCEPT_CONTACT_HEADER_KEY_COMPACT = "a";
+
/**
* @return true if the SIP message start line is considered a request (based on known request
* methods).
@@ -104,35 +125,42 @@
// branch param YY1.
String[] subHeaders = header.second.split(SUBHEADER_VALUE_SEPARATOR);
for (String subHeader : subHeaders) {
- // Search for ;branch=z9hG4bKXXXXXX and return parameter value
- String[] params = subHeader.split(PARAM_SEPARATOR);
- if (params.length < 2) {
- // This param doesn't include a branch param, move to next param.
- Log.w(TAG, "getTransactionId: via detected without branch param:"
- + subHeader);
- continue;
- }
- // by spec, each param can only appear once in a header.
- for (String param : params) {
- String[] pair = param.split(PARAM_KEY_VALUE_SEPARATOR);
- if (pair.length < 2) {
- // ignore info before the first parameter
- continue;
- }
- if (pair.length > 2) {
- Log.w(TAG,
- "getTransactionId: unexpected parameter" + Arrays.toString(pair));
- }
- // Trim whitespace in parameter
- pair[0] = pair[0].trim();
- pair[1] = pair[1].trim();
- if (BRANCH_PARAM_KEY.equalsIgnoreCase(pair[0])) {
- // There can be multiple "Via" headers in the SIP message, however we want
- // to return the first once found, as this corresponds with the transaction
- // that is relevant here.
- return pair[1];
- }
- }
+ String paramValue = getParameterValue(subHeader, BRANCH_PARAM_KEY);
+ if (paramValue == null) continue;
+ return paramValue;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Search a header's value for a specific parameter.
+ * @param headerValue The header key's value.
+ * @param parameterKey The parameter key we are looking for.
+ * @return The value associated with the specified parameter key or {@link null} if that key is
+ * not found.
+ */
+ private static String getParameterValue(String headerValue, String parameterKey) {
+ String[] params = headerValue.split(PARAM_SEPARATOR);
+ if (params.length < 2) {
+ return null;
+ }
+ // by spec, each param can only appear once in a header.
+ for (String param : params) {
+ String[] pair = param.split(PARAM_KEY_VALUE_SEPARATOR);
+ if (pair.length < 2) {
+ // ignore info before the first parameter
+ continue;
+ }
+ if (pair.length > 2) {
+ Log.w(TAG,
+ "getParameterValue: unexpected parameter" + Arrays.toString(pair));
+ }
+ // Trim whitespace in parameter
+ pair[0] = pair[0].trim();
+ pair[1] = pair[1].trim();
+ if (parameterKey.equalsIgnoreCase(pair[0])) {
+ return pair[1];
}
}
return null;
@@ -143,23 +171,105 @@
* @param headerString The string containing the headers of the SIP message.
*/
public static String getCallId(String headerString) {
- // search for the call-Id header, there should only be one in the header.
+ // search for the call-Id header, there should only be one in the headers.
List<Pair<String, String>> headers = parseHeaders(headerString, true,
CALL_ID_SIP_HEADER_KEY, CALL_ID_SIP_HEADER_KEY_COMPACT);
return !headers.isEmpty() ? headers.get(0).second : null;
}
/**
+ * @return Return the from header's tag parameter or {@code null} if it doesn't exist.
+ */
+ public static String getFromTag(String headerString) {
+ // search for the from header, there should only be one in the headers.
+ List<Pair<String, String>> headers = parseHeaders(headerString, true,
+ FROM_HEADER_KEY, FROM_HEADER_KEY_COMPACT);
+ if (headers.isEmpty()) {
+ return null;
+ }
+ // There should only be one from header in the SIP message
+ return getParameterValue(headers.get(0).second, TAG_PARAM_KEY);
+ }
+
+ /**
+ * @return Return the to header's tag parameter or {@code null} if it doesn't exist.
+ */
+ public static String getToTag(String headerString) {
+ // search for the to header, there should only be one in the headers.
+ List<Pair<String, String>> headers = parseHeaders(headerString, true,
+ TO_HEADER_KEY, TO_HEADER_KEY_COMPACT);
+ if (headers.isEmpty()) {
+ return null;
+ }
+ // There should only be one from header in the SIP message
+ return getParameterValue(headers.get(0).second, TAG_PARAM_KEY);
+ }
+
+ /**
* Validate that the start line is correct and split into its three segments.
* @param startLine The start line to verify and split.
* @return The split start line, which will always have three segments.
*/
public static String[] splitStartLineAndVerify(String startLine) {
- String[] splitLine = startLine.split(" ");
+ String[] splitLine = startLine.split(" ", 3);
if (isStartLineMalformed(splitLine)) return null;
return splitLine;
}
+
+ /**
+ * @return All feature tags starting with "+" in the Accept-Contact header.
+ */
+ public static Set<String> getAcceptContactFeatureTags(String headerString) {
+ List<Pair<String, String>> headers = SipMessageParsingUtils.parseHeaders(headerString,
+ false, ACCEPT_CONTACT_HEADER_KEY, ACCEPT_CONTACT_HEADER_KEY_COMPACT);
+ if (headerString.isEmpty()) {
+ return Collections.emptySet();
+ }
+ Set<String> featureTags = new ArraySet<>();
+ for (Pair<String, String> header : headers) {
+ String[] splitParams = header.second.split(PARAM_SEPARATOR);
+ if (splitParams.length < 2) {
+ continue;
+ }
+ // Start at 1 here, since the first entry is the header value and not params.
+ // We only care about IMS feature tags here, so filter tags with a "+"
+ Set<String> fts = Arrays.asList(splitParams).subList(1, splitParams.length).stream()
+ .map(String::trim).filter(p -> p.startsWith("+")).collect(Collectors.toSet());
+ for (String ft : fts) {
+ String[] paramKeyValue = ft.split(PARAM_KEY_VALUE_SEPARATOR, 2);
+ if (paramKeyValue.length < 2) {
+ featureTags.add(ft);
+ continue;
+ }
+ // Splits keys like +a="b,c" into +a="b" and +a="c"
+ String[] splitValue = splitParamValue(paramKeyValue[1]);
+ for (String value : splitValue) {
+ featureTags.add(paramKeyValue[0] + PARAM_KEY_VALUE_SEPARATOR + value);
+ }
+ }
+ }
+ return featureTags;
+ }
+
+ /**
+ * Takes a string such as "\"a,b,c,d\"" and splits it by "," into a String array of
+ * [\"a\", \"b\", \"c\", \"d\"]
+ */
+ private static String[] splitParamValue(String paramValue) {
+ if (!paramValue.startsWith("\"") && !paramValue.endsWith("\"")) {
+ return new String[] {paramValue};
+ }
+ // Remove quotes on outside
+ paramValue = paramValue.substring(1, paramValue.length() - 1);
+ String[] splitValues = paramValue.split(",");
+ for (int i = 0; i < splitValues.length; i++) {
+ // Encapsulate each split value in its own quotations.
+ splitValues[i] = "\"" + splitValues[i] + "\"";
+ }
+ return splitValues;
+ }
+
private static boolean isStartLineMalformed(String[] startLine) {
if (startLine == null || startLine.length == 0) {
return true;
@@ -172,18 +282,27 @@
private static boolean verifySipRequest(String[] request) {
// Request-Line = Method SP Request-URI SP SIP-Version CRLF
- boolean verified = request[2].contains(SIP_VERSION_2);
- verified &= (Uri.parse(request[1]).getScheme() != null);
+ if (!request[2].contains(SIP_VERSION_2)) return false;
+ boolean verified;
+ try {
+ verified = (Uri.parse(request[1]).getScheme() != null);
+ } catch (NumberFormatException e) {
+ return false;
+ }
verified &= Arrays.stream(SIP_REQUEST_METHODS).anyMatch(s -> request[0].contains(s));
return verified;
}
private static boolean verifySipResponse(String[] response) {
// Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF
- boolean verified = response[0].contains(SIP_VERSION_2);
- int statusCode = Integer.parseInt(response[1]);
- verified &= (statusCode >= 100 && statusCode < 700);
- return verified;
+ if (!response[0].contains(SIP_VERSION_2)) return false;
+ int statusCode;
+ try {
+ statusCode = Integer.parseInt(response[1]);
+ } catch (NumberFormatException e) {
+ return false;
+ }
+ return (statusCode >= 100 && statusCode < 700);
}
/**
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 210e4a5..dd474f0 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -4367,6 +4367,14 @@
public static final String KEY_DISPLAY_NO_DATA_NOTIFICATION_ON_PERMANENT_FAILURE_BOOL =
"display_no_data_notification_on_permanent_failure_bool";
+ /**
+ * Determine whether unthrottle data retry when tracking area code (TAC/LAC) from cell changes
+ *
+ * @hide
+ */
+ public static final String KEY_UNTHROTTLE_DATA_RETRY_WHEN_TAC_CHANGES_BOOL =
+ "unthrottle_data_retry_when_tac_changes_bool";
+
/** The default value for every variable. */
private final static PersistableBundle sDefaults;
@@ -4934,6 +4942,7 @@
sDefaults.putBoolean(KEY_STORE_SIM_PIN_FOR_UNATTENDED_REBOOT_BOOL, true);
sDefaults.putBoolean(KEY_HIDE_ENABLE_2G, false);
sDefaults.putBoolean(KEY_DISPLAY_NO_DATA_NOTIFICATION_ON_PERMANENT_FAILURE_BOOL, false);
+ sDefaults.putBoolean(KEY_UNTHROTTLE_DATA_RETRY_WHEN_TAC_CHANGES_BOOL, false);
}
/**
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index 0dfc7f6..b3ec1f0 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -231,7 +231,7 @@
}
/**
- * @return Mobile Network Code in string fomrat, or {@code null} if unknown.
+ * @return Mobile Network Code in string format, or {@code null} if unknown.
*/
@Nullable
public String getMncString() {
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 497801f..06a2648 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -56,6 +56,7 @@
import android.provider.Telephony.SimInfo;
import android.telephony.euicc.EuiccManager;
import android.telephony.ims.ImsMmTelManager;
+import android.util.Base64;
import android.util.Log;
import android.util.Pair;
@@ -67,6 +68,11 @@
import com.android.internal.util.Preconditions;
import com.android.telephony.Rlog;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
@@ -582,6 +588,50 @@
public @interface SimDisplayNameSource {}
/**
+ * Device status is not shared to a remote party.
+ */
+ public static final int D2D_SHARING_DISABLED = 0;
+
+ /**
+ * Device status is shared with all numbers in the user's contacts.
+ */
+ public static final int D2D_SHARING_ALL_CONTACTS = 1;
+
+ /**
+ * Device status is shared with all selected contacts.
+ */
+ public static final int D2D_SHARING_SELECTED_CONTACTS = 2;
+
+ /**
+ * Device status is shared whenever possible.
+ */
+ public static final int D2D_SHARING_ALL = 3;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"D2D_SHARING_"},
+ value = {
+ D2D_SHARING_DISABLED,
+ D2D_SHARING_ALL_CONTACTS,
+ D2D_SHARING_SELECTED_CONTACTS,
+ D2D_SHARING_ALL
+ })
+ public @interface DeviceToDeviceStatusSharing {}
+
+ /**
+ * TelephonyProvider column name for device to device sharing status.
+ * <P>Type: INTEGER (int)</P>
+ */
+ public static final String D2D_STATUS_SHARING = SimInfo.COLUMN_D2D_STATUS_SHARING;
+
+ /**
+ * TelephonyProvider column name for contacts information that allow device to device sharing.
+ * <P>Type: TEXT (String)</P>
+ */
+ public static final String D2D_STATUS_SHARING_SELECTED_CONTACTS =
+ SimInfo.COLUMN_D2D_STATUS_SHARING_SELECTED_CONTACTS;
+
+ /**
* TelephonyProvider column name for the color of a SIM.
* <P>Type: INTEGER (int)</P>
*/
@@ -871,6 +921,14 @@
public static final String PROFILE_CLASS = SimInfo.COLUMN_PROFILE_CLASS;
/**
+ * TelephonyProvider column name for VoIMS opt-in status.
+ *
+ * <P>Type: INTEGER (int)</P>
+ * @hide
+ */
+ public static final String VOIMS_OPT_IN_STATUS = SimInfo.COLUMN_VOIMS_OPT_IN_STATUS;
+
+ /**
* Profile class of the subscription
* @hide
*/
@@ -2374,6 +2432,57 @@
}
/**
+ * Serialize list of contacts uri to string
+ * @hide
+ */
+ public static String serializeUriLists(List<Uri> uris) {
+ List<String> contacts = new ArrayList<>();
+ for (Uri uri : uris) {
+ contacts.add(uri.toString());
+ }
+ try {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(bos);
+ oos.writeObject(contacts);
+ oos.flush();
+ return Base64.encodeToString(bos.toByteArray(), Base64.DEFAULT);
+ } catch (IOException e) {
+ logd("serializeUriLists IO exception");
+ }
+ return "";
+ }
+
+ /**
+ * Return list of contacts uri corresponding to query result.
+ * @param subId Subscription Id of Subscription
+ * @param propKey Column name in SubscriptionInfo database
+ * @return list of contacts uri to be returned
+ * @hide
+ */
+ private static List<Uri> getContactsFromSubscriptionProperty(int subId, String propKey,
+ Context context) {
+ String result = getSubscriptionProperty(subId, propKey, context);
+ if (result != null) {
+ try {
+ byte[] b = Base64.decode(result, Base64.DEFAULT);
+ ByteArrayInputStream bis = new ByteArrayInputStream(b);
+ ObjectInputStream ois = new ObjectInputStream(bis);
+ List<String> contacts = ArrayList.class.cast(ois.readObject());
+ List<Uri> uris = new ArrayList<>();
+ for (String contact : contacts) {
+ uris.add(Uri.parse(contact));
+ }
+ return uris;
+ } catch (IOException e) {
+ logd("getContactsFromSubscriptionProperty IO exception");
+ } catch (ClassNotFoundException e) {
+ logd("getContactsFromSubscriptionProperty ClassNotFound exception");
+ }
+ }
+ return new ArrayList<>();
+ }
+
+ /**
* Store properties associated with SubscriptionInfo in database
* @param subId Subscription Id of Subscription
* @param propKey Column name in SubscriptionInfo database
@@ -3357,6 +3466,70 @@
}
/**
+ * Set the device to device status sharing user preference for a subscription ID. The setting
+ * app uses this method to indicate with whom they wish to share device to device status
+ * information.
+ * @param sharing the status sharing preference
+ * @param subId the unique Subscription ID in database
+ */
+ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
+ public void setDeviceToDeviceStatusSharing(@DeviceToDeviceStatusSharing int sharing,
+ int subId) {
+ if (VDBG) {
+ logd("[setDeviceToDeviceStatusSharing] + sharing: " + sharing + " subId: " + subId);
+ }
+ setSubscriptionPropertyHelper(subId, "setDeviceToDeviceSharingStatus",
+ (iSub)->iSub.setDeviceToDeviceStatusSharing(sharing, subId));
+ }
+
+ /**
+ * Returns the user-chosen device to device status sharing preference
+ * @param subId Subscription id of subscription
+ * @return The device to device status sharing preference
+ */
+ public @DeviceToDeviceStatusSharing int getDeviceToDeviceStatusSharing(int subId) {
+ if (VDBG) {
+ logd("[getDeviceToDeviceStatusSharing] + subId: " + subId);
+ }
+ return getIntegerSubscriptionProperty(subId, D2D_STATUS_SHARING, D2D_SHARING_DISABLED,
+ mContext);
+ }
+
+ /**
+ * Set the list of contacts that allow device to device status sharing for a subscription ID.
+ * The setting app uses this method to indicate with whom they wish to share device to device
+ * status information.
+ * @param contacts The list of contacts that allow device to device status sharing
+ * @param subscriptionId The unique Subscription ID in database
+ */
+ @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
+ public void setDeviceToDeviceStatusSharingContacts(@NonNull List<Uri> contacts,
+ int subscriptionId) {
+ String contactString = serializeUriLists(contacts);
+ if (VDBG) {
+ logd("[setDeviceToDeviceStatusSharingContacts] + contacts: " + contactString
+ + " subId: " + subscriptionId);
+ }
+ setSubscriptionPropertyHelper(subscriptionId, "setDeviceToDeviceSharingStatus",
+ (iSub)->iSub.setDeviceToDeviceStatusSharingContacts(serializeUriLists(contacts),
+ subscriptionId));
+ }
+
+ /**
+ * Returns the list of contacts that allow device to device status sharing.
+ * @param subscriptionId Subscription id of subscription
+ * @return The list of contacts that allow device to device status sharing
+ */
+ public @NonNull List<Uri> getDeviceToDeviceStatusSharingContacts(
+ int subscriptionId) {
+ if (VDBG) {
+ logd("[getDeviceToDeviceStatusSharingContacts] + subId: " + subscriptionId);
+ }
+ return getContactsFromSubscriptionProperty(subscriptionId,
+ D2D_STATUS_SHARING_SELECTED_CONTACTS, mContext);
+ }
+
+ /**
* DO NOT USE.
* This API is designed for features that are not finished at this point. Do not call this API.
* @hide
diff --git a/telephony/java/android/telephony/ims/DelegateMessageCallback.java b/telephony/java/android/telephony/ims/DelegateMessageCallback.java
index 0d82a54..a008cfd 100644
--- a/telephony/java/android/telephony/ims/DelegateMessageCallback.java
+++ b/telephony/java/android/telephony/ims/DelegateMessageCallback.java
@@ -35,12 +35,12 @@
public interface DelegateMessageCallback {
/**
- * Send a new incoming SIP message to the remote application for processing.
+ * Sends a new incoming SIP message to the remote application for processing.
*/
void onMessageReceived(@NonNull SipMessage message);
/**
- * Notify the remote application that a previous request to send a SIP message using
+ * Notifies the remote application that a previous request to send a SIP message using
* {@link SipDelegate#sendMessage} has succeeded.
*
* @param viaTransactionId The transaction ID found in the via header field of the
@@ -49,7 +49,7 @@
void onMessageSent(@NonNull String viaTransactionId);
/**
- * Notify the remote application that a previous request to send a SIP message using
+ * Notifies the remote application that a previous request to send a SIP message using
* {@link SipDelegate#sendMessage} has failed.
*
* @param viaTransactionId The Transaction ID found in the via header field of the previously
diff --git a/telephony/java/android/telephony/ims/ProvisioningManager.java b/telephony/java/android/telephony/ims/ProvisioningManager.java
index 1e80ab7..c420f35 100644
--- a/telephony/java/android/telephony/ims/ProvisioningManager.java
+++ b/telephony/java/android/telephony/ims/ProvisioningManager.java
@@ -866,6 +866,19 @@
public static final int KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID = 67;
/**
+ * An integer key representing the voice over IMS opt-in provisioning status for the
+ * associated subscription. Determines whether the user can see for voice services over
+ * IMS.
+ * <p>
+ * Use {@link #PROVISIONING_VALUE_ENABLED} to enable VoIMS provisioning and
+ * {@link #PROVISIONING_VALUE_DISABLED} to disable VoIMS provisioning.
+ * @see #setProvisioningIntValue(int, int)
+ * @see #getProvisioningIntValue(int)
+ * @hide
+ */
+ public static final int KEY_VOIMS_OPT_IN_STATUS = 68;
+
+ /**
* Callback for IMS provisioning changes.
*/
public static class Callback {
diff --git a/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java b/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java
index ffbfde6..08513c2 100644
--- a/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java
+++ b/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java
@@ -26,6 +26,7 @@
import android.os.Parcel;
import android.os.Parcelable;
import android.os.PersistableBundle;
+import android.text.TextUtils;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -561,7 +562,12 @@
builder.setSipCniHeader(getString(KEY_SIP_CONFIG_CELLULAR_NETWORK_INFO_HEADER_STRING));
builder.setSipAssociatedUriHeader(getString(KEY_SIP_CONFIG_P_ASSOCIATED_URI_HEADER_STRING));
if (getBoolean(KEY_SIP_CONFIG_IS_GRUU_ENABLED_BOOL, false)) {
- builder.setPublicGruuUri(Uri.parse(getString(KEY_SIP_CONFIG_UE_PUBLIC_GRUU_STRING)));
+ String uri = getString(KEY_SIP_CONFIG_UE_PUBLIC_GRUU_STRING);
+ Uri gruuUri = null;
+ if (!TextUtils.isEmpty(uri)) {
+ gruuUri = Uri.parse(uri);
+ }
+ builder.setPublicGruuUri(gruuUri);
}
if (getBoolean(KEY_SIP_CONFIG_IS_IPSEC_ENABLED_BOOL, false)) {
builder.setIpSecConfiguration(new SipDelegateConfiguration.IpSecConfiguration(
diff --git a/telephony/java/android/telephony/ims/SipDelegateManager.java b/telephony/java/android/telephony/ims/SipDelegateManager.java
index 9258e44..97be45a 100644
--- a/telephony/java/android/telephony/ims/SipDelegateManager.java
+++ b/telephony/java/android/telephony/ims/SipDelegateManager.java
@@ -102,7 +102,7 @@
/**
* The feature tag associated with the outgoing message does not match any known feature tags
- * and this message can not be sent.
+ * or it matches a denied tag and this message can not be sent.
*/
public static final int MESSAGE_FAILURE_REASON_INVALID_FEATURE_TAG = 6;
diff --git a/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl b/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
index 5eee389..1b5e560 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
@@ -47,4 +47,6 @@
void removeRcsConfigCallback(IRcsConfigCallback c);
void triggerRcsReconfiguration();
void setRcsClientConfiguration(in RcsClientConfiguration rcc);
+ void notifyIntImsConfigChanged(int item, int value);
+ void notifyStringImsConfigChanged(int item, String value);
}
diff --git a/telephony/java/android/telephony/ims/feature/RcsFeature.java b/telephony/java/android/telephony/ims/feature/RcsFeature.java
index ddd6fbe..18cc37d 100644
--- a/telephony/java/android/telephony/ims/feature/RcsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/RcsFeature.java
@@ -398,16 +398,6 @@
/**
* Remove the given CapabilityExchangeImplBase instance.
- * @param capExchangeImpl The {@link RcsCapabilityExchangeImplBase} instance to be removed.
- * @hide
- */
- public void removeCapabilityExchangeImpl(
- @NonNull RcsCapabilityExchangeImplBase capExchangeImpl) {
- // Override to implement the process of removing RcsCapabilityExchangeImplBase instance.
- }
-
- /**
- * Remove the given CapabilityExchangeImplBase instance.
* @param capExchangeImpl The {@link RcsCapabilityExchangeImplBase} instance to be destroyed.
*/
public void destroyCapabilityExchangeImpl(
@@ -450,7 +440,7 @@
// Remove the RcsCapabilityExchangeImplBase instance when the capability exchange
// instance has been removed in the framework.
if (mCapabilityExchangeImpl != null) {
- removeCapabilityExchangeImpl(mCapabilityExchangeImpl);
+ destroyCapabilityExchangeImpl(mCapabilityExchangeImpl);
}
mCapabilityExchangeImpl = null;
}
@@ -468,7 +458,7 @@
synchronized (mLock) {
// Remove the original instance
if (mCapabilityExchangeImpl != null) {
- removeCapabilityExchangeImpl(mCapabilityExchangeImpl);
+ destroyCapabilityExchangeImpl(mCapabilityExchangeImpl);
}
mCapabilityExchangeImpl = createCapabilityExchangeImpl(listener);
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
index 4dcb7f5..d75da90 100644
--- a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
@@ -258,6 +258,16 @@
public void setRcsClientConfiguration(RcsClientConfiguration rcc) throws RemoteException {
getImsConfigImpl().setRcsClientConfiguration(rcc);
}
+
+ @Override
+ public void notifyIntImsConfigChanged(int item, int value) throws RemoteException {
+ notifyImsConfigChanged(item, value);
+ }
+
+ @Override
+ public void notifyStringImsConfigChanged(int item, String value) throws RemoteException {
+ notifyImsConfigChanged(item, value);
+ }
}
/**
diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl
index 571efce..6493772 100755
--- a/telephony/java/com/android/internal/telephony/ISub.aidl
+++ b/telephony/java/com/android/internal/telephony/ISub.aidl
@@ -300,4 +300,8 @@
boolean canDisablePhysicalSubscription();
int setUiccApplicationsEnabled(boolean enabled, int subscriptionId);
+
+ int setDeviceToDeviceStatusSharing(int sharing, int subId);
+
+ int setDeviceToDeviceStatusSharingContacts(String contacts, int subscriptionId);
}
diff --git a/test-mock/Android.bp b/test-mock/Android.bp
index a2447d7..b83bce6 100644
--- a/test-mock/Android.bp
+++ b/test-mock/Android.bp
@@ -38,6 +38,7 @@
],
libs: [
"framework",
+ "framework-annotations-lib",
"app-compat-annotations",
"unsupportedappusage",
],
diff --git a/tests/vcn/java/com/android/server/vcn/VcnTest.java b/tests/vcn/java/com/android/server/vcn/VcnTest.java
index 736fabd..f681ee1 100644
--- a/tests/vcn/java/com/android/server/vcn/VcnTest.java
+++ b/tests/vcn/java/com/android/server/vcn/VcnTest.java
@@ -388,8 +388,9 @@
final ContentObserver contentObserver = captor.getValue();
// Start VcnGatewayConnections
+ final NetworkRequestListener requestListener = verifyAndGetRequestListener();
mVcn.setMobileDataEnabled(startingToggleState);
- triggerVcnRequestListeners(verifyAndGetRequestListener());
+ triggerVcnRequestListeners(requestListener);
final Map<VcnGatewayConnectionConfig, VcnGatewayConnection> gateways =
mVcn.getVcnGatewayConnectionConfigMap();
@@ -411,6 +412,9 @@
}
}
+ if (startingToggleState != endingToggleState) {
+ verify(mVcnNetworkProvider).resendAllRequests(requestListener);
+ }
assertEquals(endingToggleState, mVcn.isMobileDataEnabled());
}