Merge "Remove dependencies on art-notices jar"
diff --git a/core/api/current.txt b/core/api/current.txt
index 2a16084..4968a5f 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -21404,6 +21404,9 @@
field public static final String KEY_MAX_PTS_GAP_TO_ENCODER = "max-pts-gap-to-encoder";
field public static final String KEY_MAX_WIDTH = "max-width";
field public static final String KEY_MIME = "mime";
+ field public static final String KEY_MPEGH_COMPATIBLE_SETS = "mpegh-compatible-sets";
+ field public static final String KEY_MPEGH_PROFILE_LEVEL_INDICATION = "mpegh-profile-level-indication";
+ field public static final String KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT = "mpegh-reference-channel-layout";
field public static final String KEY_OPERATING_RATE = "operating-rate";
field public static final String KEY_OUTPUT_REORDER_DEPTH = "output-reorder-depth";
field public static final String KEY_PCM_ENCODING = "pcm-encoding";
@@ -25135,6 +25138,9 @@
field public static final int UNSUPPORTED = -1; // 0xffffffff
}
+ public interface TunnelConnectionParams {
+ }
+
public abstract class Uri implements java.lang.Comparable<android.net.Uri> android.os.Parcelable {
method public abstract android.net.Uri.Builder buildUpon();
method public int compareTo(android.net.Uri);
@@ -25695,33 +25701,25 @@
method @NonNull public android.net.vcn.VcnConfig build();
}
- public abstract class VcnControlPlaneConfig {
- }
-
- public final class VcnControlPlaneIkeConfig extends android.net.vcn.VcnControlPlaneConfig {
- ctor public VcnControlPlaneIkeConfig(@NonNull android.net.ipsec.ike.IkeSessionParams, @NonNull android.net.ipsec.ike.TunnelModeChildSessionParams);
- method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams getChildSessionParams();
- method @NonNull public android.net.ipsec.ike.IkeSessionParams getIkeSessionParams();
- }
-
public final class VcnGatewayConnectionConfig {
method @NonNull public int[] getExposedCapabilities();
method @NonNull public String getGatewayConnectionName();
method @IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) public int getMaxMtu();
- method @NonNull public long[] getRetryInterval();
+ method @NonNull public long[] getRetryIntervalsMs();
}
public static final class VcnGatewayConnectionConfig.Builder {
- ctor public VcnGatewayConnectionConfig.Builder(@NonNull String, @NonNull android.net.vcn.VcnControlPlaneConfig);
+ ctor public VcnGatewayConnectionConfig.Builder(@NonNull String, @NonNull android.net.TunnelConnectionParams);
method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder addExposedCapability(int);
method @NonNull public android.net.vcn.VcnGatewayConnectionConfig build();
method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder removeExposedCapability(int);
method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setMaxMtu(@IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) int);
- method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryInterval(@NonNull long[]);
+ method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryIntervalsMs(@NonNull long[]);
}
public class VcnManager {
method @RequiresPermission("carrier privileges") public void clearVcnConfig(@NonNull android.os.ParcelUuid) throws java.io.IOException;
+ method @NonNull public java.util.List<android.os.ParcelUuid> getConfiguredSubscriptionGroups();
method public void registerVcnStatusCallback(@NonNull android.os.ParcelUuid, @NonNull java.util.concurrent.Executor, @NonNull android.net.vcn.VcnManager.VcnStatusCallback);
method @RequiresPermission("carrier privileges") public void setVcnConfig(@NonNull android.os.ParcelUuid, @NonNull android.net.vcn.VcnConfig) throws java.io.IOException;
method public void unregisterVcnStatusCallback(@NonNull android.net.vcn.VcnManager.VcnStatusCallback);
@@ -31420,6 +31418,10 @@
method @NonNull public String getLabel(@NonNull android.content.pm.PackageManager);
method @IntRange(from=1) public int getWidthMils();
method public boolean isPortrait();
+ field @NonNull public static final android.print.PrintAttributes.MediaSize ANSI_C;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize ANSI_D;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize ANSI_E;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize ANSI_F;
field public static final android.print.PrintAttributes.MediaSize ISO_A0;
field public static final android.print.PrintAttributes.MediaSize ISO_A1;
field public static final android.print.PrintAttributes.MediaSize ISO_A10;
@@ -31473,6 +31475,12 @@
field public static final android.print.PrintAttributes.MediaSize JPN_KAKU2;
field public static final android.print.PrintAttributes.MediaSize JPN_OUFUKU;
field public static final android.print.PrintAttributes.MediaSize JPN_YOU4;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize NA_ARCH_A;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize NA_ARCH_B;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize NA_ARCH_C;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize NA_ARCH_D;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize NA_ARCH_E;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize NA_ARCH_E1;
field public static final android.print.PrintAttributes.MediaSize NA_FOOLSCAP;
field public static final android.print.PrintAttributes.MediaSize NA_GOVT_LETTER;
field public static final android.print.PrintAttributes.MediaSize NA_INDEX_3X5;
@@ -31484,7 +31492,9 @@
field public static final android.print.PrintAttributes.MediaSize NA_LETTER;
field public static final android.print.PrintAttributes.MediaSize NA_MONARCH;
field public static final android.print.PrintAttributes.MediaSize NA_QUARTO;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize NA_SUPER_B;
field public static final android.print.PrintAttributes.MediaSize NA_TABLOID;
+ field @NonNull public static final android.print.PrintAttributes.MediaSize OE_PHOTO_L;
field public static final android.print.PrintAttributes.MediaSize OM_DAI_PA_KAI;
field public static final android.print.PrintAttributes.MediaSize OM_JUURO_KU_KAI;
field public static final android.print.PrintAttributes.MediaSize OM_PA_KAI;
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt
index b1e3e14..66ac74a 100644
--- a/core/api/module-lib-current.txt
+++ b/core/api/module-lib-current.txt
@@ -44,7 +44,6 @@
}
public class NetworkPolicyManager {
- method @NonNull public static String blockedReasonsToString(int);
method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public int getMultipathPreference(@NonNull android.net.Network);
method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public int getRestrictBackgroundStatus(int);
method @RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY) public boolean isUidNetworkingBlocked(int, boolean);
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index e376fb8..2e40436 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -12606,12 +12606,15 @@
}
public static interface UwbManager.AdapterStateCallback {
- method public void onStateChanged(boolean, int);
+ method public void onStateChanged(int, int);
field public static final int STATE_CHANGED_REASON_ALL_SESSIONS_CLOSED = 1; // 0x1
field public static final int STATE_CHANGED_REASON_ERROR_UNKNOWN = 4; // 0x4
field public static final int STATE_CHANGED_REASON_SESSION_STARTED = 0; // 0x0
field public static final int STATE_CHANGED_REASON_SYSTEM_BOOT = 3; // 0x3
field public static final int STATE_CHANGED_REASON_SYSTEM_POLICY = 2; // 0x2
+ field public static final int STATE_DISABLED = 0; // 0x0
+ field public static final int STATE_ENABLED_ACTIVE = 2; // 0x2
+ field public static final int STATE_ENABLED_INACTIVE = 1; // 0x1
}
}
diff --git a/core/java/android/bluetooth/le/ScanSettings.java b/core/java/android/bluetooth/le/ScanSettings.java
index 368d1ee..1aa7cb5 100644
--- a/core/java/android/bluetooth/le/ScanSettings.java
+++ b/core/java/android/bluetooth/le/ScanSettings.java
@@ -345,12 +345,14 @@
}
/**
- * Set report delay timestamp for Bluetooth LE scan.
+ * Set report delay timestamp for Bluetooth LE scan. If set to 0, you will be notified of
+ * scan results immediately. If > 0, scan results are queued up and delivered after the
+ * requested delay or 5000 milliseconds (whichever is higher). Note scan results may be
+ * delivered sooner if the internal buffers fill up.
*
- * @param reportDelayMillis Delay of report in milliseconds. Set to 0 to be notified of
- * results immediately. Values > 0 causes the scan results to be queued up and delivered
- * after the requested delay or when the internal buffers fill up.
- * @throws IllegalArgumentException If {@code reportDelayMillis} < 0.
+ * @param reportDelayMillis how frequently scan results should be delivered in
+ * milliseconds
+ * @throws IllegalArgumentException if {@code reportDelayMillis} < 0
*/
public Builder setReportDelay(long reportDelayMillis) {
if (reportDelayMillis < 0) {
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index b074fad..c1cd09e 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -766,7 +766,6 @@
* blocked.
* @hide
*/
- @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
@NonNull
public static String blockedReasonsToString(int blockedReasons) {
return DebugUtils.flagsToString(NetworkPolicyManager.class, "BLOCKED_", blockedReasons);
diff --git a/core/java/android/net/TunnelConnectionParams.java b/core/java/android/net/TunnelConnectionParams.java
new file mode 100644
index 0000000..f5b3539
--- /dev/null
+++ b/core/java/android/net/TunnelConnectionParams.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2021 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.net;
+
+/**
+ * TunnelConnectionParams represents a configuration to set up a tunnel connection.
+ *
+ * <p>Concrete implementations for a control plane protocol should implement this interface.
+ * Subclasses should be immutable data classes containing connection, authentication and
+ * authorization parameters required to establish a tunnel connection.
+ *
+ * @see android.net.ipsec.ike.IkeTunnelConnectionParams
+ */
+// TODO:b/186071626 Remove TunnelConnectionParams when non-updatable API stub can resolve
+// IkeTunnelConnectionParams
+public interface TunnelConnectionParams {}
diff --git a/core/java/android/net/vcn/IVcnManagementService.aidl b/core/java/android/net/vcn/IVcnManagementService.aidl
index 5b79f73..e16f6b1 100644
--- a/core/java/android/net/vcn/IVcnManagementService.aidl
+++ b/core/java/android/net/vcn/IVcnManagementService.aidl
@@ -24,12 +24,15 @@
import android.net.vcn.VcnUnderlyingNetworkPolicy;
import android.os.ParcelUuid;
+import java.util.List;
+
/**
* @hide
*/
interface IVcnManagementService {
void setVcnConfig(in ParcelUuid subscriptionGroup, in VcnConfig config, in String opPkgName);
void clearVcnConfig(in ParcelUuid subscriptionGroup, in String opPkgName);
+ List<ParcelUuid> getConfiguredSubscriptionGroups(in String opPkgName);
void addVcnUnderlyingNetworkPolicyListener(in IVcnUnderlyingNetworkPolicyListener listener);
void removeVcnUnderlyingNetworkPolicyListener(in IVcnUnderlyingNetworkPolicyListener listener);
diff --git a/core/java/android/net/vcn/VcnControlPlaneConfig.java b/core/java/android/net/vcn/VcnControlPlaneConfig.java
deleted file mode 100644
index 92f6c44..0000000
--- a/core/java/android/net/vcn/VcnControlPlaneConfig.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2021 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.net.vcn;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.os.PersistableBundle;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Objects;
-
-/**
- * This class represents a control plane configuration for a Virtual Carrier Network connection.
- *
- * <p>Each {@link VcnGatewayConnectionConfig} must have a {@link VcnControlPlaneConfig}, containing
- * all connection, authentication and authorization parameters required to establish a Gateway
- * Connection with a remote endpoint.
- *
- * <p>A {@link VcnControlPlaneConfig} object can be shared by multiple {@link
- * VcnGatewayConnectionConfig}(s) if they will used for connecting with the same remote endpoint.
- *
- * @see VcnManager
- * @see VcnGatewayConnectionConfig
- */
-public abstract class VcnControlPlaneConfig {
- /** @hide */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef({CONFIG_TYPE_IKE})
- public @interface ConfigType {}
-
- /** @hide */
- public static final int CONFIG_TYPE_IKE = 1;
-
- private static final String CONFIG_TYPE_KEY = "mConfigType";
- @ConfigType private final int mConfigType;
-
- /**
- * Package private constructor.
- *
- * @hide
- */
- VcnControlPlaneConfig(int configType) {
- mConfigType = configType;
- }
-
- /**
- * Constructs a VcnControlPlaneConfig object by deserializing a PersistableBundle.
- *
- * @param in the {@link PersistableBundle} containing an {@link VcnControlPlaneConfig} object
- * @hide
- */
- public static VcnControlPlaneConfig fromPersistableBundle(@NonNull PersistableBundle in) {
- Objects.requireNonNull(in, "PersistableBundle was null");
-
- int configType = in.getInt(CONFIG_TYPE_KEY);
- switch (configType) {
- case CONFIG_TYPE_IKE:
- return new VcnControlPlaneIkeConfig(in);
- default:
- throw new IllegalStateException("Unrecognized configType: " + configType);
- }
- }
-
- /**
- * Converts this VcnControlPlaneConfig to a PersistableBundle.
- *
- * @hide
- */
- @NonNull
- public PersistableBundle toPersistableBundle() {
- final PersistableBundle result = new PersistableBundle();
- result.putInt(CONFIG_TYPE_KEY, mConfigType);
- return result;
- }
-
- /** @hide */
- @Override
- public int hashCode() {
- return Objects.hash(mConfigType);
- }
-
- /** @hide */
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof VcnControlPlaneConfig)) {
- return false;
- }
-
- return mConfigType == ((VcnControlPlaneConfig) o).mConfigType;
- }
-
- /**
- * Returns a deep copy of this object.
- *
- * @hide
- */
- public abstract VcnControlPlaneConfig copy();
-}
diff --git a/core/java/android/net/vcn/VcnControlPlaneIkeConfig.java b/core/java/android/net/vcn/VcnControlPlaneIkeConfig.java
deleted file mode 100644
index 22d7faf..0000000
--- a/core/java/android/net/vcn/VcnControlPlaneIkeConfig.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2021 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.net.vcn;
-
-import static android.net.vcn.VcnControlPlaneConfig.CONFIG_TYPE_IKE;
-
-import android.annotation.NonNull;
-import android.net.ipsec.ike.IkeSessionParams;
-import android.net.ipsec.ike.TunnelModeChildSessionParams;
-import android.net.vcn.persistablebundleutils.IkeSessionParamsUtils;
-import android.net.vcn.persistablebundleutils.TunnelModeChildSessionParamsUtils;
-import android.os.PersistableBundle;
-import android.util.ArraySet;
-import android.util.Log;
-
-import java.util.Objects;
-
-/**
- * This class is an IKEv2 control plane configuration for a Virtual Carrier Network connection.
- *
- * <p>This class is an extension of the {@link VcnControlPlaneConfig}, containing IKEv2-specific
- * configuration, authentication and authorization parameters.
- *
- * @see VcnControlPlaneConfig
- */
-public final class VcnControlPlaneIkeConfig extends VcnControlPlaneConfig {
- private static final String TAG = VcnControlPlaneIkeConfig.class.getSimpleName();
-
- private static final String IKE_PARAMS_KEY = "mIkeParams";
- @NonNull private final IkeSessionParams mIkeParams;
-
- private static final String CHILD_PARAMS_KEY = "mChildParams";
- @NonNull private final TunnelModeChildSessionParams mChildParams;
-
- private static final ArraySet<String> BUNDLE_KEY_SET = new ArraySet<>();
-
- {
- BUNDLE_KEY_SET.add(IKE_PARAMS_KEY);
- BUNDLE_KEY_SET.add(CHILD_PARAMS_KEY);
- }
-
- /**
- * Constructs a VcnControlPlaneIkeConfig object.
- *
- * @param ikeParams the IKE Session negotiation parameters
- * @param childParams the tunnel mode Child Session negotiation parameters
- */
- public VcnControlPlaneIkeConfig(
- @NonNull IkeSessionParams ikeParams,
- @NonNull TunnelModeChildSessionParams childParams) {
- super(CONFIG_TYPE_IKE);
- mIkeParams = ikeParams;
- mChildParams = childParams;
- validate();
- }
-
- /**
- * Constructs a VcnControlPlaneIkeConfig object by deserializing a PersistableBundle.
- *
- * @param in the {@link PersistableBundle} containing an {@link VcnControlPlaneIkeConfig} object
- * @hide
- */
- public VcnControlPlaneIkeConfig(@NonNull PersistableBundle in) {
- super(CONFIG_TYPE_IKE);
- final PersistableBundle ikeParamsBundle = in.getPersistableBundle(IKE_PARAMS_KEY);
- final PersistableBundle childParamsBundle = in.getPersistableBundle(CHILD_PARAMS_KEY);
-
- Objects.requireNonNull(ikeParamsBundle, "IKE Session Params was null");
- Objects.requireNonNull(childParamsBundle, "Child Session Params was null");
-
- mIkeParams = IkeSessionParamsUtils.fromPersistableBundle(ikeParamsBundle);
- mChildParams = TunnelModeChildSessionParamsUtils.fromPersistableBundle(childParamsBundle);
-
- for (String key : in.keySet()) {
- if (!BUNDLE_KEY_SET.contains(key)) {
- Log.w(TAG, "Found an unexpected key in the PersistableBundle: " + key);
- }
- }
-
- validate();
- }
-
- private void validate() {
- Objects.requireNonNull(mIkeParams, "mIkeParams was null");
- Objects.requireNonNull(mChildParams, "mChildParams was null");
- }
-
- /**
- * Converts this VcnControlPlaneConfig to a PersistableBundle.
- *
- * @hide
- */
- @Override
- @NonNull
- public PersistableBundle toPersistableBundle() {
- final PersistableBundle result = super.toPersistableBundle();
- result.putPersistableBundle(
- IKE_PARAMS_KEY, IkeSessionParamsUtils.toPersistableBundle(mIkeParams));
- result.putPersistableBundle(
- CHILD_PARAMS_KEY,
- TunnelModeChildSessionParamsUtils.toPersistableBundle(mChildParams));
- return result;
- }
-
- /** Retrieves the IKE Session configuration. */
- @NonNull
- public IkeSessionParams getIkeSessionParams() {
- return mIkeParams;
- }
-
- /** Retrieves the tunnel mode Child Session configuration. */
- @NonNull
- public TunnelModeChildSessionParams getChildSessionParams() {
- return mChildParams;
- }
-
- /** @hide */
- @Override
- public int hashCode() {
- return Objects.hash(super.hashCode(), mIkeParams, mChildParams);
- }
-
- /** @hide */
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof VcnControlPlaneIkeConfig)) {
- return false;
- }
-
- VcnControlPlaneIkeConfig other = (VcnControlPlaneIkeConfig) o;
-
- return super.equals(o)
- && Objects.equals(mIkeParams, other.mIkeParams)
- && Objects.equals(mChildParams, other.mChildParams);
- }
-
- /** @hide */
- @Override
- public VcnControlPlaneConfig copy() {
- return new VcnControlPlaneIkeConfig(
- new IkeSessionParams.Builder(mIkeParams).build(),
- new TunnelModeChildSessionParams.Builder(mChildParams).build());
- }
-}
diff --git a/core/java/android/net/vcn/VcnGatewayConnectionConfig.java b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
index 75db3820..adcbe25 100644
--- a/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
+++ b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
@@ -24,6 +24,8 @@
import android.annotation.SuppressLint;
import android.net.Network;
import android.net.NetworkCapabilities;
+import android.net.TunnelConnectionParams;
+import android.net.vcn.persistablebundleutils.TunnelConnectionParamsUtils;
import android.os.PersistableBundle;
import android.util.ArraySet;
@@ -134,7 +136,7 @@
* <p>To ensure the device is not constantly being woken up, this retry interval MUST be greater
* than this value.
*
- * @see {@link Builder#setRetryInterval()}
+ * @see {@link Builder#setRetryIntervalsMs()}
*/
private static final long MINIMUM_REPEATING_RETRY_INTERVAL_MS = TimeUnit.MINUTES.toMillis(15);
@@ -151,8 +153,8 @@
private static final String GATEWAY_CONNECTION_NAME_KEY = "mGatewayConnectionName";
@NonNull private final String mGatewayConnectionName;
- private static final String CTRL_PLANE_CONFIG_KEY = "mCtrlPlaneConfig";
- @NonNull private VcnControlPlaneConfig mCtrlPlaneConfig;
+ private static final String TUNNEL_CONNECTION_PARAMS_KEY = "mTunnelConnectionParams";
+ @NonNull private TunnelConnectionParams mTunnelConnectionParams;
private static final String EXPOSED_CAPABILITIES_KEY = "mExposedCapabilities";
@NonNull private final SortedSet<Integer> mExposedCapabilities;
@@ -169,13 +171,13 @@
/** Builds a VcnGatewayConnectionConfig with the specified parameters. */
private VcnGatewayConnectionConfig(
@NonNull String gatewayConnectionName,
- @NonNull VcnControlPlaneConfig ctrlPlaneConfig,
+ @NonNull TunnelConnectionParams tunnelConnectionParams,
@NonNull Set<Integer> exposedCapabilities,
@NonNull Set<Integer> underlyingCapabilities,
@NonNull long[] retryIntervalsMs,
@IntRange(from = MIN_MTU_V6) int maxMtu) {
mGatewayConnectionName = gatewayConnectionName;
- mCtrlPlaneConfig = ctrlPlaneConfig;
+ mTunnelConnectionParams = tunnelConnectionParams;
mExposedCapabilities = new TreeSet(exposedCapabilities);
mUnderlyingCapabilities = new TreeSet(underlyingCapabilities);
mRetryIntervalsMs = retryIntervalsMs;
@@ -187,9 +189,10 @@
/** @hide */
@VisibleForTesting(visibility = Visibility.PRIVATE)
public VcnGatewayConnectionConfig(@NonNull PersistableBundle in) {
- final PersistableBundle ctrlPlaneConfigBundle =
- in.getPersistableBundle(CTRL_PLANE_CONFIG_KEY);
- Objects.requireNonNull(ctrlPlaneConfigBundle, "ctrlPlaneConfigBundle was null");
+ final PersistableBundle tunnelConnectionParamsBundle =
+ in.getPersistableBundle(TUNNEL_CONNECTION_PARAMS_KEY);
+ Objects.requireNonNull(
+ tunnelConnectionParamsBundle, "tunnelConnectionParamsBundle was null");
final PersistableBundle exposedCapsBundle =
in.getPersistableBundle(EXPOSED_CAPABILITIES_KEY);
@@ -197,7 +200,8 @@
in.getPersistableBundle(UNDERLYING_CAPABILITIES_KEY);
mGatewayConnectionName = in.getString(GATEWAY_CONNECTION_NAME_KEY);
- mCtrlPlaneConfig = VcnControlPlaneConfig.fromPersistableBundle(ctrlPlaneConfigBundle);
+ mTunnelConnectionParams =
+ TunnelConnectionParamsUtils.fromPersistableBundle(tunnelConnectionParamsBundle);
mExposedCapabilities = new TreeSet<>(PersistableBundleUtils.toList(
exposedCapsBundle, PersistableBundleUtils.INTEGER_DESERIALIZER));
mUnderlyingCapabilities = new TreeSet<>(PersistableBundleUtils.toList(
@@ -210,7 +214,7 @@
private void validate() {
Objects.requireNonNull(mGatewayConnectionName, "gatewayConnectionName was null");
- Objects.requireNonNull(mCtrlPlaneConfig, "control plane config was null");
+ Objects.requireNonNull(mTunnelConnectionParams, "tunnel connection parameter was null");
Preconditions.checkArgument(
mExposedCapabilities != null && !mExposedCapabilities.isEmpty(),
@@ -262,13 +266,13 @@
}
/**
- * Returns control plane configuration.
+ * Returns tunnel connection parameters.
*
* @hide
*/
@NonNull
- public VcnControlPlaneConfig getControlPlaneConfig() {
- return mCtrlPlaneConfig.copy();
+ public TunnelConnectionParams getTunnelConnectionParams() {
+ return mTunnelConnectionParams;
}
/**
@@ -333,25 +337,11 @@
/**
* Retrieves the configured retry intervals.
*
- * @see Builder#setRetryInterval(long[])
+ * @see Builder#setRetryIntervalsMs(long[])
*/
@NonNull
- public long[] getRetryInterval() {
- return Arrays.copyOf(mRetryIntervalsMs, mRetryIntervalsMs.length);
- }
-
- /**
- * Retrieves the configured retry intervals.
- *
- * <p>Left to prevent the need to make major changes while changes are actively in flight.
- *
- * @deprecated use getRetryInterval() instead
- * @hide
- */
- @Deprecated
- @NonNull
public long[] getRetryIntervalsMs() {
- return getRetryInterval();
+ return Arrays.copyOf(mRetryIntervalsMs, mRetryIntervalsMs.length);
}
/**
@@ -374,7 +364,8 @@
public PersistableBundle toPersistableBundle() {
final PersistableBundle result = new PersistableBundle();
- final PersistableBundle ctrlPlaneConfigBundle = mCtrlPlaneConfig.toPersistableBundle();
+ final PersistableBundle tunnelConnectionParamsBundle =
+ TunnelConnectionParamsUtils.toPersistableBundle(mTunnelConnectionParams);
final PersistableBundle exposedCapsBundle =
PersistableBundleUtils.fromList(
new ArrayList<>(mExposedCapabilities),
@@ -385,7 +376,7 @@
PersistableBundleUtils.INTEGER_SERIALIZER);
result.putString(GATEWAY_CONNECTION_NAME_KEY, mGatewayConnectionName);
- result.putPersistableBundle(CTRL_PLANE_CONFIG_KEY, ctrlPlaneConfigBundle);
+ result.putPersistableBundle(TUNNEL_CONNECTION_PARAMS_KEY, tunnelConnectionParamsBundle);
result.putPersistableBundle(EXPOSED_CAPABILITIES_KEY, exposedCapsBundle);
result.putPersistableBundle(UNDERLYING_CAPABILITIES_KEY, underlyingCapsBundle);
result.putLongArray(RETRY_INTERVAL_MS_KEY, mRetryIntervalsMs);
@@ -423,7 +414,7 @@
*/
public static final class Builder {
@NonNull private final String mGatewayConnectionName;
- @NonNull private final VcnControlPlaneConfig mCtrlPlaneConfig;
+ @NonNull private final TunnelConnectionParams mTunnelConnectionParams;
@NonNull private final Set<Integer> mExposedCapabilities = new ArraySet();
@NonNull private final Set<Integer> mUnderlyingCapabilities = new ArraySet();
@NonNull private long[] mRetryIntervalsMs = DEFAULT_RETRY_INTERVALS_MS;
@@ -441,18 +432,18 @@
* VcnConfig} must be given a unique name. This name is used by the caller to
* distinguish between VcnGatewayConnectionConfigs configured on a single {@link
* VcnConfig}. This will be used as the identifier in VcnStatusCallback invocations.
- * @param ctrlPlaneConfig the control plane configuration
- * @see VcnControlPlaneConfig
+ * @param tunnelConnectionParams the tunnel connection configuration
+ * @see TunnelConnectionParams
* @see VcnManager.VcnStatusCallback#onGatewayConnectionError
*/
public Builder(
@NonNull String gatewayConnectionName,
- @NonNull VcnControlPlaneConfig ctrlPlaneConfig) {
+ @NonNull TunnelConnectionParams tunnelConnectionParams) {
Objects.requireNonNull(gatewayConnectionName, "gatewayConnectionName was null");
- Objects.requireNonNull(ctrlPlaneConfig, "ctrlPlaneConfig was null");
+ Objects.requireNonNull(tunnelConnectionParams, "tunnelConnectionParams was null");
mGatewayConnectionName = gatewayConnectionName;
- mCtrlPlaneConfig = ctrlPlaneConfig;
+ mTunnelConnectionParams = tunnelConnectionParams;
}
/**
@@ -559,7 +550,7 @@
* @see VcnManager for additional discussion on fail-safe mode
*/
@NonNull
- public Builder setRetryInterval(@NonNull long[] retryIntervalsMs) {
+ public Builder setRetryIntervalsMs(@NonNull long[] retryIntervalsMs) {
validateRetryInterval(retryIntervalsMs);
mRetryIntervalsMs = retryIntervalsMs;
@@ -597,7 +588,7 @@
public VcnGatewayConnectionConfig build() {
return new VcnGatewayConnectionConfig(
mGatewayConnectionName,
- mCtrlPlaneConfig,
+ mTunnelConnectionParams,
mExposedCapabilities,
mUnderlyingCapabilities,
mRetryIntervalsMs,
diff --git a/core/java/android/net/vcn/VcnManager.java b/core/java/android/net/vcn/VcnManager.java
index 344b20c..9d1c1ff 100644
--- a/core/java/android/net/vcn/VcnManager.java
+++ b/core/java/android/net/vcn/VcnManager.java
@@ -38,6 +38,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collections;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
@@ -162,6 +163,23 @@
}
}
+ /**
+ * Retrieves the list of Subscription Groups for which a VCN Configuration has been set.
+ *
+ * <p>The returned list will include only subscription groups for which the carrier app is
+ * privileged, and which have an associated {@link VcnConfig}.
+ *
+ * @throws SecurityException if the caller is not running as the primary user
+ */
+ @NonNull
+ public List<ParcelUuid> getConfiguredSubscriptionGroups() {
+ try {
+ return mService.getConfiguredSubscriptionGroups(mContext.getOpPackageName());
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
// TODO(b/180537630): remove all VcnUnderlyingNetworkPolicyListener refs once Telephony is using
// the new VcnNetworkPolicyChangeListener API
/**
diff --git a/core/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtils.java b/core/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtils.java
index 8950c4b..09f5283 100644
--- a/core/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtils.java
+++ b/core/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtils.java
@@ -78,6 +78,7 @@
IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_ACCEPT_ANY_REMOTE_ID);
IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_EAP_ONLY_AUTH);
IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_MOBIKE);
+ IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_FORCE_PORT_4500);
}
/** Serializes an IkeSessionParams to a PersistableBundle. */
@@ -124,6 +125,8 @@
result.putInt(DPD_DELAY_SEC_KEY, params.getDpdDelaySeconds());
result.putInt(NATT_KEEPALIVE_DELAY_SEC_KEY, params.getNattKeepAliveDelaySeconds());
+ // TODO: b/185941731 Make sure IkeSessionParamsUtils is automatically updated when a new
+ // IKE_OPTION is defined in IKE module and added in the IkeSessionParams
final List<Integer> enabledIkeOptions = new ArrayList<>();
for (int option : IKE_OPTIONS) {
if (params.hasIkeOption(option)) {
diff --git a/core/java/android/net/vcn/persistablebundleutils/TunnelConnectionParamsUtils.java b/core/java/android/net/vcn/persistablebundleutils/TunnelConnectionParamsUtils.java
new file mode 100644
index 0000000..690e4e7
--- /dev/null
+++ b/core/java/android/net/vcn/persistablebundleutils/TunnelConnectionParamsUtils.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2021 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.net.vcn.persistablebundleutils;
+
+import android.annotation.NonNull;
+import android.net.TunnelConnectionParams;
+import android.net.ipsec.ike.IkeSessionParams;
+import android.net.ipsec.ike.IkeTunnelConnectionParams;
+import android.net.ipsec.ike.TunnelModeChildSessionParams;
+import android.os.PersistableBundle;
+
+import java.util.Objects;
+
+/**
+ * Utility class to convert TunnelConnectionParams to/from PersistableBundle
+ *
+ * @hide
+ */
+public final class TunnelConnectionParamsUtils {
+ private static final int EXPECTED_BUNDLE_KEY_CNT = 1;
+
+ private static final String PARAMS_TYPE_IKE = "IKE";
+
+ /** Serializes an TunnelConnectionParams to a PersistableBundle. */
+ @NonNull
+ public static PersistableBundle toPersistableBundle(@NonNull TunnelConnectionParams params) {
+ final PersistableBundle result = new PersistableBundle();
+
+ if (params instanceof IkeTunnelConnectionParams) {
+ result.putPersistableBundle(
+ PARAMS_TYPE_IKE,
+ IkeTunnelConnectionParamsUtils.serializeIkeParams(
+ (IkeTunnelConnectionParams) params));
+ return result;
+ } else {
+ throw new UnsupportedOperationException("Invalid TunnelConnectionParams type");
+ }
+ }
+
+ /** Constructs an TunnelConnectionParams by deserializing a PersistableBundle. */
+ @NonNull
+ public static TunnelConnectionParams fromPersistableBundle(@NonNull PersistableBundle in) {
+ Objects.requireNonNull(in, "PersistableBundle was null");
+
+ if (in.keySet().size() != EXPECTED_BUNDLE_KEY_CNT) {
+ throw new IllegalArgumentException(
+ "Expect PersistableBundle to have one element but found: " + in.keySet());
+ }
+
+ if (in.get(PARAMS_TYPE_IKE) != null) {
+ return IkeTunnelConnectionParamsUtils.deserializeIkeParams(
+ in.getPersistableBundle(PARAMS_TYPE_IKE));
+ }
+
+ throw new IllegalArgumentException(
+ "Invalid TunnelConnectionParams type " + in.keySet().iterator().next());
+ }
+
+ private static final class IkeTunnelConnectionParamsUtils {
+ private static final String IKE_PARAMS_KEY = "IKE_PARAMS_KEY";
+ private static final String CHILD_PARAMS_KEY = "CHILD_PARAMS_KEY";
+
+ @NonNull
+ public static PersistableBundle serializeIkeParams(
+ @NonNull IkeTunnelConnectionParams ikeParams) {
+ final PersistableBundle result = new PersistableBundle();
+
+ result.putPersistableBundle(
+ IKE_PARAMS_KEY,
+ IkeSessionParamsUtils.toPersistableBundle(ikeParams.getIkeSessionParams()));
+ result.putPersistableBundle(
+ CHILD_PARAMS_KEY,
+ TunnelModeChildSessionParamsUtils.toPersistableBundle(
+ ikeParams.getTunnelModeChildSessionParams()));
+ return result;
+ }
+
+ @NonNull
+ public static IkeTunnelConnectionParams deserializeIkeParams(
+ @NonNull PersistableBundle in) {
+ final PersistableBundle ikeBundle = in.getPersistableBundle(IKE_PARAMS_KEY);
+ final PersistableBundle childBundle = in.getPersistableBundle(CHILD_PARAMS_KEY);
+ Objects.requireNonNull(ikeBundle, "IkeSessionParams was null");
+ Objects.requireNonNull(ikeBundle, "TunnelModeChildSessionParams was null");
+
+ final IkeSessionParams ikeParams =
+ IkeSessionParamsUtils.fromPersistableBundle(ikeBundle);
+ final TunnelModeChildSessionParams childParams =
+ TunnelModeChildSessionParamsUtils.fromPersistableBundle(childBundle);
+ return new IkeTunnelConnectionParams(ikeParams, childParams);
+ }
+ }
+}
diff --git a/core/java/android/os/ServiceManagerNative.java b/core/java/android/os/ServiceManagerNative.java
index 60acc57..755c35f 100644
--- a/core/java/android/os/ServiceManagerNative.java
+++ b/core/java/android/os/ServiceManagerNative.java
@@ -94,6 +94,10 @@
return mServiceManager.getDeclaredInstances(iface);
}
+ public String updatableViaApex(String name) throws RemoteException {
+ return mServiceManager.updatableViaApex(name);
+ }
+
public void registerClientCallback(String name, IBinder service, IClientCallback cb)
throws RemoteException {
throw new RemoteException();
diff --git a/core/java/android/print/PrintAttributes.java b/core/java/android/print/PrintAttributes.java
index e607ced..c198848 100644
--- a/core/java/android/print/PrintAttributes.java
+++ b/core/java/android/print/PrintAttributes.java
@@ -635,6 +635,50 @@
public static final MediaSize NA_FOOLSCAP =
new MediaSize("NA_FOOLSCAP", "android",
R.string.mediasize_na_foolscap, 8000, 13000);
+ /** North America ANSI C media size: 17" x 22" (432mm x 559mm) */
+ public static final @NonNull MediaSize ANSI_C =
+ new MediaSize("ANSI_C", "android",
+ R.string.mediasize_na_ansi_c, 17000, 22000);
+ /** North America ANSI D media size: 22" x 34" (559mm x 864mm) */
+ public static final @NonNull MediaSize ANSI_D =
+ new MediaSize("ANSI_D", "android",
+ R.string.mediasize_na_ansi_d, 22000, 34000);
+ /** North America ANSI E media size: 34" x 44" (864mm x 1118mm) */
+ public static final @NonNull MediaSize ANSI_E =
+ new MediaSize("ANSI_E", "android",
+ R.string.mediasize_na_ansi_e, 34000, 44000);
+ /** North America ANSI F media size: 28" x 40" (711mm x 1016mm) */
+ public static final @NonNull MediaSize ANSI_F =
+ new MediaSize("ANSI_F", "android",
+ R.string.mediasize_na_ansi_f, 28000, 40000);
+ /** North America Arch A media size: 9" x 12" (229mm x 305mm) */
+ public static final @NonNull MediaSize NA_ARCH_A =
+ new MediaSize("NA_ARCH_A", "android",
+ R.string.mediasize_na_arch_a, 9000, 12000);
+ /** North America Arch B media size: 12" x 18" (305mm x 457mm) */
+ public static final @NonNull MediaSize NA_ARCH_B =
+ new MediaSize("NA_ARCH_B", "android",
+ R.string.mediasize_na_arch_b, 12000, 18000);
+ /** North America Arch C media size: 18" x 24" (457mm x 610mm) */
+ public static final @NonNull MediaSize NA_ARCH_C =
+ new MediaSize("NA_ARCH_C", "android",
+ R.string.mediasize_na_arch_c, 18000, 24000);
+ /** North America Arch D media size: 24" x 36" (610mm x 914mm) */
+ public static final @NonNull MediaSize NA_ARCH_D =
+ new MediaSize("NA_ARCH_D", "android",
+ R.string.mediasize_na_arch_d, 24000, 36000);
+ /** North America Arch E media size: 36" x 48" (914mm x 1219mm) */
+ public static final @NonNull MediaSize NA_ARCH_E =
+ new MediaSize("NA_ARCH_E", "android",
+ R.string.mediasize_na_arch_e, 36000, 48000);
+ /** North America Arch E1 media size: 30" x 42" (762mm x 1067mm) */
+ public static final @NonNull MediaSize NA_ARCH_E1 =
+ new MediaSize("NA_ARCH_E1", "android",
+ R.string.mediasize_na_arch_e1, 30000, 42000);
+ /** North America Super B media size: 13" x 19" (330mm x 483mm) */
+ public static final @NonNull MediaSize NA_SUPER_B =
+ new MediaSize("NA_SUPER_B", "android",
+ R.string.mediasize_na_super_b, 13000, 19000);
// Chinese
@@ -792,6 +836,10 @@
public static final MediaSize JPN_YOU4 =
new MediaSize("JPN_YOU4", "android",
R.string.mediasize_japanese_you4, 4134, 9252);
+ /** Japanese Photo L media size: 89mm x 127mm (3.5 x 5") */
+ public static final @NonNull MediaSize OE_PHOTO_L =
+ new MediaSize("OE_PHOTO_L", "android",
+ R.string.mediasize_japanese_l, 3500, 5000);
private final @NonNull String mId;
/**@hide */
diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java
index 8900dfd..c80c025 100755
--- a/core/java/android/text/format/DateFormat.java
+++ b/core/java/android/text/format/DateFormat.java
@@ -267,7 +267,8 @@
DateTimePatternGenerator dtpg = DateTimePatternGenerator.getInstance(locale);
boolean allowDuplicateFields = !CompatChanges.isChangeEnabled(
DISALLOW_DUPLICATE_FIELD_IN_SKELETON);
- return dtpg.getBestPattern(skeleton, allowDuplicateFields);
+ return dtpg.getBestPattern(skeleton, DateTimePatternGenerator.MATCH_NO_OPTIONS,
+ allowDuplicateFields);
}
/**
diff --git a/core/java/android/uwb/AdapterState.aidl b/core/java/android/uwb/AdapterState.aidl
new file mode 100644
index 0000000..991f64a
--- /dev/null
+++ b/core/java/android/uwb/AdapterState.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2021 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.uwb;
+
+/**
+ * @hide
+ */
+@Backing(type="int")
+enum AdapterState {
+ /**
+ * The state when UWB is disabled.
+ */
+ STATE_DISABLED,
+
+ /**
+ * The state when UWB is enabled but has no active sessions.
+ */
+ STATE_ENABLED_INACTIVE,
+
+ /**
+ * The state when UWB is enabled and has active sessions.
+ */
+ STATE_ENABLED_ACTIVE,
+}
\ No newline at end of file
diff --git a/core/java/android/uwb/AdapterStateListener.java b/core/java/android/uwb/AdapterStateListener.java
index 8875af3..b990095 100644
--- a/core/java/android/uwb/AdapterStateListener.java
+++ b/core/java/android/uwb/AdapterStateListener.java
@@ -21,6 +21,7 @@
import android.os.RemoteException;
import android.util.Log;
import android.uwb.UwbManager.AdapterStateCallback;
+import android.uwb.UwbManager.AdapterStateCallback.State;
import android.uwb.UwbManager.AdapterStateCallback.StateChangedReason;
import java.util.HashMap;
@@ -40,7 +41,8 @@
@StateChangedReason
private int mAdapterStateChangeReason = AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN;
- private boolean mAdapterEnabledState = false;
+ @State
+ private int mAdapterState = AdapterStateCallback.STATE_DISABLED;
public AdapterStateListener(@NonNull IUwbAdapter adapter) {
mAdapter = adapter;
@@ -66,7 +68,7 @@
mIsRegistered = true;
} catch (RemoteException e) {
Log.w(TAG, "Failed to register adapter state callback");
- executor.execute(() -> callback.onStateChanged(false,
+ executor.execute(() -> callback.onStateChanged(mAdapterState,
AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN));
}
} else {
@@ -99,6 +101,42 @@
}
}
+ /**
+ * Sets the adapter enabled state
+ *
+ * @param isEnabled value of new adapter state
+ */
+ public void setEnabled(boolean isEnabled) {
+ synchronized (this) {
+ if (!mIsRegistered) {
+ return;
+ } else {
+ try {
+ mAdapter.setEnabled(isEnabled);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed to set adapter state");
+ sendErrorState();
+ }
+ }
+ }
+ }
+
+ private void sendErrorState() {
+ synchronized (this) {
+ for (AdapterStateCallback callback: mCallbackMap.keySet()) {
+ Executor executor = mCallbackMap.get(callback);
+
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ executor.execute(() -> callback.onStateChanged(
+ mAdapterState, mAdapterStateChangeReason));
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+ }
+ }
+
private void sendCurrentState(@NonNull AdapterStateCallback callback) {
synchronized (this) {
Executor executor = mCallbackMap.get(callback);
@@ -106,7 +144,7 @@
final long identity = Binder.clearCallingIdentity();
try {
executor.execute(() -> callback.onStateChanged(
- mAdapterEnabledState, mAdapterStateChangeReason));
+ mAdapterState, mAdapterStateChangeReason));
} finally {
Binder.restoreCallingIdentity(identity);
}
@@ -114,12 +152,13 @@
}
@Override
- public void onAdapterStateChanged(boolean isEnabled, int reason) {
+ public void onAdapterStateChanged(int state, int reason) {
synchronized (this) {
@StateChangedReason int localReason =
convertToStateChangedReason(reason);
- mAdapterEnabledState = isEnabled;
+ @State int localState = convertToState(state);
mAdapterStateChangeReason = localReason;
+ mAdapterState = localState;
for (AdapterStateCallback cb : mCallbackMap.keySet()) {
sendCurrentState(cb);
}
@@ -146,4 +185,18 @@
return AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN;
}
}
+
+ private static @State int convertToState(@AdapterState int state) {
+ switch (state) {
+ case AdapterState.STATE_ENABLED_INACTIVE:
+ return AdapterStateCallback.STATE_ENABLED_INACTIVE;
+
+ case AdapterState.STATE_ENABLED_ACTIVE:
+ return AdapterStateCallback.STATE_ENABLED_ACTIVE;
+
+ case AdapterState.STATE_DISABLED:
+ default:
+ return AdapterStateCallback.STATE_DISABLED;
+ }
+ }
}
diff --git a/core/java/android/uwb/IUwbAdapter.aidl b/core/java/android/uwb/IUwbAdapter.aidl
index 30da248..5804d04 100644
--- a/core/java/android/uwb/IUwbAdapter.aidl
+++ b/core/java/android/uwb/IUwbAdapter.aidl
@@ -145,6 +145,19 @@
*/
void closeRanging(in SessionHandle sessionHandle);
+ /**
+ * Disables or enables UWB for a user
+ *
+ * The provided callback's IUwbAdapterStateCallbacks#onAdapterStateChanged
+ * function must be called immediately following state change.
+ *
+ * @param enabled value representing intent to disable or enable UWB. If
+ * true, any subsequent calls to #openRanging will be allowed. If false,
+ * all active ranging sessions will be closed and subsequent calls to
+ * #openRanging will be disallowed.
+ */
+ void setEnabled(boolean enabled);
+
/**
* The maximum allowed time to open a ranging session.
*/
diff --git a/core/java/android/uwb/IUwbAdapterStateCallbacks.aidl b/core/java/android/uwb/IUwbAdapterStateCallbacks.aidl
index d928eab..d3b34c6 100644
--- a/core/java/android/uwb/IUwbAdapterStateCallbacks.aidl
+++ b/core/java/android/uwb/IUwbAdapterStateCallbacks.aidl
@@ -17,16 +17,17 @@
package android.uwb;
import android.uwb.StateChangeReason;
+import android.uwb.AdapterState;
/**
* @hide
*/
interface IUwbAdapterStateCallbacks {
/**
- * Called whenever the adapter state changes
- *
- * @param isEnabled true if the adapter is enabled, false otherwise
- * @param reason the reason that the state has changed
- */
- void onAdapterStateChanged(boolean isEnabled, StateChangeReason reason);
+ * Called whenever the adapter state changes
+ *
+ * @param state UWB state; enabled_active, enabled_inactive, or disabled.
+ * @param reason the reason that the state has changed
+ */
+ void onAdapterStateChanged(AdapterState state, StateChangeReason reason);
}
\ No newline at end of file
diff --git a/core/java/android/uwb/UwbManager.java b/core/java/android/uwb/UwbManager.java
index 844bbbe..9116c49 100644
--- a/core/java/android/uwb/UwbManager.java
+++ b/core/java/android/uwb/UwbManager.java
@@ -70,6 +70,16 @@
@interface StateChangedReason {}
/**
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(value = {
+ STATE_ENABLED_INACTIVE,
+ STATE_ENABLED_ACTIVE,
+ STATE_DISABLED})
+ @interface State {}
+
+ /**
* Indicates that the state change was due to opening of first UWB session
*/
int STATE_CHANGED_REASON_SESSION_STARTED = 0;
@@ -95,22 +105,41 @@
int STATE_CHANGED_REASON_ERROR_UNKNOWN = 4;
/**
+ * Indicates that UWB is disabled on device
+ */
+ int STATE_DISABLED = 0;
+ /**
+ * Indicates that UWB is enabled on device but has no active ranging sessions
+ */
+ int STATE_ENABLED_INACTIVE = 1;
+
+ /**
+ * Indicates that UWB is enabled and has active ranging session
+ */
+ int STATE_ENABLED_ACTIVE = 2;
+
+ /**
* Invoked when underlying UWB adapter's state is changed
* <p>Invoked with the adapter's current state after registering an
* {@link AdapterStateCallback} using
* {@link UwbManager#registerAdapterStateCallback(Executor, AdapterStateCallback)}.
*
- * <p>Possible values for the state to change are
+ * <p>Possible reasons for the state to change are
* {@link #STATE_CHANGED_REASON_SESSION_STARTED},
* {@link #STATE_CHANGED_REASON_ALL_SESSIONS_CLOSED},
* {@link #STATE_CHANGED_REASON_SYSTEM_POLICY},
* {@link #STATE_CHANGED_REASON_SYSTEM_BOOT},
* {@link #STATE_CHANGED_REASON_ERROR_UNKNOWN}.
*
- * @param isEnabled true when UWB adapter is enabled, false when it is disabled
+ * <p>Possible values for the UWB state are
+ * {@link #STATE_ENABLED_INACTIVE},
+ * {@link #STATE_ENABLED_ACTIVE},
+ * {@link #STATE_DISABLED}.
+ *
+ * @param state the UWB state; inactive, active or disabled
* @param reason the reason for the state change
*/
- void onStateChanged(boolean isEnabled, @StateChangedReason int reason);
+ void onStateChanged(@State int state, @StateChangedReason int reason);
}
/**
@@ -241,4 +270,17 @@
@NonNull RangingSession.Callback callbacks) {
return mRangingManager.openSession(parameters, executor, callbacks);
}
+
+ /**
+ * Disables or enables UWB for a user
+ *
+ * @param enabled value representing intent to disable or enable UWB. If true any subsequent
+ * calls to IUwbAdapter#openRanging will be allowed. If false, all active ranging sessions will
+ * be closed and subsequent calls to IUwbAdapter#openRanging will be disallowed.
+ *
+ * @hide
+ */
+ public void setUwbEnabled(boolean enabled) {
+ mAdapterStateListener.setEnabled(enabled);
+ }
}
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index 6a07f64..68d665f 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -1464,8 +1464,8 @@
PropertyInfo<ExportedProperty, ?>[] properties = sExportProperties.get(klass);
if (properties == null) {
- properties = convertToPropertyInfos(klass.getDeclaredMethodsUnchecked(false),
- klass.getDeclaredFieldsUnchecked(false), ExportedProperty.class);
+ properties = convertToPropertyInfos(klass.getDeclaredMethods(),
+ klass.getDeclaredFields(), ExportedProperty.class);
map.put(klass, properties);
}
return properties;
diff --git a/core/java/android/view/animation/LayoutAnimationController.java b/core/java/android/view/animation/LayoutAnimationController.java
index 7fa49c1..e2b7519 100644
--- a/core/java/android/view/animation/LayoutAnimationController.java
+++ b/core/java/android/view/animation/LayoutAnimationController.java
@@ -27,8 +27,8 @@
import java.util.Random;
/**
- * A layout animation controller is used to animated a layout's, or a view
- * group's, children. Each child uses the same animation but for every one of
+ * A layout animation controller is used to animate the children of a layout or a view
+ * group. Each child uses the same animation but for every one of
* them, the animation starts at a different time. A layout animation controller
* is used by {@link android.view.ViewGroup} to compute the delay by which each
* child's animation start must be offset. The delay is computed by using
diff --git a/core/jni/OWNERS b/core/jni/OWNERS
index 07fb729..a3287c1 100644
--- a/core/jni/OWNERS
+++ b/core/jni/OWNERS
@@ -69,4 +69,8 @@
per-file Android.bp = file:/graphics/java/android/graphics/OWNERS
per-file AndroidRuntime.cpp = file:/graphics/java/android/graphics/OWNERS
# Although marked "view" this is mostly graphics stuff
-per-file android_view_* = file:/graphics/java/android/graphics/OWNERS
\ No newline at end of file
+per-file android_view_* = file:/graphics/java/android/graphics/OWNERS
+
+# VINTF
+per-file android_os_VintfObject* = file:platform/system/libvintf:/OWNERS
+per-file android_os_VintfRuntimeInfo* = file:platform/system/libvintf:/OWNERS
diff --git a/core/jni/android_os_VintfObject.cpp b/core/jni/android_os_VintfObject.cpp
index 25ffbab..4bd33a9 100644
--- a/core/jni/android_os_VintfObject.cpp
+++ b/core/jni/android_os_VintfObject.cpp
@@ -40,12 +40,10 @@
using vintf::HalManifest;
using vintf::Level;
using vintf::SchemaType;
-using vintf::VintfObject;
-using vintf::XmlConverter;
-using vintf::Vndk;
-using vintf::gHalManifestConverter;
-using vintf::gCompatibilityMatrixConverter;
using vintf::to_string;
+using vintf::toXml;
+using vintf::VintfObject;
+using vintf::Vndk;
template<typename V>
static inline jobjectArray toJavaStringArray(JNIEnv* env, const V& v) {
@@ -58,14 +56,13 @@
return ret;
}
-template<typename T>
-static void tryAddSchema(const std::shared_ptr<const T>& object, const XmlConverter<T>& converter,
- const std::string& description,
- std::vector<std::string>* cStrings) {
+template <typename T>
+static void tryAddSchema(const std::shared_ptr<const T>& object, const std::string& description,
+ std::vector<std::string>* cStrings) {
if (object == nullptr) {
LOG(WARNING) << __FUNCTION__ << "Cannot get " << description;
} else {
- cStrings->push_back(converter(*object));
+ cStrings->push_back(toXml(*object));
}
}
@@ -84,14 +81,12 @@
{
std::vector<std::string> cStrings;
- tryAddSchema(VintfObject::GetDeviceHalManifest(), gHalManifestConverter,
- "device manifest", &cStrings);
- tryAddSchema(VintfObject::GetFrameworkHalManifest(), gHalManifestConverter,
- "framework manifest", &cStrings);
- tryAddSchema(VintfObject::GetDeviceCompatibilityMatrix(), gCompatibilityMatrixConverter,
- "device compatibility matrix", &cStrings);
- tryAddSchema(VintfObject::GetFrameworkCompatibilityMatrix(), gCompatibilityMatrixConverter,
- "framework compatibility matrix", &cStrings);
+ tryAddSchema(VintfObject::GetDeviceHalManifest(), "device manifest", &cStrings);
+ tryAddSchema(VintfObject::GetFrameworkHalManifest(), "framework manifest", &cStrings);
+ tryAddSchema(VintfObject::GetDeviceCompatibilityMatrix(), "device compatibility matrix",
+ &cStrings);
+ tryAddSchema(VintfObject::GetFrameworkCompatibilityMatrix(), "framework compatibility matrix",
+ &cStrings);
return toJavaStringArray(env, cStrings);
}
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 4a06671..7876dd2 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -4645,6 +4645,28 @@
<string name="mediasize_na_quarto">Quarto</string>
<!-- North America Foolscap media (paper) size: 8" x 13" (203mm x 330mm) -->
<string name="mediasize_na_foolscap">Foolscap</string>
+ <!-- North America ANSI C media (paper) size: 17" x 22" (432mm x 559mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_ansi_c">ANSI C</string>
+ <!-- North America ANSI D media (paper) size: 22" x 34" (559mm x 864mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_ansi_d">ANSI D</string>
+ <!-- North America ANSI E media (paper) size: 34" x 44" (864mm x 1118mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_ansi_e">ANSI E</string>
+ <!-- North America ANSI F media (paper) size: 28" x 40" (711mm x 1016mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_ansi_f">ANSI F</string>
+ <!-- North America Arch A media (paper) size: 9" x 12" (229mm x 305mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_arch_a">Arch A</string>
+ <!-- North America Arch B media (paper) size: 12" x 18" (305mm x 457mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_arch_b">Arch B</string>
+ <!-- North America Arch C media (paper) size: 18" x 24" (457mm x 610mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_arch_c">Arch C</string>
+ <!-- North America Arch D media (paper) size: 24" x 36" (610mm x 914mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_arch_d">Arch D</string>
+ <!-- North America Arch E media (paper) size: 36" x 48" (914mm x 1219mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_arch_e">Arch E</string>
+ <!-- North America Arch E1 media (paper) size: 30" x 42" (762mm x 1067mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_arch_e1">Arch E1</string>
+ <!-- North America Super B media (paper) size: 13" x 19" (330mm x 483mm) [CHAR LIMIT=none] -->
+ <string name="mediasize_na_super_b">Super B</string>
<!-- Chinese Roc 8k media (paper) size: 270mm x 390mm (10.629" x 15.3543") -->
<string name="mediasize_chinese_roc_8k">ROC 8K</string>
@@ -4724,6 +4746,8 @@
<string name="mediasize_japanese_kaku2">Kaku2</string>
<!-- Japanese You4 media (paper) size: 105mm x 235mm (4.134" x 9.252") -->
<string name="mediasize_japanese_you4">You4</string>
+ <!-- Japanese Photo L (paper) size: 89mm x 127mm (3.5 x 5") [CHAR LIMIT=20] -->
+ <string name="mediasize_japanese_l">L</string>
<!-- Media (paper) size for specifying any paper size in portrait.-->
<string name="mediasize_unknown_portrait">Unknown portrait</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 2901de5..c06e7de 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1143,6 +1143,17 @@
<java-symbol type="string" name="mediasize_na_monarch" />
<java-symbol type="string" name="mediasize_na_quarto" />
<java-symbol type="string" name="mediasize_na_foolscap" />
+ <java-symbol type="string" name="mediasize_na_ansi_c" />
+ <java-symbol type="string" name="mediasize_na_ansi_d" />
+ <java-symbol type="string" name="mediasize_na_ansi_e" />
+ <java-symbol type="string" name="mediasize_na_ansi_f" />
+ <java-symbol type="string" name="mediasize_na_arch_a" />
+ <java-symbol type="string" name="mediasize_na_arch_b" />
+ <java-symbol type="string" name="mediasize_na_arch_c" />
+ <java-symbol type="string" name="mediasize_na_arch_d" />
+ <java-symbol type="string" name="mediasize_na_arch_e" />
+ <java-symbol type="string" name="mediasize_na_arch_e1" />
+ <java-symbol type="string" name="mediasize_na_super_b" />
<java-symbol type="string" name="mediasize_chinese_roc_8k" />
<java-symbol type="string" name="mediasize_chinese_roc_16k" />
<java-symbol type="string" name="mediasize_chinese_prc_1" />
@@ -1179,6 +1190,7 @@
<java-symbol type="string" name="mediasize_japanese_kahu" />
<java-symbol type="string" name="mediasize_japanese_kaku2" />
<java-symbol type="string" name="mediasize_japanese_you4" />
+ <java-symbol type="string" name="mediasize_japanese_l" />
<java-symbol type="string" name="network_partial_connectivity" />
<java-symbol type="string" name="network_partial_connectivity_detailed" />
<java-symbol type="string" name="reason_service_unavailable" />
diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk b/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
index cba9cbd..d9e6151 100644
--- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
+++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
@@ -24,6 +24,9 @@
LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
LOCAL_PACKAGE_NAME := DownloadManagerTestApp
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_PRIVATE_PLATFORM_APIS := true
ifneq ($(TARGET_BUILD_VARIANT),user)
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyAndException/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyAndException/Android.mk
index cc2d8d2..2d8556f 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyAndException/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyAndException/Android.mk
@@ -26,6 +26,9 @@
LOCAL_SDK_VERSION := 8
LOCAL_PACKAGE_NAME := MultiDexLegacyAndException
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_DEX_PREOPT := false
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/Android.mk
index fe7c944..d7af2d9 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/Android.mk
@@ -26,6 +26,9 @@
LOCAL_SDK_VERSION := 8
LOCAL_PACKAGE_NAME := MultiDexLegacyTestApp
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_DEX_PREOPT := false
@@ -59,6 +62,9 @@
LOCAL_SDK_VERSION := 8
LOCAL_PACKAGE_NAME := MultiDexLegacyTestApp2
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_DEX_PREOPT := false
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests/Android.mk
index 69ec5ce..236c740 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests/Android.mk
@@ -26,6 +26,9 @@
LOCAL_SDK_VERSION := 8
LOCAL_PACKAGE_NAME := MultiDexLegacyTestAppTests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_DEX_PREOPT := false
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2/Android.mk
index 2dc30ea..6f6ccfe 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2/Android.mk
@@ -26,6 +26,9 @@
LOCAL_SDK_VERSION := current
LOCAL_PACKAGE_NAME := MultiDexLegacyTestAppTests2
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_DEX_PREOPT := false
@@ -49,6 +52,9 @@
LOCAL_SDK_VERSION := 8
LOCAL_PACKAGE_NAME := MultiDexLegacyTestAppTests2-multidex
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_DEX_PREOPT := false
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/Android.mk
index a6f87ea..33a46ea 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/Android.mk
@@ -23,6 +23,9 @@
LOCAL_SDK_VERSION := 18
LOCAL_PACKAGE_NAME := MultiDexLegacyTestApp_corrupted
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
index 3636c73..efc0688 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
@@ -23,6 +23,9 @@
LOCAL_SDK_VERSION := 9
LOCAL_PACKAGE_NAME := MultiDexLegacyTestServices
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
index afbcd46..3920fd6 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
@@ -21,6 +21,9 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := MultiDexLegacyTestServicesTests2
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_JAVA_LIBRARIES := android-support-multidex
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
@@ -30,4 +33,3 @@
LOCAL_DEX_PREOPT := false
include $(BUILD_PACKAGE)
-
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v1/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v1/Android.mk
index 67f1fa5..2323ad9 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v1/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v1/Android.mk
@@ -23,6 +23,9 @@
LOCAL_SDK_VERSION := 9
LOCAL_PACKAGE_NAME := MultiDexLegacyVersionedTestApp_v1
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v2/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v2/Android.mk
index 33871e5..79a5906 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v2/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v2/Android.mk
@@ -23,6 +23,9 @@
LOCAL_SDK_VERSION := 9
LOCAL_PACKAGE_NAME := MultiDexLegacyVersionedTestApp_v2
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v3/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v3/Android.mk
index 1b267ee..521bad0 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v3/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v3/Android.mk
@@ -23,6 +23,9 @@
LOCAL_SDK_VERSION := 9
LOCAL_PACKAGE_NAME := MultiDexLegacyVersionedTestApp_v3
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_STATIC_JAVA_LIBRARIES := android-support-multidex
@@ -43,4 +46,3 @@
echo "com/android/framework/multidexlegacyversionedtestapp/MultiDexUpdateTest.class" >> $@
$(built_dex_intermediate): $(mainDexList)
-
diff --git a/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk b/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
index f3c0abd..b453cde9 100644
--- a/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
+++ b/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
@@ -19,6 +19,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayHostTests_NonPlatformSignatureOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_bad
@@ -27,6 +30,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayHostTests_PlatformSignatureStaticOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
@@ -37,6 +43,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayHostTests_PlatformSignatureOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
diff --git a/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk b/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk
index 878f05d..77fc887 100644
--- a/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk
+++ b/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk
@@ -18,6 +18,9 @@
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_PACKAGE_NAME := OverlayHostTests_UpdateOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
@@ -30,6 +33,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayHostTests_FrameworkOverlayV1
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
@@ -42,6 +48,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayHostTests_FrameworkOverlayV2
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
@@ -56,6 +65,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayHostTests_AppOverlayV1
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v1
@@ -67,6 +79,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := OverlayHostTests_AppOverlayV2
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v2
diff --git a/core/tests/uwbtests/src/android/uwb/AdapterStateListenerTest.java b/core/tests/uwbtests/src/android/uwb/AdapterStateListenerTest.java
index ce67ef7..bdaf630 100644
--- a/core/tests/uwbtests/src/android/uwb/AdapterStateListenerTest.java
+++ b/core/tests/uwbtests/src/android/uwb/AdapterStateListenerTest.java
@@ -17,7 +17,6 @@
package android.uwb;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doThrow;
@@ -55,7 +54,7 @@
Object[] args = invocation.getArguments();
IUwbAdapterStateCallbacks cb = (IUwbAdapterStateCallbacks) args[0];
try {
- cb.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+ cb.onAdapterStateChanged(AdapterState.STATE_DISABLED, StateChangeReason.UNKNOWN);
} catch (RemoteException e) {
// Nothing to do
}
@@ -76,7 +75,7 @@
private static void verifyCallbackStateChangedInvoked(
AdapterStateCallback callback, int numTimes) {
- verify(callback, times(numTimes)).onStateChanged(anyBoolean(), anyInt());
+ verify(callback, times(numTimes)).onStateChanged(anyInt(), anyInt());
}
@Test
@@ -151,7 +150,8 @@
verifyCallbackStateChangedInvoked(callback, 1);
// Invoke a state change and ensure the callback is only called once
- adapterStateListener.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+ adapterStateListener.onAdapterStateChanged(AdapterState.STATE_DISABLED,
+ StateChangeReason.UNKNOWN);
verifyCallbackStateChangedInvoked(callback, 2);
}
@@ -182,13 +182,15 @@
verifyCallbackStateChangedInvoked(callback, 0);
// Manually invoke the callback and ensure callback is not invoked
- adapterStateListener.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+ adapterStateListener.onAdapterStateChanged(AdapterState.STATE_DISABLED,
+ StateChangeReason.UNKNOWN);
verify(executor, times(2)).execute(any());
verifyCallbackStateChangedInvoked(callback, 0);
// Run the command that the executor receives
doAnswer(new ExecutorAnswer(true)).when(executor).execute(any());
- adapterStateListener.onAdapterStateChanged(false, StateChangeReason.UNKNOWN);
+ adapterStateListener.onAdapterStateChanged(AdapterState.STATE_DISABLED,
+ StateChangeReason.UNKNOWN);
verify(executor, times(3)).execute(any());
verifyCallbackStateChangedInvoked(callback, 1);
}
@@ -227,7 +229,8 @@
}
// Invoke a state change and ensure all callbacks are invoked
- adapterStateListener.onAdapterStateChanged(true, StateChangeReason.ALL_SESSIONS_CLOSED);
+ adapterStateListener.onAdapterStateChanged(AdapterState.STATE_DISABLED,
+ StateChangeReason.ALL_SESSIONS_CLOSED);
for (AdapterStateCallback callback : callbacks) {
verifyCallbackStateChangedInvoked(callback, 2);
}
@@ -242,32 +245,36 @@
adapterStateListener.register(getExecutor(), callback);
runStateChangeValue(StateChangeReason.ALL_SESSIONS_CLOSED,
- AdapterStateCallback.STATE_CHANGED_REASON_ALL_SESSIONS_CLOSED);
+ AdapterState.STATE_ENABLED_INACTIVE,
+ AdapterStateCallback.STATE_CHANGED_REASON_ALL_SESSIONS_CLOSED,
+ AdapterStateCallback.STATE_ENABLED_INACTIVE);
- runStateChangeValue(StateChangeReason.SESSION_STARTED,
- AdapterStateCallback.STATE_CHANGED_REASON_SESSION_STARTED);
+ runStateChangeValue(StateChangeReason.SESSION_STARTED, AdapterState.STATE_ENABLED_ACTIVE,
+ AdapterStateCallback.STATE_CHANGED_REASON_SESSION_STARTED,
+ AdapterStateCallback.STATE_ENABLED_ACTIVE);
- runStateChangeValue(StateChangeReason.SYSTEM_BOOT,
- AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_BOOT);
+ runStateChangeValue(StateChangeReason.SYSTEM_BOOT, AdapterState.STATE_DISABLED,
+ AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_BOOT,
+ AdapterStateCallback.STATE_DISABLED);
- runStateChangeValue(StateChangeReason.SYSTEM_POLICY,
- AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_POLICY);
+ runStateChangeValue(StateChangeReason.SYSTEM_POLICY, AdapterState.STATE_DISABLED,
+ AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_POLICY,
+ AdapterStateCallback.STATE_DISABLED);
- runStateChangeValue(StateChangeReason.UNKNOWN,
- AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN);
+ runStateChangeValue(StateChangeReason.UNKNOWN, AdapterState.STATE_DISABLED,
+ AdapterStateCallback.STATE_CHANGED_REASON_ERROR_UNKNOWN,
+ AdapterStateCallback.STATE_DISABLED);
}
- private void runStateChangeValue(@StateChangeReason int reasonIn,
- @AdapterStateCallback.StateChangedReason int reasonOut) {
+ private void runStateChangeValue(@StateChangeReason int reasonIn, @AdapterState int stateIn,
+ @AdapterStateCallback.StateChangedReason int reasonOut,
+ @AdapterStateCallback.State int stateOut) {
AdapterStateListener adapterStateListener = new AdapterStateListener(mUwbAdapter);
AdapterStateCallback callback = mock(AdapterStateCallback.class);
adapterStateListener.register(getExecutor(), callback);
- adapterStateListener.onAdapterStateChanged(false, reasonIn);
- verify(callback, times(1)).onStateChanged(false, reasonOut);
-
- adapterStateListener.onAdapterStateChanged(true, reasonIn);
- verify(callback, times(1)).onStateChanged(true, reasonOut);
+ adapterStateListener.onAdapterStateChanged(stateIn, reasonIn);
+ verify(callback, times(1)).onStateChanged(stateOut, reasonOut);
}
@Test
@@ -280,7 +287,8 @@
Object[] args = invocation.getArguments();
IUwbAdapterStateCallbacks cb = (IUwbAdapterStateCallbacks) args[0];
try {
- cb.onAdapterStateChanged(true, StateChangeReason.SESSION_STARTED);
+ cb.onAdapterStateChanged(AdapterState.STATE_ENABLED_ACTIVE,
+ StateChangeReason.SESSION_STARTED);
} catch (RemoteException e) {
// Nothing to do
}
@@ -291,7 +299,7 @@
doAnswer(registerAnswer).when(mUwbAdapter).registerAdapterStateCallbacks(any());
adapterStateListener.register(getExecutor(), callback);
- verify(callback).onStateChanged(true,
+ verify(callback).onStateChanged(AdapterStateCallback.STATE_ENABLED_ACTIVE,
AdapterStateCallback.STATE_CHANGED_REASON_SESSION_STARTED);
}
@@ -302,10 +310,11 @@
AdapterStateCallback callback2 = mock(AdapterStateCallback.class);
adapterStateListener.register(getExecutor(), callback1);
- adapterStateListener.onAdapterStateChanged(true, StateChangeReason.SYSTEM_BOOT);
+ adapterStateListener.onAdapterStateChanged(AdapterState.STATE_ENABLED_ACTIVE,
+ StateChangeReason.SYSTEM_BOOT);
adapterStateListener.register(getExecutor(), callback2);
- verify(callback2).onStateChanged(true,
+ verify(callback2).onStateChanged(AdapterStateCallback.STATE_ENABLED_ACTIVE,
AdapterStateCallback.STATE_CHANGED_REASON_SYSTEM_BOOT);
}
}
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index c51248d..915fb1e 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -190,6 +190,7 @@
<assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="statsd" />
<assign-permission name="android.permission.REGISTER_STATS_PULL_ATOM" uid="gpu_service" />
+ <assign-permission name="android.permission.REGISTER_STATS_PULL_ATOM" uid="keystore" />
<split-permission name="android.permission.ACCESS_FINE_LOCATION">
<new-permission name="android.permission.ACCESS_COARSE_LOCATION" />
diff --git a/keystore/java/android/security/AndroidKeyStoreMaintenance.java b/keystore/java/android/security/AndroidKeyStoreMaintenance.java
index 82639de..919a93b 100644
--- a/keystore/java/android/security/AndroidKeyStoreMaintenance.java
+++ b/keystore/java/android/security/AndroidKeyStoreMaintenance.java
@@ -22,6 +22,7 @@
import android.os.ServiceSpecificException;
import android.security.maintenance.IKeystoreMaintenance;
import android.system.keystore2.Domain;
+import android.system.keystore2.KeyDescriptor;
import android.system.keystore2.ResponseCode;
import android.util.Log;
@@ -33,6 +34,9 @@
private static final String TAG = "AndroidKeyStoreMaintenance";
public static final int SYSTEM_ERROR = ResponseCode.SYSTEM_ERROR;
+ public static final int INVALID_ARGUMENT = ResponseCode.INVALID_ARGUMENT;
+ public static final int PERMISSION_DENIED = ResponseCode.PERMISSION_DENIED;
+ public static final int KEY_NOT_FOUND = ResponseCode.KEY_NOT_FOUND;
private static IKeystoreMaintenance getService() {
return IKeystoreMaintenance.Stub.asInterface(
@@ -148,4 +152,35 @@
Log.e(TAG, "Error while reporting device off body event.", e);
}
}
+
+ /**
+ * Migrates a key given by the source descriptor to the location designated by the destination
+ * descriptor.
+ *
+ * @param source - The key to migrate may be specified by Domain.APP, Domain.SELINUX, or
+ * Domain.KEY_ID. The caller needs the permissions use, delete, and grant for the
+ * source namespace.
+ * @param destination - The new designation for the key may be specified by Domain.APP or
+ * Domain.SELINUX. The caller need the permission rebind for the destination
+ * namespace.
+ *
+ * @return * 0 on success
+ * * KEY_NOT_FOUND if the source did not exists.
+ * * PERMISSION_DENIED if any of the required permissions was missing.
+ * * INVALID_ARGUMENT if the destination was occupied or any domain value other than
+ * the allowed once were specified.
+ * * SYSTEM_ERROR if an unexpected error occurred.
+ */
+ public static int migrateKeyNamespace(KeyDescriptor source, KeyDescriptor destination) {
+ try {
+ getService().migrateKeyNamespace(source, destination);
+ return 0;
+ } catch (ServiceSpecificException e) {
+ Log.e(TAG, "migrateKeyNamespace failed", e);
+ return e.errorCode;
+ } catch (Exception e) {
+ Log.e(TAG, "Can not connect to keystore", e);
+ return SYSTEM_ERROR;
+ }
+ }
}
diff --git a/keystore/java/android/security/keystore/KeyProperties.java b/keystore/java/android/security/keystore/KeyProperties.java
index 682d12a..d9a7994 100644
--- a/keystore/java/android/security/keystore/KeyProperties.java
+++ b/keystore/java/android/security/keystore/KeyProperties.java
@@ -904,6 +904,7 @@
@IntDef(prefix = { "NAMESPACE_" }, value = {
NAMESPACE_APPLICATION,
NAMESPACE_WIFI,
+ NAMESPACE_LOCKSETTINGS,
})
public @interface Namespace {}
@@ -925,6 +926,13 @@
public static final int NAMESPACE_WIFI = 102;
/**
+ * The namespace identifier for the LOCKSETTINGS Keystore namespace.
+ * This must be kept in sync with system/sepolicy/private/keystore2_key_contexts
+ * @hide
+ */
+ public static final int NAMESPACE_LOCKSETTINGS = 103;
+
+ /**
* For legacy support, translate namespaces into known UIDs.
* @hide
*/
diff --git a/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java b/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java
index 0006b92..850c551 100644
--- a/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java
+++ b/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java
@@ -40,6 +40,7 @@
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.List;
+import java.util.Random;
/**
* Assorted utility methods for implementing crypto operations on top of KeyStore.
@@ -49,6 +50,7 @@
abstract class KeyStoreCryptoOperationUtils {
private static volatile SecureRandom sRng;
+ private static final Random sRandom = new Random();
private KeyStoreCryptoOperationUtils() {}
@@ -211,7 +213,7 @@
} else {
// Keystore won't give us an operation challenge if the operation doesn't
// need user authorization. So we make our own.
- return Math.randomLongInternal();
+ return sRandom.nextLong();
}
}
}
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index 1bfa999..13c6907 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -108,6 +108,15 @@
* <tr><td>{@link #KEY_ENCODER_DELAY}</td><td>Integer</td><td>optional, the number of frames to trim from the start of the decoded audio stream.</td></tr>
* <tr><td>{@link #KEY_ENCODER_PADDING}</td><td>Integer</td><td>optional, the number of frames to trim from the end of the decoded audio stream.</td></tr>
* <tr><td>{@link #KEY_FLAC_COMPRESSION_LEVEL}</td><td>Integer</td><td><b>encoder-only</b>, optional, if content is FLAC audio, specifies the desired compression level.</td></tr>
+ * <tr><td>{@link #KEY_MPEGH_PROFILE_LEVEL_INDICATION}</td><td>Integer</td>
+ * <td><b>decoder-only</b>, optional, if content is MPEG-H audio,
+ * specifies the profile and level of the stream.</td></tr>
+ * <tr><td>{@link #KEY_MPEGH_COMPATIBLE_SETS}</td><td>ByteBuffer</td>
+ * <td><b>decoder-only</b>, optional, if content is MPEG-H audio,
+ * specifies the compatible sets (profile and level) of the stream.</td></tr>
+ * <tr><td>{@link #KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT}</td>
+ * <td>Integer</td><td><b>decoder-only</b>, optional, if content is MPEG-H audio,
+ * specifies the preferred reference channel layout of the stream.</td></tr>
* </table>
*
* Subtitle formats have the following keys:
@@ -807,6 +816,30 @@
public static final String KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level";
/**
+ * A key describing the MPEG-H stream profile-level indication.
+ *
+ * See ISO_IEC_23008-3;2019 MHADecoderConfigurationRecord mpegh3daProfileLevelIndication.
+ */
+ public static final String KEY_MPEGH_PROFILE_LEVEL_INDICATION =
+ "mpegh-profile-level-indication";
+
+ /**
+ * A key describing the MPEG-H stream compatible sets.
+ *
+ * See FDAmd_2 of ISO_IEC_23008-3;2019 MHAProfileAndLevelCompatibilitySetBox.
+ */
+ public static final String KEY_MPEGH_COMPATIBLE_SETS = "mpegh-compatible-sets";
+
+ /**
+ * A key describing the MPEG-H stream reference channel layout.
+ *
+ * See ISO_IEC_23008-3;2019 MHADecoderConfigurationRecord referenceChannelLayout
+ * and ISO_IEC_23001‐8 ChannelConfiguration value.
+ */
+ public static final String KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT =
+ "mpegh-reference-channel-layout";
+
+ /**
* A key describing the encoding complexity.
* The associated value is an integer. These values are device and codec specific,
* but lower values generally result in faster and/or less power-hungry encoding.
diff --git a/packages/CarSystemUI/tests/Android.mk b/packages/CarSystemUI/tests/Android.mk
index 1366568..02e6db2 100644
--- a/packages/CarSystemUI/tests/Android.mk
+++ b/packages/CarSystemUI/tests/Android.mk
@@ -22,6 +22,9 @@
LOCAL_DX_FLAGS := --multi-dex
LOCAL_PACKAGE_NAME := CarSystemUITests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
diff --git a/packages/Connectivity/framework/api/system-current.txt b/packages/Connectivity/framework/api/system-current.txt
index de673ee..935b093 100644
--- a/packages/Connectivity/framework/api/system-current.txt
+++ b/packages/Connectivity/framework/api/system-current.txt
@@ -275,7 +275,7 @@
method @NonNull public int[] getAdministratorUids();
method @Nullable public static String getCapabilityCarrierName(int);
method @Nullable public String getSsid();
- method @NonNull public java.util.Set<java.lang.Integer> getSubIds();
+ method @NonNull public java.util.Set<java.lang.Integer> getSubscriptionIds();
method @NonNull public int[] getTransportTypes();
method public boolean isPrivateDnsBroken();
method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities);
@@ -306,7 +306,7 @@
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setRequestorUid(int);
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkCapabilities.Builder setSignalStrength(int);
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setSsid(@Nullable String);
- method @NonNull public android.net.NetworkCapabilities.Builder setSubIds(@NonNull java.util.Set<java.lang.Integer>);
+ method @NonNull public android.net.NetworkCapabilities.Builder setSubscriptionIds(@NonNull java.util.Set<java.lang.Integer>);
method @NonNull public android.net.NetworkCapabilities.Builder setTransportInfo(@Nullable android.net.TransportInfo);
}
@@ -329,7 +329,7 @@
public static class NetworkRequest.Builder {
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkRequest.Builder setSignalStrength(int);
- method @NonNull public android.net.NetworkRequest.Builder setSubIds(@NonNull java.util.Set<java.lang.Integer>);
+ method @NonNull public android.net.NetworkRequest.Builder setSubscriptionIds(@NonNull java.util.Set<java.lang.Integer>);
}
public final class NetworkScore implements android.os.Parcelable {
diff --git a/packages/Connectivity/framework/src/android/net/NetworkCapabilities.java b/packages/Connectivity/framework/src/android/net/NetworkCapabilities.java
index a43dd15..937a9d2 100644
--- a/packages/Connectivity/framework/src/android/net/NetworkCapabilities.java
+++ b/packages/Connectivity/framework/src/android/net/NetworkCapabilities.java
@@ -1733,7 +1733,7 @@
combineSSIDs(nc);
combineRequestor(nc);
combineAdministratorUids(nc);
- combineSubIds(nc);
+ combineSubscriptionIds(nc);
}
/**
@@ -1755,7 +1755,7 @@
&& (onlyImmutable || satisfiedByUids(nc))
&& (onlyImmutable || satisfiedBySSID(nc))
&& (onlyImmutable || satisfiedByRequestor(nc))
- && (onlyImmutable || satisfiedBySubIds(nc)));
+ && (onlyImmutable || satisfiedBySubscriptionIds(nc)));
}
/**
@@ -1852,7 +1852,7 @@
&& equalsPrivateDnsBroken(that)
&& equalsRequestor(that)
&& equalsAdministratorUids(that)
- && equalsSubIds(that);
+ && equalsSubscriptionIds(that);
}
@Override
@@ -2329,7 +2329,7 @@
* @hide
*/
@NonNull
- public NetworkCapabilities setSubIds(@NonNull Set<Integer> subIds) {
+ public NetworkCapabilities setSubscriptionIds(@NonNull Set<Integer> subIds) {
mSubIds = new ArraySet(Objects.requireNonNull(subIds));
return this;
}
@@ -2345,14 +2345,14 @@
*/
@NonNull
@SystemApi
- public Set<Integer> getSubIds() {
+ public Set<Integer> getSubscriptionIds() {
return new ArraySet<>(mSubIds);
}
/**
* Tests if the subscription ID set of this network is the same as that of the passed one.
*/
- private boolean equalsSubIds(@NonNull NetworkCapabilities nc) {
+ private boolean equalsSubscriptionIds(@NonNull NetworkCapabilities nc) {
return Objects.equals(mSubIds, nc.mSubIds);
}
@@ -2361,7 +2361,7 @@
* If specified in the request, the passed one need to have at least one subId and at least
* one of them needs to be in the request set.
*/
- private boolean satisfiedBySubIds(@NonNull NetworkCapabilities nc) {
+ private boolean satisfiedBySubscriptionIds(@NonNull NetworkCapabilities nc) {
if (mSubIds.isEmpty()) return true;
if (nc.mSubIds.isEmpty()) return false;
for (final Integer subId : nc.mSubIds) {
@@ -2378,7 +2378,7 @@
* <p>If both subscription IDs are not equal, they belong to different subscription
* (or no subscription). In this case, it would not make sense to add them together.
*/
- private void combineSubIds(@NonNull NetworkCapabilities nc) {
+ private void combineSubscriptionIds(@NonNull NetworkCapabilities nc) {
if (!Objects.equals(mSubIds, nc.mSubIds)) {
throw new IllegalStateException("Can't combine two subscription ID sets");
}
@@ -2720,8 +2720,8 @@
*/
@NonNull
@SystemApi
- public Builder setSubIds(@NonNull final Set<Integer> subIds) {
- mCaps.setSubIds(subIds);
+ public Builder setSubscriptionIds(@NonNull final Set<Integer> subIds) {
+ mCaps.setSubscriptionIds(subIds);
return this;
}
diff --git a/packages/Connectivity/framework/src/android/net/NetworkRequest.java b/packages/Connectivity/framework/src/android/net/NetworkRequest.java
index 3a8a07a..8c4f419 100644
--- a/packages/Connectivity/framework/src/android/net/NetworkRequest.java
+++ b/packages/Connectivity/framework/src/android/net/NetworkRequest.java
@@ -220,6 +220,10 @@
public Builder(@NonNull final NetworkRequest request) {
Objects.requireNonNull(request);
mNetworkCapabilities = request.networkCapabilities;
+ // If the caller constructed the builder from a request, it means the user
+ // might explicitly want the capabilities from the request. Thus, the NOT_VCN_MANAGED
+ // capabilities should not be touched later.
+ mModifiedNotVcnManaged = true;
}
/**
@@ -508,8 +512,8 @@
*/
@NonNull
@SystemApi
- public Builder setSubIds(@NonNull Set<Integer> subIds) {
- mNetworkCapabilities.setSubIds(subIds);
+ public Builder setSubscriptionIds(@NonNull Set<Integer> subIds) {
+ mNetworkCapabilities.setSubscriptionIds(subIds);
return this;
}
}
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index 7609412..4a64d6b 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -461,6 +461,7 @@
<!-- Permission required for CTS test - CtsUwbTestCases -->
<uses-permission android:name="android.permission.UWB_PRIVILEGED" />
+ <uses-permission android:name="android.permission.UWB_RANGING" />
<!-- Permission required for CTS test - CtsAlarmManagerTestCases -->
<uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
diff --git a/packages/SystemUI/tests/Android.mk b/packages/SystemUI/tests/Android.mk
index 38da21e..ff5165d 100644
--- a/packages/SystemUI/tests/Android.mk
+++ b/packages/SystemUI/tests/Android.mk
@@ -22,6 +22,9 @@
LOCAL_DX_FLAGS := --multi-dex
LOCAL_PACKAGE_NAME := SystemUITests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
diff --git a/packages/overlays/AccentColorAmethystOverlay/Android.mk b/packages/overlays/AccentColorAmethystOverlay/Android.mk
index cd10ca3..5354158 100644
--- a/packages/overlays/AccentColorAmethystOverlay/Android.mk
+++ b/packages/overlays/AccentColorAmethystOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorAmethystOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorAquamarineOverlay/Android.mk b/packages/overlays/AccentColorAquamarineOverlay/Android.mk
index 09ae450..8ef37d1 100644
--- a/packages/overlays/AccentColorAquamarineOverlay/Android.mk
+++ b/packages/overlays/AccentColorAquamarineOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorAquamarineOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorBlackOverlay/Android.mk b/packages/overlays/AccentColorBlackOverlay/Android.mk
index 86d873dc..0e771f1 100644
--- a/packages/overlays/AccentColorBlackOverlay/Android.mk
+++ b/packages/overlays/AccentColorBlackOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorBlackOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorCarbonOverlay/Android.mk b/packages/overlays/AccentColorCarbonOverlay/Android.mk
index 5641e8e..f5b15ef 100644
--- a/packages/overlays/AccentColorCarbonOverlay/Android.mk
+++ b/packages/overlays/AccentColorCarbonOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorCarbonOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorCinnamonOverlay/Android.mk b/packages/overlays/AccentColorCinnamonOverlay/Android.mk
index a8d3f10..74709b8 100644
--- a/packages/overlays/AccentColorCinnamonOverlay/Android.mk
+++ b/packages/overlays/AccentColorCinnamonOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorCinnamonOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorGreenOverlay/Android.mk b/packages/overlays/AccentColorGreenOverlay/Android.mk
index c3aa6a8..c663a95 100644
--- a/packages/overlays/AccentColorGreenOverlay/Android.mk
+++ b/packages/overlays/AccentColorGreenOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorGreenOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorOceanOverlay/Android.mk b/packages/overlays/AccentColorOceanOverlay/Android.mk
index 96fbee4..3edbddd 100644
--- a/packages/overlays/AccentColorOceanOverlay/Android.mk
+++ b/packages/overlays/AccentColorOceanOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorOceanOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorOrchidOverlay/Android.mk b/packages/overlays/AccentColorOrchidOverlay/Android.mk
index 352e36b..5218e4b 100644
--- a/packages/overlays/AccentColorOrchidOverlay/Android.mk
+++ b/packages/overlays/AccentColorOrchidOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorOrchidOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorPaletteOverlay/Android.mk b/packages/overlays/AccentColorPaletteOverlay/Android.mk
index e207f61..481f0c9 100644
--- a/packages/overlays/AccentColorPaletteOverlay/Android.mk
+++ b/packages/overlays/AccentColorPaletteOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorPaletteOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorPurpleOverlay/Android.mk b/packages/overlays/AccentColorPurpleOverlay/Android.mk
index 29d5fc9..637cb90 100644
--- a/packages/overlays/AccentColorPurpleOverlay/Android.mk
+++ b/packages/overlays/AccentColorPurpleOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorPurpleOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorSandOverlay/Android.mk b/packages/overlays/AccentColorSandOverlay/Android.mk
index c37455a..32e9ab1 100644
--- a/packages/overlays/AccentColorSandOverlay/Android.mk
+++ b/packages/overlays/AccentColorSandOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorSandOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorSpaceOverlay/Android.mk b/packages/overlays/AccentColorSpaceOverlay/Android.mk
index cbddf63..c9bf443 100644
--- a/packages/overlays/AccentColorSpaceOverlay/Android.mk
+++ b/packages/overlays/AccentColorSpaceOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorSpaceOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorTangerineOverlay/Android.mk b/packages/overlays/AccentColorTangerineOverlay/Android.mk
index 0d676bb..1d23c83 100644
--- a/packages/overlays/AccentColorTangerineOverlay/Android.mk
+++ b/packages/overlays/AccentColorTangerineOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := AccentColorTangerineOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk
index c3e8642..435465d 100644
--- a/packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk
@@ -9,6 +9,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := DisplayCutoutEmulationCornerOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationDoubleOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationDoubleOverlay/Android.mk
index 09d158d..1abeaa5 100644
--- a/packages/overlays/DisplayCutoutEmulationDoubleOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationDoubleOverlay/Android.mk
@@ -9,6 +9,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := DisplayCutoutEmulationDoubleOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationHoleOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationHoleOverlay/Android.mk
index 6d8fc24..4145371 100644
--- a/packages/overlays/DisplayCutoutEmulationHoleOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationHoleOverlay/Android.mk
@@ -9,6 +9,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := DisplayCutoutEmulationHoleOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk
index 6a1c09c..6639562 100644
--- a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk
@@ -9,6 +9,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := DisplayCutoutEmulationNarrowOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk
index cbceff0..bf38e1e 100644
--- a/packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk
@@ -9,6 +9,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := DisplayCutoutEmulationTallOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/Android.mk
index b6b6dd1..a2458d6 100644
--- a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/Android.mk
@@ -9,6 +9,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := DisplayCutoutEmulationWaterfallOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk
index 82a076a..e5e8102 100644
--- a/packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk
@@ -9,6 +9,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := DisplayCutoutEmulationWideOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/FontNotoSerifSourceOverlay/Android.mk b/packages/overlays/FontNotoSerifSourceOverlay/Android.mk
index 16a0173..83d1ecc 100644
--- a/packages/overlays/FontNotoSerifSourceOverlay/Android.mk
+++ b/packages/overlays/FontNotoSerifSourceOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := FontNotoSerifSourceOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackCircularAndroidOverlay/Android.mk b/packages/overlays/IconPackCircularAndroidOverlay/Android.mk
index d96185f..2a5bdf4 100644
--- a/packages/overlays/IconPackCircularAndroidOverlay/Android.mk
+++ b/packages/overlays/IconPackCircularAndroidOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackCircularAndroidOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackCircularLauncherOverlay/Android.mk b/packages/overlays/IconPackCircularLauncherOverlay/Android.mk
index d736d7d..24da2c3 100644
--- a/packages/overlays/IconPackCircularLauncherOverlay/Android.mk
+++ b/packages/overlays/IconPackCircularLauncherOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackCircularLauncherOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackCircularSettingsOverlay/Android.mk b/packages/overlays/IconPackCircularSettingsOverlay/Android.mk
index ea2da30..a3edd96 100644
--- a/packages/overlays/IconPackCircularSettingsOverlay/Android.mk
+++ b/packages/overlays/IconPackCircularSettingsOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackCircularSettingsOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/Android.mk b/packages/overlays/IconPackCircularSystemUIOverlay/Android.mk
index 9045e8e..c5a32c6 100644
--- a/packages/overlays/IconPackCircularSystemUIOverlay/Android.mk
+++ b/packages/overlays/IconPackCircularSystemUIOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackCircularSystemUIOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/Android.mk b/packages/overlays/IconPackCircularThemePickerOverlay/Android.mk
index c2d472d..64ac8cb 100644
--- a/packages/overlays/IconPackCircularThemePickerOverlay/Android.mk
+++ b/packages/overlays/IconPackCircularThemePickerOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackCircularThemePickerOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackFilledAndroidOverlay/Android.mk b/packages/overlays/IconPackFilledAndroidOverlay/Android.mk
index 78db765..bbe13d2 100644
--- a/packages/overlays/IconPackFilledAndroidOverlay/Android.mk
+++ b/packages/overlays/IconPackFilledAndroidOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackFilledAndroidOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackFilledLauncherOverlay/Android.mk b/packages/overlays/IconPackFilledLauncherOverlay/Android.mk
index 16b8f52..c331c61 100644
--- a/packages/overlays/IconPackFilledLauncherOverlay/Android.mk
+++ b/packages/overlays/IconPackFilledLauncherOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackFilledLauncherOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackFilledSettingsOverlay/Android.mk b/packages/overlays/IconPackFilledSettingsOverlay/Android.mk
index d4e9000..855d9d3 100644
--- a/packages/overlays/IconPackFilledSettingsOverlay/Android.mk
+++ b/packages/overlays/IconPackFilledSettingsOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackFilledSettingsOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/Android.mk b/packages/overlays/IconPackFilledSystemUIOverlay/Android.mk
index 35e157a..36e9c5c 100644
--- a/packages/overlays/IconPackFilledSystemUIOverlay/Android.mk
+++ b/packages/overlays/IconPackFilledSystemUIOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackFilledSystemUIOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/Android.mk b/packages/overlays/IconPackFilledThemePickerOverlay/Android.mk
index 835d35e..cab8916 100644
--- a/packages/overlays/IconPackFilledThemePickerOverlay/Android.mk
+++ b/packages/overlays/IconPackFilledThemePickerOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackFilledThemePickerOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/Android.mk b/packages/overlays/IconPackKaiAndroidOverlay/Android.mk
index 11bd8b8..3df6962 100644
--- a/packages/overlays/IconPackKaiAndroidOverlay/Android.mk
+++ b/packages/overlays/IconPackKaiAndroidOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackKaiAndroidOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/Android.mk b/packages/overlays/IconPackKaiLauncherOverlay/Android.mk
index 5209e53..5a6da63 100644
--- a/packages/overlays/IconPackKaiLauncherOverlay/Android.mk
+++ b/packages/overlays/IconPackKaiLauncherOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackKaiLauncherOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/Android.mk b/packages/overlays/IconPackKaiSettingsOverlay/Android.mk
index 09c631c..61aaa01 100644
--- a/packages/overlays/IconPackKaiSettingsOverlay/Android.mk
+++ b/packages/overlays/IconPackKaiSettingsOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackKaiSettingsOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/Android.mk b/packages/overlays/IconPackKaiSystemUIOverlay/Android.mk
index 5e55f7d..afef709 100644
--- a/packages/overlays/IconPackKaiSystemUIOverlay/Android.mk
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackKaiSystemUIOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/Android.mk b/packages/overlays/IconPackKaiThemePickerOverlay/Android.mk
index d6927e6..2fc240b8 100644
--- a/packages/overlays/IconPackKaiThemePickerOverlay/Android.mk
+++ b/packages/overlays/IconPackKaiThemePickerOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackKaiThemePickerOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/Android.mk b/packages/overlays/IconPackRoundedAndroidOverlay/Android.mk
index 70d6fc4..7685ac6 100644
--- a/packages/overlays/IconPackRoundedAndroidOverlay/Android.mk
+++ b/packages/overlays/IconPackRoundedAndroidOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackRoundedAndroidOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/Android.mk b/packages/overlays/IconPackRoundedLauncherOverlay/Android.mk
index 63de27f..ab4c9e7 100644
--- a/packages/overlays/IconPackRoundedLauncherOverlay/Android.mk
+++ b/packages/overlays/IconPackRoundedLauncherOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackRoundedLauncherOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/Android.mk b/packages/overlays/IconPackRoundedSettingsOverlay/Android.mk
index c59bf7d..a17678b 100644
--- a/packages/overlays/IconPackRoundedSettingsOverlay/Android.mk
+++ b/packages/overlays/IconPackRoundedSettingsOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackRoundedSettingsOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/Android.mk b/packages/overlays/IconPackRoundedSystemUIOverlay/Android.mk
index 3b68c92..057a773 100644
--- a/packages/overlays/IconPackRoundedSystemUIOverlay/Android.mk
+++ b/packages/overlays/IconPackRoundedSystemUIOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackRoundedSystemUIOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk b/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk
index 067efd6..ab51496 100644
--- a/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk
+++ b/packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackRoundedThemePickerOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamAndroidOverlay/Android.mk b/packages/overlays/IconPackSamAndroidOverlay/Android.mk
index 3a65af1..66953e4 100644
--- a/packages/overlays/IconPackSamAndroidOverlay/Android.mk
+++ b/packages/overlays/IconPackSamAndroidOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackSamAndroidOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamLauncherOverlay/Android.mk b/packages/overlays/IconPackSamLauncherOverlay/Android.mk
index 766df22..da0b590 100644
--- a/packages/overlays/IconPackSamLauncherOverlay/Android.mk
+++ b/packages/overlays/IconPackSamLauncherOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackSamLauncherOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamSettingsOverlay/Android.mk b/packages/overlays/IconPackSamSettingsOverlay/Android.mk
index 32aa1ac..47d3a90 100644
--- a/packages/overlays/IconPackSamSettingsOverlay/Android.mk
+++ b/packages/overlays/IconPackSamSettingsOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackSamSettingsOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/Android.mk b/packages/overlays/IconPackSamSystemUIOverlay/Android.mk
index 9f65a4c..a2a0f0a 100644
--- a/packages/overlays/IconPackSamSystemUIOverlay/Android.mk
+++ b/packages/overlays/IconPackSamSystemUIOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackSamSystemUIOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamThemePickerOverlay/Android.mk b/packages/overlays/IconPackSamThemePickerOverlay/Android.mk
index 032c9ad..e2c554c 100644
--- a/packages/overlays/IconPackSamThemePickerOverlay/Android.mk
+++ b/packages/overlays/IconPackSamThemePickerOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackSamThemePickerOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/Android.mk b/packages/overlays/IconPackVictorAndroidOverlay/Android.mk
index 9c900da..4535ae7 100644
--- a/packages/overlays/IconPackVictorAndroidOverlay/Android.mk
+++ b/packages/overlays/IconPackVictorAndroidOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackVictorAndroidOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/Android.mk b/packages/overlays/IconPackVictorLauncherOverlay/Android.mk
index ce10af8..6d380c5 100644
--- a/packages/overlays/IconPackVictorLauncherOverlay/Android.mk
+++ b/packages/overlays/IconPackVictorLauncherOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackVictorLauncherOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/Android.mk b/packages/overlays/IconPackVictorSettingsOverlay/Android.mk
index ad8fc3d..353cac1 100644
--- a/packages/overlays/IconPackVictorSettingsOverlay/Android.mk
+++ b/packages/overlays/IconPackVictorSettingsOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackVictorSettingsOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/Android.mk b/packages/overlays/IconPackVictorSystemUIOverlay/Android.mk
index bd16eed..6189a64 100644
--- a/packages/overlays/IconPackVictorSystemUIOverlay/Android.mk
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackVictorSystemUIOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/Android.mk b/packages/overlays/IconPackVictorThemePickerOverlay/Android.mk
index 3586d0a..96fd7ee 100644
--- a/packages/overlays/IconPackVictorThemePickerOverlay/Android.mk
+++ b/packages/overlays/IconPackVictorThemePickerOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconPackVictorThemePickerOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeHeartOverlay/Android.mk b/packages/overlays/IconShapeHeartOverlay/Android.mk
index 20fe71f..33b3e19 100644
--- a/packages/overlays/IconShapeHeartOverlay/Android.mk
+++ b/packages/overlays/IconShapeHeartOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapeHeartOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapePebbleOverlay/Android.mk b/packages/overlays/IconShapePebbleOverlay/Android.mk
index c163bb9..493bec7 100644
--- a/packages/overlays/IconShapePebbleOverlay/Android.mk
+++ b/packages/overlays/IconShapePebbleOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapePebbleOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeRoundedRectOverlay/Android.mk b/packages/overlays/IconShapeRoundedRectOverlay/Android.mk
index c6f00d1..729b1c8 100644
--- a/packages/overlays/IconShapeRoundedRectOverlay/Android.mk
+++ b/packages/overlays/IconShapeRoundedRectOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapeRoundedRectOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeSquareOverlay/Android.mk b/packages/overlays/IconShapeSquareOverlay/Android.mk
index 6020721..cd33201 100644
--- a/packages/overlays/IconShapeSquareOverlay/Android.mk
+++ b/packages/overlays/IconShapeSquareOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapeSquareOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeSquircleOverlay/Android.mk b/packages/overlays/IconShapeSquircleOverlay/Android.mk
index 04409a5..579685e 100644
--- a/packages/overlays/IconShapeSquircleOverlay/Android.mk
+++ b/packages/overlays/IconShapeSquircleOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapeSquircleOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeTaperedRectOverlay/Android.mk b/packages/overlays/IconShapeTaperedRectOverlay/Android.mk
index 6f1bf23..c92fa97 100644
--- a/packages/overlays/IconShapeTaperedRectOverlay/Android.mk
+++ b/packages/overlays/IconShapeTaperedRectOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapeTaperedRectOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeTeardropOverlay/Android.mk b/packages/overlays/IconShapeTeardropOverlay/Android.mk
index b127dea..a8f3bbf 100644
--- a/packages/overlays/IconShapeTeardropOverlay/Android.mk
+++ b/packages/overlays/IconShapeTeardropOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapeTeardropOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeVesselOverlay/Android.mk b/packages/overlays/IconShapeVesselOverlay/Android.mk
index 0816e6f..d43e4ba 100644
--- a/packages/overlays/IconShapeVesselOverlay/Android.mk
+++ b/packages/overlays/IconShapeVesselOverlay/Android.mk
@@ -24,6 +24,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := IconShapeVesselOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/NavigationBarMode2ButtonOverlay/Android.mk b/packages/overlays/NavigationBarMode2ButtonOverlay/Android.mk
index 30477cc..9a7aac0 100644
--- a/packages/overlays/NavigationBarMode2ButtonOverlay/Android.mk
+++ b/packages/overlays/NavigationBarMode2ButtonOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := NavigationBarMode2ButtonOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
-include $(BUILD_RRO_PACKAGE)
\ No newline at end of file
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/NavigationBarMode3ButtonOverlay/Android.mk b/packages/overlays/NavigationBarMode3ButtonOverlay/Android.mk
index 3d5a5a5..32c978b 100644
--- a/packages/overlays/NavigationBarMode3ButtonOverlay/Android.mk
+++ b/packages/overlays/NavigationBarMode3ButtonOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := NavigationBarMode3ButtonOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
-include $(BUILD_RRO_PACKAGE)
\ No newline at end of file
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/NavigationBarModeGesturalOverlay/Android.mk b/packages/overlays/NavigationBarModeGesturalOverlay/Android.mk
index 3b7605a..56d2346 100644
--- a/packages/overlays/NavigationBarModeGesturalOverlay/Android.mk
+++ b/packages/overlays/NavigationBarModeGesturalOverlay/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := NavigationBarModeGesturalOverlay
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
-include $(BUILD_RRO_PACKAGE)
\ No newline at end of file
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/NavigationBarModeGesturalOverlayExtraWideBack/Android.mk b/packages/overlays/NavigationBarModeGesturalOverlayExtraWideBack/Android.mk
index 1a1388e..8e7da99 100644
--- a/packages/overlays/NavigationBarModeGesturalOverlayExtraWideBack/Android.mk
+++ b/packages/overlays/NavigationBarModeGesturalOverlayExtraWideBack/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := NavigationBarModeGesturalOverlayExtraWideBack
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
-include $(BUILD_RRO_PACKAGE)
\ No newline at end of file
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/NavigationBarModeGesturalOverlayNarrowBack/Android.mk b/packages/overlays/NavigationBarModeGesturalOverlayNarrowBack/Android.mk
index 8689986..029cafd 100644
--- a/packages/overlays/NavigationBarModeGesturalOverlayNarrowBack/Android.mk
+++ b/packages/overlays/NavigationBarModeGesturalOverlayNarrowBack/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := NavigationBarModeGesturalOverlayNarrowBack
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
-include $(BUILD_RRO_PACKAGE)
\ No newline at end of file
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/NavigationBarModeGesturalOverlayWideBack/Android.mk b/packages/overlays/NavigationBarModeGesturalOverlayWideBack/Android.mk
index 2723add..34edba6 100644
--- a/packages/overlays/NavigationBarModeGesturalOverlayWideBack/Android.mk
+++ b/packages/overlays/NavigationBarModeGesturalOverlayWideBack/Android.mk
@@ -23,6 +23,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := NavigationBarModeGesturalOverlayWideBack
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
-include $(BUILD_RRO_PACKAGE)
\ No newline at end of file
+include $(BUILD_RRO_PACKAGE)
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 6460053..142169e 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -78,7 +78,6 @@
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static android.net.NetworkCapabilities.TRANSPORT_TEST;
import static android.net.NetworkCapabilities.TRANSPORT_VPN;
-import static android.net.NetworkPolicyManager.blockedReasonsToString;
import static android.net.NetworkRequest.Type.LISTEN_FOR_BEST;
import static android.net.shared.NetworkMonitorUtils.isPrivateDnsValidationRequired;
import static android.os.Process.INVALID_UID;
@@ -1617,7 +1616,7 @@
? nri.getActiveRequest().requestId : nri.mRequests.get(0).requestId;
mNetworkInfoBlockingLogs.log(String.format(
"%s %d(%d) on netId %d: %s", action, nri.mAsUid, requestId, net.getNetId(),
- blockedReasonsToString(blocked)));
+ Integer.toHexString(blocked)));
}
/**
@@ -1949,7 +1948,7 @@
newNc.setAdministratorUids(new int[0]);
if (!checkAnyPermissionOf(
callerPid, callerUid, android.Manifest.permission.NETWORK_FACTORY)) {
- newNc.setSubIds(Collections.emptySet());
+ newNc.setSubscriptionIds(Collections.emptySet());
}
return newNc;
@@ -2901,7 +2900,7 @@
final int uid = mUidBlockedReasons.keyAt(i);
final int blockedReasons = mUidBlockedReasons.valueAt(i);
pw.println("UID=" + uid + " blockedReasons="
- + blockedReasonsToString(blockedReasons));
+ + Integer.toHexString(blockedReasons));
} catch (ArrayIndexOutOfBoundsException e) {
pw.println(" ArrayIndexOutOfBoundsException");
} catch (ConcurrentModificationException e) {
@@ -5764,7 +5763,7 @@
}
mAppOpsManager.checkPackage(callerUid, callerPackageName);
- if (!nc.getSubIds().isEmpty()) {
+ if (!nc.getSubscriptionIds().isEmpty()) {
enforceNetworkFactoryPermission();
}
}
diff --git a/services/core/java/com/android/server/OWNERS b/services/core/java/com/android/server/OWNERS
index 9821cdc..55e1b46 100644
--- a/services/core/java/com/android/server/OWNERS
+++ b/services/core/java/com/android/server/OWNERS
@@ -1,5 +1,5 @@
# Connectivity / Networking
-per-file ConnectivityService.java,ConnectivityServiceInitializer.java,NetworkManagementService.java,NsdService.java = file:/services/core/java/com/android/server/net/OWNERS
+per-file ConnectivityService.java,ConnectivityServiceInitializer.java,NetworkManagementService.java,NsdService.java,VpnManagerService.java = file:/services/core/java/com/android/server/net/OWNERS
# Vibrator / Threads
per-file VibratorService.java, DisplayThread.java = michaelwr@google.com
diff --git a/services/core/java/com/android/server/VcnManagementService.java b/services/core/java/com/android/server/VcnManagementService.java
index 6eb6a0e..45eb774 100644
--- a/services/core/java/com/android/server/VcnManagementService.java
+++ b/services/core/java/com/android/server/VcnManagementService.java
@@ -614,6 +614,34 @@
});
}
+ /**
+ * Retrieves the list of subscription groups with configured VcnConfigs
+ *
+ * <p>Limited to subscription groups for which the caller is carrier privileged.
+ *
+ * <p>Implements the IVcnManagementService Binder interface.
+ */
+ @Override
+ @NonNull
+ public List<ParcelUuid> getConfiguredSubscriptionGroups(@NonNull String opPkgName) {
+ requireNonNull(opPkgName, "opPkgName was null");
+
+ mContext.getSystemService(AppOpsManager.class)
+ .checkPackage(mDeps.getBinderCallingUid(), opPkgName);
+ enforcePrimaryUser();
+
+ final List<ParcelUuid> result = new ArrayList<>();
+ synchronized (mLock) {
+ for (ParcelUuid subGrp : mConfigs.keySet()) {
+ if (mLastSnapshot.packageHasPermissionsForSubscriptionGroup(subGrp, opPkgName)) {
+ result.add(subGrp);
+ }
+ }
+ }
+
+ return result;
+ }
+
@GuardedBy("mLock")
private void writeConfigsToDiskLocked() {
try {
@@ -731,7 +759,7 @@
// If multiple subscription IDs exist, they MUST all point to the same subscription
// group. Otherwise undefined behavior may occur.
- for (int subId : networkCapabilities.getSubIds()) {
+ for (int subId : networkCapabilities.getSubscriptionIds()) {
// Verify that all subscriptions point to the same group
if (subGrp != null && !subGrp.equals(snapshot.getGroupForSubId(subId))) {
Slog.wtf(TAG, "Got multiple subscription groups for a single network");
@@ -1013,14 +1041,14 @@
}
private boolean requiresRestartForCarrierWifi(NetworkCapabilities caps) {
- if (!caps.hasTransport(TRANSPORT_WIFI) || caps.getSubIds() == null) {
+ if (!caps.hasTransport(TRANSPORT_WIFI) || caps.getSubscriptionIds() == null) {
return false;
}
synchronized (mCaps) {
for (NetworkCapabilities existing : mCaps.values()) {
if (existing.hasTransport(TRANSPORT_WIFI)
- && caps.getSubIds().equals(existing.getSubIds())) {
+ && caps.getSubscriptionIds().equals(existing.getSubscriptionIds())) {
// Restart if any immutable capabilities have changed
return existing.hasCapability(NET_CAPABILITY_NOT_RESTRICTED)
!= caps.hasCapability(NET_CAPABILITY_NOT_RESTRICTED);
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index ca9c75f..5ef3d76 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -80,6 +80,7 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;
+import java.util.Random;
/**
* Helper class for running dexopt command on packages.
@@ -104,6 +105,8 @@
private final ArtStatsLogger mArtStatsLogger = new ArtStatsLogger();
+ private static final Random sRandom = new Random();
+
PackageDexOptimizer(Installer installer, Object installLock, Context context,
String wakeLockTag) {
this.mInstaller = installer;
@@ -262,7 +265,7 @@
if (packageStats != null) {
Trace.traceBegin(Trace.TRACE_TAG_PACKAGE_MANAGER, "dex2oat-metrics");
try {
- long sessionId = Math.randomLongInternal();
+ long sessionId = sRandom.nextLong();
ArtStatsLogUtils.writeStatsLog(
mArtStatsLogger,
sessionId,
diff --git a/services/core/java/com/android/server/vcn/UnderlyingNetworkTracker.java b/services/core/java/com/android/server/vcn/UnderlyingNetworkTracker.java
index 48ccad33..8818023 100644
--- a/services/core/java/com/android/server/vcn/UnderlyingNetworkTracker.java
+++ b/services/core/java/com/android/server/vcn/UnderlyingNetworkTracker.java
@@ -154,14 +154,14 @@
* Builds the Route selection request
*
* <p>This request is guaranteed to select carrier-owned, non-VCN underlying networks by virtue
- * of a populated set of subIds as expressed in NetworkCapabilities#getSubIds(). Only carrier
- * owned networks may be selected, as the request specifies only subIds in the VCN's
+ * of a populated set of subIds as expressed in NetworkCapabilities#getSubscriptionIds(). Only
+ * carrier owned networks may be selected, as the request specifies only subIds in the VCN's
* subscription group, while the VCN networks are excluded by virtue of not having subIds set on
* the VCN-exposed networks.
*/
private NetworkRequest getRouteSelectionRequest() {
return getBaseNetworkRequestBuilder()
- .setSubIds(mLastSnapshot.getAllSubIdsInGroup(mSubscriptionGroup))
+ .setSubscriptionIds(mLastSnapshot.getAllSubIdsInGroup(mSubscriptionGroup))
.build();
}
@@ -177,7 +177,7 @@
private NetworkRequest getWifiNetworkRequest() {
return getBaseNetworkRequestBuilder()
.addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
- .setSubIds(mLastSnapshot.getAllSubIdsInGroup(mSubscriptionGroup))
+ .setSubscriptionIds(mLastSnapshot.getAllSubIdsInGroup(mSubscriptionGroup))
.build();
}
diff --git a/services/core/java/com/android/server/vcn/VcnGatewayConnection.java b/services/core/java/com/android/server/vcn/VcnGatewayConnection.java
index 77bfc5f..6ca3c4b 100644
--- a/services/core/java/com/android/server/vcn/VcnGatewayConnection.java
+++ b/services/core/java/com/android/server/vcn/VcnGatewayConnection.java
@@ -52,6 +52,7 @@
import android.net.NetworkScore;
import android.net.RouteInfo;
import android.net.TelephonyNetworkSpecifier;
+import android.net.TunnelConnectionParams;
import android.net.Uri;
import android.net.annotations.PolicyDirection;
import android.net.ipsec.ike.ChildSessionCallback;
@@ -61,10 +62,10 @@
import android.net.ipsec.ike.IkeSessionCallback;
import android.net.ipsec.ike.IkeSessionConfiguration;
import android.net.ipsec.ike.IkeSessionParams;
+import android.net.ipsec.ike.IkeTunnelConnectionParams;
import android.net.ipsec.ike.exceptions.IkeException;
import android.net.ipsec.ike.exceptions.IkeInternalException;
import android.net.ipsec.ike.exceptions.IkeProtocolException;
-import android.net.vcn.VcnControlPlaneIkeConfig;
import android.net.vcn.VcnGatewayConnectionConfig;
import android.net.vcn.VcnTransportInfo;
import android.net.wifi.WifiInfo;
@@ -1923,8 +1924,14 @@
@NonNull IpSecTunnelInterface tunnelIface,
@NonNull VcnChildSessionConfiguration childConfig,
@Nullable UnderlyingNetworkRecord underlying) {
- final VcnControlPlaneIkeConfig controlPlaneConfig =
- (VcnControlPlaneIkeConfig) gatewayConnectionConfig.getControlPlaneConfig();
+ final TunnelConnectionParams tunnelParams =
+ gatewayConnectionConfig.getTunnelConnectionParams();
+ if (!(tunnelParams instanceof IkeTunnelConnectionParams)) {
+ throw new IllegalStateException(
+ "TunnelConnectionParams is not IkeTunnelConnectionParams");
+ }
+
+ final IkeTunnelConnectionParams ikeTunnelParams = (IkeTunnelConnectionParams) tunnelParams;
final LinkProperties lp = new LinkProperties();
lp.setInterfaceName(tunnelIface.getInterfaceName());
@@ -1943,7 +1950,7 @@
final int underlyingMtu = (underlying == null) ? 0 : underlying.linkProperties.getMtu();
lp.setMtu(
MtuUtils.getMtu(
- controlPlaneConfig.getChildSessionParams().getSaProposals(),
+ ikeTunnelParams.getTunnelModeChildSessionParams().getSaProposals(),
gatewayConnectionConfig.getMaxMtu(),
underlyingMtu));
@@ -2131,19 +2138,32 @@
}
private IkeSessionParams buildIkeParams(@NonNull Network network) {
- final VcnControlPlaneIkeConfig controlPlaneConfig =
- (VcnControlPlaneIkeConfig) mConnectionConfig.getControlPlaneConfig();
- final IkeSessionParams.Builder builder =
- new IkeSessionParams.Builder(controlPlaneConfig.getIkeSessionParams());
- builder.setNetwork(network);
+ final TunnelConnectionParams tunnelConnectionParams =
+ mConnectionConfig.getTunnelConnectionParams();
- return builder.build();
+ if (tunnelConnectionParams instanceof IkeTunnelConnectionParams) {
+ final IkeTunnelConnectionParams ikeTunnelConnectionParams =
+ (IkeTunnelConnectionParams) tunnelConnectionParams;
+ final IkeSessionParams.Builder builder =
+ new IkeSessionParams.Builder(ikeTunnelConnectionParams.getIkeSessionParams());
+ builder.setNetwork(network);
+
+ return builder.build();
+ }
+
+ throw new IllegalStateException("TunnelConnectionParams is not IkeTunnelConnectionParams");
}
private ChildSessionParams buildChildParams() {
- final VcnControlPlaneIkeConfig controlPlaneConfig =
- (VcnControlPlaneIkeConfig) mConnectionConfig.getControlPlaneConfig();
- return controlPlaneConfig.getChildSessionParams();
+ final TunnelConnectionParams tunnelConnectionParams =
+ mConnectionConfig.getTunnelConnectionParams();
+
+ if (tunnelConnectionParams instanceof IkeTunnelConnectionParams) {
+ return ((IkeTunnelConnectionParams) tunnelConnectionParams)
+ .getTunnelModeChildSessionParams();
+ }
+
+ throw new IllegalStateException("TunnelConnectionParams is not IkeTunnelConnectionParams");
}
@VisibleForTesting(visibility = Visibility.PRIVATE)
diff --git a/telecomm/java/android/telecom/BluetoothCallQualityReport.java b/telecomm/java/android/telecom/BluetoothCallQualityReport.java
index 8703d84..78dba6a 100644
--- a/telecomm/java/android/telecom/BluetoothCallQualityReport.java
+++ b/telecomm/java/android/telecom/BluetoothCallQualityReport.java
@@ -66,7 +66,9 @@
}
/**
- * @return {@code true} if bluetooth hardware detects voice is choppy
+ * When the bluetooth controller detects factors that cause choppy voice,
+ * the controller reports an (e)SCO Voice Choppy event to the host
+ * @return {@code true} when we receive (e)SCO Voice Choppy event from the controller
*/
public boolean isChoppyVoice() {
return mChoppyVoice;
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index 45a67b3..0dfc7f6 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -116,7 +116,7 @@
@Override
public @NonNull CellIdentityNr sanitizeLocationInfo() {
return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mNrArfcn,
- mBands, mMccStr, mMncStr, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort,
+ mBands, mMccStr, mMncStr, CellInfo.UNAVAILABLE_LONG, mAlphaLong, mAlphaShort,
mAdditionalPlmns);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java
index bde62fb..ac01afa 100644
--- a/telephony/java/android/telephony/CellSignalStrengthNr.java
+++ b/telephony/java/android/telephony/CellSignalStrengthNr.java
@@ -134,7 +134,7 @@
*
* Range [0, 15] for each CQI.
*/
- private List<Integer> mCsiCqiReport;;
+ private List<Integer> mCsiCqiReport;
private int mSsRsrp;
private int mSsRsrq;
private int mSsSinr;
@@ -172,13 +172,13 @@
* @hide
*/
public CellSignalStrengthNr(int csiRsrp, int csiRsrq, int csiSinr, int csiCqiTableIndex,
- List<Integer> csiCqiReport, int ssRsrp, int ssRsrq, int ssSinr) {
+ List<Byte> csiCqiReport, int ssRsrp, int ssRsrq, int ssSinr) {
mCsiRsrp = inRangeOrUnavailable(csiRsrp, -140, -44);
mCsiRsrq = inRangeOrUnavailable(csiRsrq, -20, -3);
mCsiSinr = inRangeOrUnavailable(csiSinr, -23, 23);
mCsiCqiTableIndex = inRangeOrUnavailable(csiCqiTableIndex, 1, 3);
- mCsiCqiReport = csiCqiReport.stream()
- .map(cqi -> new Integer(inRangeOrUnavailable(cqi.intValue(), 1, 3)))
+ mCsiCqiReport = csiCqiReport.stream()
+ .map(cqi -> new Integer(inRangeOrUnavailable(Byte.toUnsignedInt(cqi), 1, 3)))
.collect(Collectors.toList());
mSsRsrp = inRangeOrUnavailable(ssRsrp, -140, -44);
mSsRsrq = inRangeOrUnavailable(ssRsrq, -43, 20);
diff --git a/telephony/java/android/telephony/data/QosBearerFilter.java b/telephony/java/android/telephony/data/QosBearerFilter.java
index 6c1c653..5642549 100644
--- a/telephony/java/android/telephony/data/QosBearerFilter.java
+++ b/telephony/java/android/telephony/data/QosBearerFilter.java
@@ -31,7 +31,6 @@
import java.util.List;
import java.util.Objects;
-
/**
* Class that stores QOS filter parameters as defined in
* 3gpp 24.008 10.5.6.12 and 3gpp 24.501 9.11.4.13.
diff --git a/telephony/java/android/telephony/ims/SipDelegateManager.java b/telephony/java/android/telephony/ims/SipDelegateManager.java
index 399b6dc..f65afa5 100644
--- a/telephony/java/android/telephony/ims/SipDelegateManager.java
+++ b/telephony/java/android/telephony/ims/SipDelegateManager.java
@@ -38,6 +38,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
import java.util.concurrent.Executor;
/**
@@ -321,9 +322,10 @@
public void createSipDelegate(@NonNull DelegateRequest request, @NonNull Executor executor,
@NonNull DelegateConnectionStateCallback dc,
@NonNull DelegateConnectionMessageCallback mc) throws ImsException {
- if (request == null || executor == null || dc == null || mc == null) {
- throw new IllegalArgumentException("Invalid arguments passed into createSipDelegate");
- }
+ Objects.requireNonNull(request, "The DelegateRequest must not be null.");
+ Objects.requireNonNull(executor, "The Executor must not be null.");
+ Objects.requireNonNull(dc, "The DelegateConnectionStateCallback must not be null.");
+ Objects.requireNonNull(mc, "The DelegateConnectionMessageCallback must not be null.");
try {
SipDelegateConnectionAidlWrapper wrapper =
new SipDelegateConnectionAidlWrapper(executor, dc, mc);
@@ -354,10 +356,7 @@
@RequiresPermission(Manifest.permission.PERFORM_IMS_SINGLE_REGISTRATION)
public void destroySipDelegate(@NonNull SipDelegateConnection delegateConnection,
@SipDelegateDestroyReason int reason) {
-
- if (delegateConnection == null) {
- throw new IllegalArgumentException("invalid argument passed into destroySipDelegate");
- }
+ Objects.requireNonNull(delegateConnection, "SipDelegateConnection can not be null.");
if (delegateConnection instanceof SipDelegateConnectionAidlWrapper) {
SipDelegateConnectionAidlWrapper w =
(SipDelegateConnectionAidlWrapper) delegateConnection;
@@ -395,9 +394,7 @@
@RequiresPermission(Manifest.permission.PERFORM_IMS_SINGLE_REGISTRATION)
public void triggerFullNetworkRegistration(@NonNull SipDelegateConnection connection,
@IntRange(from = 100, to = 699) int sipCode, @Nullable String sipReason) {
- if (connection == null) {
- throw new IllegalArgumentException("invalid connection.");
- }
+ Objects.requireNonNull(connection, "SipDelegateConnection can not be null.");
if (connection instanceof SipDelegateConnectionAidlWrapper) {
SipDelegateConnectionAidlWrapper w = (SipDelegateConnectionAidlWrapper) connection;
try {
diff --git a/tests/Camera2Tests/CameraToo/Android.mk b/tests/Camera2Tests/CameraToo/Android.mk
index 7e5911d..3347314 100644
--- a/tests/Camera2Tests/CameraToo/Android.mk
+++ b/tests/Camera2Tests/CameraToo/Android.mk
@@ -17,6 +17,9 @@
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := CameraToo
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under,src)
diff --git a/tests/Camera2Tests/CameraToo/tests/Android.mk b/tests/Camera2Tests/CameraToo/tests/Android.mk
index fe4dc42..dfa64f1 100644
--- a/tests/Camera2Tests/CameraToo/tests/Android.mk
+++ b/tests/Camera2Tests/CameraToo/tests/Android.mk
@@ -17,6 +17,9 @@
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := CameraTooTests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../NOTICE
LOCAL_INSTRUMENTATION_FOR := CameraToo
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under,src)
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/Android.mk b/tests/Camera2Tests/SmartCamera/SimpleCamera/Android.mk
index 4e3675f..6003628 100644
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/Android.mk
+++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/Android.mk
@@ -32,6 +32,9 @@
$(call all-renderscript-files-under, src)
LOCAL_PACKAGE_NAME := SmartCamera
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../NOTICE
LOCAL_JNI_SHARED_LIBRARIES := libsmartcamera_jni
include $(BUILD_PACKAGE)
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk b/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
index a900077..c23d593 100644
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
+++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
@@ -22,6 +22,9 @@
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PACKAGE_NAME := SmartCamera-tests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_SRC_FILES += $(call all-java-files-under, src)
diff --git a/tests/CanvasCompare/Android.mk b/tests/CanvasCompare/Android.mk
index 6a0a93e..b82ae65 100644
--- a/tests/CanvasCompare/Android.mk
+++ b/tests/CanvasCompare/Android.mk
@@ -20,6 +20,9 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src)
LOCAL_PACKAGE_NAME := CanvasCompare
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/tests/LockTaskTests/Android.mk b/tests/LockTaskTests/Android.mk
index a693eaa..5406ee1 100644
--- a/tests/LockTaskTests/Android.mk
+++ b/tests/LockTaskTests/Android.mk
@@ -5,6 +5,9 @@
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/system/priv-app
LOCAL_PACKAGE_NAME := LockTaskTests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
diff --git a/tests/SoundTriggerTests/Android.mk b/tests/SoundTriggerTests/Android.mk
index 204a74e..cc0fa1c 100644
--- a/tests/SoundTriggerTests/Android.mk
+++ b/tests/SoundTriggerTests/Android.mk
@@ -31,6 +31,9 @@
LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
LOCAL_PACKAGE_NAME := SoundTriggerTests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/net/common/java/android/net/NetworkCapabilitiesTest.java b/tests/net/common/java/android/net/NetworkCapabilitiesTest.java
index e7718b5..33f2c67 100644
--- a/tests/net/common/java/android/net/NetworkCapabilitiesTest.java
+++ b/tests/net/common/java/android/net/NetworkCapabilitiesTest.java
@@ -311,7 +311,7 @@
.addCapability(NET_CAPABILITY_EIMS)
.addCapability(NET_CAPABILITY_NOT_METERED);
if (isAtLeastS()) {
- netCap.setSubIds(Set.of(TEST_SUBID1, TEST_SUBID2));
+ netCap.setSubscriptionIds(Set.of(TEST_SUBID1, TEST_SUBID2));
netCap.setUids(uids);
}
if (isAtLeastR()) {
@@ -641,16 +641,16 @@
assertTrue(nc2.appliesToUid(22));
// Verify the subscription id list can be combined only when they are equal.
- nc1.setSubIds(Set.of(TEST_SUBID1, TEST_SUBID2));
- nc2.setSubIds(Set.of(TEST_SUBID2));
+ nc1.setSubscriptionIds(Set.of(TEST_SUBID1, TEST_SUBID2));
+ nc2.setSubscriptionIds(Set.of(TEST_SUBID2));
assertThrows(IllegalStateException.class, () -> nc2.combineCapabilities(nc1));
- nc2.setSubIds(Set.of());
+ nc2.setSubscriptionIds(Set.of());
assertThrows(IllegalStateException.class, () -> nc2.combineCapabilities(nc1));
- nc2.setSubIds(Set.of(TEST_SUBID2, TEST_SUBID1));
+ nc2.setSubscriptionIds(Set.of(TEST_SUBID2, TEST_SUBID1));
nc2.combineCapabilities(nc1);
- assertEquals(Set.of(TEST_SUBID2, TEST_SUBID1), nc2.getSubIds());
+ assertEquals(Set.of(TEST_SUBID2, TEST_SUBID1), nc2.getSubscriptionIds());
}
}
@@ -805,20 +805,20 @@
assertEquals(nc1, nc2);
if (isAtLeastS()) {
- assertThrows(NullPointerException.class, () -> nc1.setSubIds(null));
- nc1.setSubIds(Set.of());
+ assertThrows(NullPointerException.class, () -> nc1.setSubscriptionIds(null));
+ nc1.setSubscriptionIds(Set.of());
nc2.set(nc1);
assertEquals(nc1, nc2);
- nc1.setSubIds(Set.of(TEST_SUBID1));
+ nc1.setSubscriptionIds(Set.of(TEST_SUBID1));
nc2.set(nc1);
assertEquals(nc1, nc2);
- nc2.setSubIds(Set.of(TEST_SUBID2, TEST_SUBID1));
+ nc2.setSubscriptionIds(Set.of(TEST_SUBID2, TEST_SUBID1));
nc2.set(nc1);
assertEquals(nc1, nc2);
- nc2.setSubIds(Set.of(TEST_SUBID3, TEST_SUBID2));
+ nc2.setSubscriptionIds(Set.of(TEST_SUBID3, TEST_SUBID2));
assertNotEquals(nc1, nc2);
}
}
@@ -907,8 +907,8 @@
// satisfy these requests.
final NetworkCapabilities nc = new NetworkCapabilities.Builder()
.addCapability(NET_CAPABILITY_NOT_VCN_MANAGED)
- .setSubIds(new ArraySet<>(subIds)).build();
- assertEquals(new ArraySet<>(subIds), nc.getSubIds());
+ .setSubscriptionIds(new ArraySet<>(subIds)).build();
+ assertEquals(new ArraySet<>(subIds), nc.getSubscriptionIds());
return nc;
}
@@ -920,11 +920,11 @@
final NetworkCapabilities ncWithoutRequestedIds = capsWithSubIds(TEST_SUBID3);
final NetworkRequest requestWithoutId = new NetworkRequest.Builder().build();
- assertEmpty(requestWithoutId.networkCapabilities.getSubIds());
+ assertEmpty(requestWithoutId.networkCapabilities.getSubscriptionIds());
final NetworkRequest requestWithIds = new NetworkRequest.Builder()
- .setSubIds(Set.of(TEST_SUBID1, TEST_SUBID2)).build();
+ .setSubscriptionIds(Set.of(TEST_SUBID1, TEST_SUBID2)).build();
assertEquals(Set.of(TEST_SUBID1, TEST_SUBID2),
- requestWithIds.networkCapabilities.getSubIds());
+ requestWithIds.networkCapabilities.getSubscriptionIds());
assertFalse(requestWithIds.canBeSatisfiedBy(ncWithoutId));
assertTrue(requestWithIds.canBeSatisfiedBy(ncWithOtherIds));
@@ -1132,8 +1132,8 @@
if (isAtLeastS()) {
final NetworkCapabilities nc2 = new NetworkCapabilities.Builder()
- .setSubIds(Set.of(TEST_SUBID1)).build();
- assertEquals(Set.of(TEST_SUBID1), nc2.getSubIds());
+ .setSubscriptionIds(Set.of(TEST_SUBID1)).build();
+ assertEquals(Set.of(TEST_SUBID1), nc2.getSubscriptionIds());
}
}
}
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index c58e937..9c797e4 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -12314,12 +12314,12 @@
public void testSubIdsClearedWithoutNetworkFactoryPermission() throws Exception {
mServiceContext.setPermission(NETWORK_FACTORY, PERMISSION_DENIED);
final NetworkCapabilities nc = new NetworkCapabilities();
- nc.setSubIds(Collections.singleton(Process.myUid()));
+ nc.setSubscriptionIds(Collections.singleton(Process.myUid()));
final NetworkCapabilities result =
mService.networkCapabilitiesRestrictedForCallerPermissions(
nc, Process.myPid(), Process.myUid());
- assertTrue(result.getSubIds().isEmpty());
+ assertTrue(result.getSubscriptionIds().isEmpty());
}
@Test
@@ -12328,17 +12328,17 @@
final Set<Integer> subIds = Collections.singleton(Process.myUid());
final NetworkCapabilities nc = new NetworkCapabilities();
- nc.setSubIds(subIds);
+ nc.setSubscriptionIds(subIds);
final NetworkCapabilities result =
mService.networkCapabilitiesRestrictedForCallerPermissions(
nc, Process.myPid(), Process.myUid());
- assertEquals(subIds, result.getSubIds());
+ assertEquals(subIds, result.getSubscriptionIds());
}
private NetworkRequest getRequestWithSubIds() {
return new NetworkRequest.Builder()
- .setSubIds(Collections.singleton(Process.myUid()))
+ .setSubscriptionIds(Collections.singleton(Process.myUid()))
.build();
}
diff --git a/tests/vcn/java/android/net/vcn/VcnControlPlaneIkeConfigTest.java b/tests/vcn/java/android/net/vcn/VcnControlPlaneIkeConfigTest.java
deleted file mode 100644
index 43b80e4..0000000
--- a/tests/vcn/java/android/net/vcn/VcnControlPlaneIkeConfigTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2020 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.net.vcn;
-
-import static android.net.ipsec.ike.SaProposal.DH_GROUP_2048_BIT_MODP;
-import static android.net.ipsec.ike.SaProposal.ENCRYPTION_ALGORITHM_AES_GCM_12;
-import static android.net.ipsec.ike.SaProposal.PSEUDORANDOM_FUNCTION_AES128_XCBC;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import android.net.ipsec.ike.ChildSaProposal;
-import android.net.ipsec.ike.IkeFqdnIdentification;
-import android.net.ipsec.ike.IkeSaProposal;
-import android.net.ipsec.ike.IkeSessionParams;
-import android.net.ipsec.ike.SaProposal;
-import android.net.ipsec.ike.TunnelModeChildSessionParams;
-
-import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidJUnit4.class)
-@SmallTest
-public class VcnControlPlaneIkeConfigTest {
- private static final IkeSessionParams IKE_PARAMS;
- private static final TunnelModeChildSessionParams CHILD_PARAMS;
-
- static {
- IkeSaProposal ikeProposal =
- new IkeSaProposal.Builder()
- .addEncryptionAlgorithm(
- ENCRYPTION_ALGORITHM_AES_GCM_12, SaProposal.KEY_LEN_AES_128)
- .addDhGroup(DH_GROUP_2048_BIT_MODP)
- .addPseudorandomFunction(PSEUDORANDOM_FUNCTION_AES128_XCBC)
- .build();
-
- final String serverHostname = "192.0.2.100";
- final String testLocalId = "test.client.com";
- final String testRemoteId = "test.server.com";
- final byte[] psk = "psk".getBytes();
-
- IKE_PARAMS =
- new IkeSessionParams.Builder()
- .setServerHostname(serverHostname)
- .addSaProposal(ikeProposal)
- .setLocalIdentification(new IkeFqdnIdentification(testLocalId))
- .setRemoteIdentification(new IkeFqdnIdentification(testRemoteId))
- .setAuthPsk(psk)
- .build();
-
- ChildSaProposal childProposal =
- new ChildSaProposal.Builder()
- .addEncryptionAlgorithm(
- ENCRYPTION_ALGORITHM_AES_GCM_12, SaProposal.KEY_LEN_AES_128)
- .build();
- CHILD_PARAMS =
- new TunnelModeChildSessionParams.Builder().addSaProposal(childProposal).build();
- }
-
- // Package private for use in VcnGatewayConnectionConfigTest
- static VcnControlPlaneIkeConfig buildTestConfig() {
- return new VcnControlPlaneIkeConfig(IKE_PARAMS, CHILD_PARAMS);
- }
-
- @Test
- public void testGetters() {
- final VcnControlPlaneIkeConfig config = buildTestConfig();
- assertEquals(IKE_PARAMS, config.getIkeSessionParams());
- assertEquals(CHILD_PARAMS, config.getChildSessionParams());
- }
-
- @Test
- public void testPersistableBundle() {
- final VcnControlPlaneIkeConfig config = buildTestConfig();
-
- assertEquals(config, new VcnControlPlaneIkeConfig(config.toPersistableBundle()));
- }
-
- @Test
- public void testConstructConfigWithoutIkeParams() {
- try {
- new VcnControlPlaneIkeConfig(null, CHILD_PARAMS);
- fail("Expect to fail because ikeParams was null");
- } catch (NullPointerException expected) {
- }
- }
-
- @Test
- public void testBuilderConfigWithoutChildParams() {
- try {
- new VcnControlPlaneIkeConfig(IKE_PARAMS, null);
- fail("Expect to fail because childParams was null");
- } catch (NullPointerException expected) {
- }
- }
-}
diff --git a/tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java b/tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java
index 4ee4d61..0d3fd3f 100644
--- a/tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java
+++ b/tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java
@@ -18,11 +18,12 @@
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import android.net.NetworkCapabilities;
+import android.net.TunnelConnectionParams;
+import android.net.vcn.persistablebundleutils.TunnelConnectionParamsUtilsTest;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -59,8 +60,8 @@
};
public static final int MAX_MTU = 1360;
- public static final VcnControlPlaneConfig CONTROL_PLANE_CONFIG =
- VcnControlPlaneIkeConfigTest.buildTestConfig();
+ public static final TunnelConnectionParams TUNNEL_CONNECTION_PARAMS =
+ TunnelConnectionParamsUtilsTest.buildTestParams();
public static final String GATEWAY_CONNECTION_NAME_PREFIX = "gatewayConnectionName-";
private static int sGatewayConnectionConfigCount = 0;
@@ -75,13 +76,13 @@
// VcnGatewayConnectionConfigs have a unique name (required by VcnConfig).
return new VcnGatewayConnectionConfig.Builder(
GATEWAY_CONNECTION_NAME_PREFIX + sGatewayConnectionConfigCount++,
- CONTROL_PLANE_CONFIG);
+ TUNNEL_CONNECTION_PARAMS);
}
// Public for use in VcnGatewayConnectionTest
public static VcnGatewayConnectionConfig buildTestConfigWithExposedCaps(int... exposedCaps) {
final VcnGatewayConnectionConfig.Builder builder =
- newBuilder().setRetryInterval(RETRY_INTERVALS_MS).setMaxMtu(MAX_MTU);
+ newBuilder().setRetryIntervalsMs(RETRY_INTERVALS_MS).setMaxMtu(MAX_MTU);
for (int caps : exposedCaps) {
builder.addExposedCapability(caps);
@@ -98,7 +99,7 @@
public void testBuilderRequiresNonNullGatewayConnectionName() {
try {
new VcnGatewayConnectionConfig.Builder(
- null /* gatewayConnectionName */, CONTROL_PLANE_CONFIG)
+ null /* gatewayConnectionName */, TUNNEL_CONNECTION_PARAMS)
.build();
fail("Expected exception due to invalid gateway connection name");
@@ -107,13 +108,13 @@
}
@Test
- public void testBuilderRequiresNonNullControlPlaneConfig() {
+ public void testBuilderRequiresNonNullTunnelConnectionParams() {
try {
new VcnGatewayConnectionConfig.Builder(
- GATEWAY_CONNECTION_NAME_PREFIX, null /* ctrlPlaneConfig */)
+ GATEWAY_CONNECTION_NAME_PREFIX, null /* tunnelConnectionParams */)
.build();
- fail("Expected exception due to invalid control plane config");
+ fail("Expected exception due to the absence of tunnel connection parameters");
} catch (NullPointerException e) {
}
}
@@ -133,7 +134,7 @@
@Test
public void testBuilderRequiresNonNullRetryInterval() {
try {
- newBuilder().setRetryInterval(null);
+ newBuilder().setRetryIntervalsMs(null);
fail("Expected exception due to invalid retryIntervalMs");
} catch (IllegalArgumentException e) {
}
@@ -142,7 +143,7 @@
@Test
public void testBuilderRequiresNonEmptyRetryInterval() {
try {
- newBuilder().setRetryInterval(new long[0]);
+ newBuilder().setRetryIntervalsMs(new long[0]);
fail("Expected exception due to invalid retryIntervalMs");
} catch (IllegalArgumentException e) {
}
@@ -171,8 +172,7 @@
Arrays.sort(underlyingCaps);
assertArrayEquals(UNDERLYING_CAPS, underlyingCaps);
- assertEquals(CONTROL_PLANE_CONFIG, config.getControlPlaneConfig());
- assertFalse(CONTROL_PLANE_CONFIG == config.getControlPlaneConfig());
+ assertEquals(TUNNEL_CONNECTION_PARAMS, config.getTunnelConnectionParams());
assertArrayEquals(RETRY_INTERVALS_MS, config.getRetryIntervalsMs());
assertEquals(MAX_MTU, config.getMaxMtu());
diff --git a/tests/vcn/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtilsTest.java b/tests/vcn/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtilsTest.java
index 546d957..393787f 100644
--- a/tests/vcn/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtilsTest.java
+++ b/tests/vcn/java/android/net/vcn/persistablebundleutils/IkeSessionParamsUtilsTest.java
@@ -52,14 +52,17 @@
@RunWith(AndroidJUnit4.class)
@SmallTest
public class IkeSessionParamsUtilsTest {
- private static IkeSessionParams.Builder createBuilderMinimum() {
+ // Package private for use in EncryptedTunnelParamsUtilsTest
+ static IkeSessionParams.Builder createBuilderMinimum() {
final InetAddress serverAddress = InetAddresses.parseNumericAddress("192.0.2.100");
+ // TODO: b/185941731 Make sure all valid IKE_OPTIONS are added and validated.
return new IkeSessionParams.Builder()
.setServerHostname(serverAddress.getHostAddress())
.addSaProposal(SaProposalUtilsTest.buildTestIkeSaProposal())
.setLocalIdentification(new IkeFqdnIdentification("client.test.android.net"))
.setRemoteIdentification(new IkeFqdnIdentification("server.test.android.net"))
+ .addIkeOption(IkeSessionParams.IKE_OPTION_FORCE_PORT_4500)
.setAuthPsk("psk".getBytes());
}
diff --git a/tests/vcn/java/android/net/vcn/persistablebundleutils/TunnelConnectionParamsUtilsTest.java b/tests/vcn/java/android/net/vcn/persistablebundleutils/TunnelConnectionParamsUtilsTest.java
new file mode 100644
index 0000000..0c8ad32
--- /dev/null
+++ b/tests/vcn/java/android/net/vcn/persistablebundleutils/TunnelConnectionParamsUtilsTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021 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.net.vcn.persistablebundleutils;
+
+import static org.junit.Assert.assertEquals;
+
+import android.net.ipsec.ike.IkeTunnelConnectionParams;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class TunnelConnectionParamsUtilsTest {
+ // Public for use in VcnGatewayConnectionConfigTest
+ public static IkeTunnelConnectionParams buildTestParams() {
+ return new IkeTunnelConnectionParams(
+ IkeSessionParamsUtilsTest.createBuilderMinimum().build(),
+ TunnelModeChildSessionParamsUtilsTest.createBuilderMinimum().build());
+ }
+
+ @Test
+ public void testIkeTunnelConnectionParamsToFromPersistableBundle() {
+ final IkeTunnelConnectionParams params = buildTestParams();
+
+ assertEquals(
+ params,
+ TunnelConnectionParamsUtils.fromPersistableBundle(
+ TunnelConnectionParamsUtils.toPersistableBundle(params)));
+ }
+}
diff --git a/tests/vcn/java/android/net/vcn/persistablebundleutils/TunnelModeChildSessionParamsUtilsTest.java b/tests/vcn/java/android/net/vcn/persistablebundleutils/TunnelModeChildSessionParamsUtilsTest.java
index b3cd0ab..e0b5f0e 100644
--- a/tests/vcn/java/android/net/vcn/persistablebundleutils/TunnelModeChildSessionParamsUtilsTest.java
+++ b/tests/vcn/java/android/net/vcn/persistablebundleutils/TunnelModeChildSessionParamsUtilsTest.java
@@ -40,7 +40,8 @@
@RunWith(AndroidJUnit4.class)
@SmallTest
public class TunnelModeChildSessionParamsUtilsTest {
- private TunnelModeChildSessionParams.Builder createBuilderMinimum() {
+ // Package private for use in EncryptedTunnelParamsUtilsTest
+ static TunnelModeChildSessionParams.Builder createBuilderMinimum() {
final ChildSaProposal saProposal = SaProposalUtilsTest.buildTestChildSaProposal();
return new TunnelModeChildSessionParams.Builder().addSaProposal(saProposal);
}
diff --git a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
index 9a66343..aa4b5f8 100644
--- a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
+++ b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
@@ -96,6 +96,7 @@
import java.io.FileNotFoundException;
import java.util.Collections;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
@@ -617,6 +618,43 @@
}
@Test
+ public void testGetConfiguredSubscriptionGroupsRequiresSystemUser() throws Exception {
+ doReturn(UserHandle.getUid(UserHandle.MIN_SECONDARY_USER_ID, TEST_UID))
+ .when(mMockDeps)
+ .getBinderCallingUid();
+
+ try {
+ mVcnMgmtSvc.getConfiguredSubscriptionGroups(TEST_PACKAGE_NAME);
+ fail("Expected security exception for non system user");
+ } catch (SecurityException expected) {
+ }
+ }
+
+ @Test
+ public void testGetConfiguredSubscriptionGroupsMismatchedPackages() throws Exception {
+ final String badPackage = "IncorrectPackage";
+ doThrow(new SecurityException()).when(mAppOpsMgr).checkPackage(TEST_UID, badPackage);
+
+ try {
+ mVcnMgmtSvc.getConfiguredSubscriptionGroups(badPackage);
+ fail("Expected security exception due to mismatched packages");
+ } catch (SecurityException expected) {
+ }
+ }
+
+ @Test
+ public void testGetConfiguredSubscriptionGroups() throws Exception {
+ mVcnMgmtSvc.setVcnConfig(TEST_UUID_2, TEST_VCN_CONFIG, TEST_PACKAGE_NAME);
+
+ // Assert that if both UUID 1 and 2 are provisioned, the caller only gets ones that they are
+ // privileged for.
+ triggerSubscriptionTrackerCbAndGetSnapshot(Collections.singleton(TEST_UUID_1));
+ final List<ParcelUuid> subGrps =
+ mVcnMgmtSvc.getConfiguredSubscriptionGroups(TEST_PACKAGE_NAME);
+ assertEquals(Collections.singletonList(TEST_UUID_1), subGrps);
+ }
+
+ @Test
public void testAddVcnUnderlyingNetworkPolicyListener() throws Exception {
mVcnMgmtSvc.addVcnUnderlyingNetworkPolicyListener(mMockPolicyListener);
@@ -696,7 +734,7 @@
.addCapability(NET_CAPABILITY_NOT_VCN_MANAGED)
.addTransportType(transport);
if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
- ncBuilder.setSubIds(Collections.singleton(subId));
+ ncBuilder.setSubscriptionIds(Collections.singleton(subId));
}
return ncBuilder;
diff --git a/tests/vcn/java/com/android/server/vcn/UnderlyingNetworkTrackerTest.java b/tests/vcn/java/com/android/server/vcn/UnderlyingNetworkTrackerTest.java
index 0c7363e..8289e85 100644
--- a/tests/vcn/java/com/android/server/vcn/UnderlyingNetworkTrackerTest.java
+++ b/tests/vcn/java/com/android/server/vcn/UnderlyingNetworkTrackerTest.java
@@ -189,7 +189,7 @@
private NetworkRequest getWifiRequest(Set<Integer> netCapsSubIds) {
return getExpectedRequestBase()
.addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
- .setSubIds(netCapsSubIds)
+ .setSubscriptionIds(netCapsSubIds)
.build();
}
@@ -201,7 +201,7 @@
}
private NetworkRequest getRouteSelectionRequest(Set<Integer> netCapsSubIds) {
- return getExpectedRequestBase().setSubIds(netCapsSubIds).build();
+ return getExpectedRequestBase().setSubscriptionIds(netCapsSubIds).build();
}
private NetworkRequest.Builder getExpectedRequestBase() {
diff --git a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionConnectedStateTest.java b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionConnectedStateTest.java
index 95a9726..530e636 100644
--- a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionConnectedStateTest.java
+++ b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionConnectedStateTest.java
@@ -51,10 +51,10 @@
import android.net.NetworkAgent;
import android.net.NetworkCapabilities;
import android.net.ipsec.ike.ChildSaProposal;
+import android.net.ipsec.ike.IkeTunnelConnectionParams;
import android.net.ipsec.ike.exceptions.IkeException;
import android.net.ipsec.ike.exceptions.IkeInternalException;
import android.net.ipsec.ike.exceptions.IkeProtocolException;
-import android.net.vcn.VcnControlPlaneIkeConfig;
import android.net.vcn.VcnManager.VcnErrorCode;
import androidx.test.filters.SmallTest;
@@ -181,8 +181,8 @@
assertEquals(mGatewayConnection.mConnectedState, mGatewayConnection.getCurrentState());
final List<ChildSaProposal> saProposals =
- ((VcnControlPlaneIkeConfig) mConfig.getControlPlaneConfig())
- .getChildSessionParams()
+ ((IkeTunnelConnectionParams) mConfig.getTunnelConnectionParams())
+ .getTunnelModeChildSessionParams()
.getSaProposals();
final int expectedMtu =
MtuUtils.getMtu(
diff --git a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionRetryTimeoutStateTest.java b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionRetryTimeoutStateTest.java
index 6dbf7d5..044bef5 100644
--- a/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionRetryTimeoutStateTest.java
+++ b/tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionRetryTimeoutStateTest.java
@@ -38,7 +38,7 @@
public void setUp() throws Exception {
super.setUp();
- mFirstRetryInterval = mConfig.getRetryInterval()[0];
+ mFirstRetryInterval = mConfig.getRetryIntervalsMs()[0];
mGatewayConnection.setUnderlyingNetwork(TEST_UNDERLYING_NETWORK_RECORD_1);
mGatewayConnection.transitionTo(mGatewayConnection.mRetryTimeoutState);
diff --git a/tools/aapt2/integration-tests/MergeOnlyTest/App/Android.mk b/tools/aapt2/integration-tests/MergeOnlyTest/App/Android.mk
index 6bc2064..27b6068 100644
--- a/tools/aapt2/integration-tests/MergeOnlyTest/App/Android.mk
+++ b/tools/aapt2/integration-tests/MergeOnlyTest/App/Android.mk
@@ -20,10 +20,13 @@
LOCAL_USE_AAPT2 := true
LOCAL_AAPT_NAMESPACES := true
LOCAL_PACKAGE_NAME := AaptTestMergeOnly_App
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_EXPORT_PACKAGE_RESOURCES := true
LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_ANDROID_LIBRARIES := \
AaptTestMergeOnly_LeafLib \
AaptTestMergeOnly_LocalLib
-include $(BUILD_PACKAGE)
\ No newline at end of file
+include $(BUILD_PACKAGE)
diff --git a/tools/aapt2/integration-tests/NamespaceTest/App/Android.mk b/tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
index 4462374..98b7440 100644
--- a/tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
+++ b/tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
@@ -20,6 +20,9 @@
LOCAL_USE_AAPT2 := true
LOCAL_AAPT_NAMESPACES := true
LOCAL_PACKAGE_NAME := AaptTestNamespace_App
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_EXPORT_PACKAGE_RESOURCES := true
LOCAL_MODULE_TAGS := tests
diff --git a/tools/aapt2/integration-tests/NamespaceTest/Split/Android.mk b/tools/aapt2/integration-tests/NamespaceTest/Split/Android.mk
index 83e2289..30375728 100644
--- a/tools/aapt2/integration-tests/NamespaceTest/Split/Android.mk
+++ b/tools/aapt2/integration-tests/NamespaceTest/Split/Android.mk
@@ -20,6 +20,9 @@
LOCAL_USE_AAPT2 := true
LOCAL_AAPT_NAMESPACES := true
LOCAL_PACKAGE_NAME := AaptTestNamespace_Split
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../NOTICE
LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
diff --git a/tools/fonts/Android.bp b/tools/fonts/Android.bp
index bf50661..14c4b2c 100644
--- a/tools/fonts/Android.bp
+++ b/tools/fonts/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+
python_defaults {
name: "fonts_python_defaults",
version: {