Loading Ravenwood.bp +12 −12 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ java_genrule { name: "framework-minus-apex.ravenwood-base", tools: ["hoststubgen"], cmd: "$(location hoststubgen) " + "@$(location ravenwood/texts/ravenwood-standard-options.txt) " + "@$(location :ravenwood-standard-options) " + "--debug-log $(location hoststubgen_framework-minus-apex.log) " + "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + Loading @@ -42,13 +42,13 @@ java_genrule { "--gen-input-dump-file $(location hoststubgen_dump.txt) " + "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + "--policy-override-file $(location ravenwood/texts/framework-minus-apex-ravenwood-policies.txt) " + "--annotation-allowed-classes-file $(location ravenwood/texts/ravenwood-annotation-allowed-classes.txt) ", "--policy-override-file $(location :ravenwood-framework-policies) " + "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", srcs: [ ":framework-minus-apex-for-hoststubgen", "ravenwood/texts/framework-minus-apex-ravenwood-policies.txt", "ravenwood/texts/ravenwood-standard-options.txt", "ravenwood/texts/ravenwood-annotation-allowed-classes.txt", ":ravenwood-framework-policies", ":ravenwood-standard-options", ":ravenwood-annotation-allowed-classes", ], out: [ "ravenwood.jar", Loading Loading @@ -118,7 +118,7 @@ java_genrule { name: "services.core.ravenwood-base", tools: ["hoststubgen"], cmd: "$(location hoststubgen) " + "@$(location ravenwood/texts/ravenwood-standard-options.txt) " + "@$(location :ravenwood-standard-options) " + "--debug-log $(location hoststubgen_services.core.log) " + "--stats-file $(location hoststubgen_services.core_stats.csv) " + Loading @@ -130,13 +130,13 @@ java_genrule { "--gen-input-dump-file $(location hoststubgen_dump.txt) " + "--in-jar $(location :services.core-for-hoststubgen) " + "--policy-override-file $(location ravenwood/texts/services.core-ravenwood-policies.txt) " + "--annotation-allowed-classes-file $(location ravenwood/texts/ravenwood-annotation-allowed-classes.txt) ", "--policy-override-file $(location :ravenwood-services-policies) " + "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", srcs: [ ":services.core-for-hoststubgen", "ravenwood/texts/services.core-ravenwood-policies.txt", "ravenwood/texts/ravenwood-standard-options.txt", "ravenwood/texts/ravenwood-annotation-allowed-classes.txt", ":ravenwood-services-policies", ":ravenwood-standard-options", ":ravenwood-annotation-allowed-classes", ], out: [ "ravenwood.jar", Loading config/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ prebuilt_etc { name: "preloaded-classes", src: "preloaded-classes", filename: "preloaded-classes", installable: false, no_full_install: true, } filegroup { Loading core/java/android/app/admin/StringSetPolicyValue.java→core/java/android/app/admin/PackageSetPolicyValue.java +13 −13 Original line number Diff line number Diff line Loading @@ -28,18 +28,18 @@ import java.util.Set; /** * @hide */ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { public final class PackageSetPolicyValue extends PolicyValue<Set<String>> { public StringSetPolicyValue(@NonNull Set<String> value) { public PackageSetPolicyValue(@NonNull Set<String> value) { super(value); if (Flags.devicePolicySizeTrackingInternalBugFixEnabled()) { for (String str : value) { PolicySizeVerifier.enforceMaxStringLength(str, "policyValue"); for (String packageName : value) { PolicySizeVerifier.enforceMaxPackageNameLength(packageName); } } } public StringSetPolicyValue(Parcel source) { public PackageSetPolicyValue(Parcel source) { this(readValues(source)); } Loading @@ -56,7 +56,7 @@ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { public boolean equals(@Nullable Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; StringSetPolicyValue other = (StringSetPolicyValue) o; PackageSetPolicyValue other = (PackageSetPolicyValue) o; return Objects.equals(getValue(), other.getValue()); } Loading @@ -67,7 +67,7 @@ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { @Override public String toString() { return "StringSetPolicyValue { " + getValue() + " }"; return "PackageNameSetPolicyValue { " + getValue() + " }"; } @Override Loading @@ -84,16 +84,16 @@ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { } @NonNull public static final Creator<StringSetPolicyValue> CREATOR = new Creator<StringSetPolicyValue>() { public static final Creator<PackageSetPolicyValue> CREATOR = new Creator<PackageSetPolicyValue>() { @Override public StringSetPolicyValue createFromParcel(Parcel source) { return new StringSetPolicyValue(source); public PackageSetPolicyValue createFromParcel(Parcel source) { return new PackageSetPolicyValue(source); } @Override public StringSetPolicyValue[] newArray(int size) { return new StringSetPolicyValue[size]; public PackageSetPolicyValue[] newArray(int size) { return new PackageSetPolicyValue[size]; } }; } core/java/android/app/admin/SystemUpdatePolicy.java +5 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,11 @@ import java.util.stream.Collectors; * * <h3>Developer guide</h3> * To learn more, read <a href="{@docRoot}work/dpc/system-updates">Manage system updates</a>. * <p><strong>Note:</strong> <a href="https://source.android.com/docs/core/ota/modular-system"> * Google Play system updates</a> (also called Mainline updates) are automatically downloaded * but require a device reboot to be installed. Refer to the mainline section in * <a href="{@docRoot}work/dpc/system-updates#mainline">Manage system * updates</a> for further details.</p> * * @see DevicePolicyManager#setSystemUpdatePolicy * @see DevicePolicyManager#getSystemUpdatePolicy Loading core/java/android/tracing/inputmethod/InputMethodDataSource.java 0 → 100644 +58 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.tracing.inputmethod; import android.annotation.NonNull; import android.tracing.perfetto.DataSource; import android.tracing.perfetto.DataSourceInstance; import android.tracing.perfetto.StartCallbackArguments; import android.tracing.perfetto.StopCallbackArguments; import android.util.proto.ProtoInputStream; /** * @hide */ public final class InputMethodDataSource extends DataSource<DataSourceInstance, Void, Void> { public static final String DATA_SOURCE_NAME = "android.inputmethod"; @NonNull private final Runnable mOnStartCallback; @NonNull private final Runnable mOnStopCallback; public InputMethodDataSource(@NonNull Runnable onStart, @NonNull Runnable onStop) { super(DATA_SOURCE_NAME); mOnStartCallback = onStart; mOnStopCallback = onStop; } @Override public DataSourceInstance createInstance(ProtoInputStream configStream, int instanceIndex) { return new DataSourceInstance(this, instanceIndex) { @Override protected void onStart(StartCallbackArguments args) { mOnStartCallback.run(); } @Override protected void onStop(StopCallbackArguments args) { mOnStopCallback.run(); } }; } } Loading
Ravenwood.bp +12 −12 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ java_genrule { name: "framework-minus-apex.ravenwood-base", tools: ["hoststubgen"], cmd: "$(location hoststubgen) " + "@$(location ravenwood/texts/ravenwood-standard-options.txt) " + "@$(location :ravenwood-standard-options) " + "--debug-log $(location hoststubgen_framework-minus-apex.log) " + "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + Loading @@ -42,13 +42,13 @@ java_genrule { "--gen-input-dump-file $(location hoststubgen_dump.txt) " + "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + "--policy-override-file $(location ravenwood/texts/framework-minus-apex-ravenwood-policies.txt) " + "--annotation-allowed-classes-file $(location ravenwood/texts/ravenwood-annotation-allowed-classes.txt) ", "--policy-override-file $(location :ravenwood-framework-policies) " + "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", srcs: [ ":framework-minus-apex-for-hoststubgen", "ravenwood/texts/framework-minus-apex-ravenwood-policies.txt", "ravenwood/texts/ravenwood-standard-options.txt", "ravenwood/texts/ravenwood-annotation-allowed-classes.txt", ":ravenwood-framework-policies", ":ravenwood-standard-options", ":ravenwood-annotation-allowed-classes", ], out: [ "ravenwood.jar", Loading Loading @@ -118,7 +118,7 @@ java_genrule { name: "services.core.ravenwood-base", tools: ["hoststubgen"], cmd: "$(location hoststubgen) " + "@$(location ravenwood/texts/ravenwood-standard-options.txt) " + "@$(location :ravenwood-standard-options) " + "--debug-log $(location hoststubgen_services.core.log) " + "--stats-file $(location hoststubgen_services.core_stats.csv) " + Loading @@ -130,13 +130,13 @@ java_genrule { "--gen-input-dump-file $(location hoststubgen_dump.txt) " + "--in-jar $(location :services.core-for-hoststubgen) " + "--policy-override-file $(location ravenwood/texts/services.core-ravenwood-policies.txt) " + "--annotation-allowed-classes-file $(location ravenwood/texts/ravenwood-annotation-allowed-classes.txt) ", "--policy-override-file $(location :ravenwood-services-policies) " + "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", srcs: [ ":services.core-for-hoststubgen", "ravenwood/texts/services.core-ravenwood-policies.txt", "ravenwood/texts/ravenwood-standard-options.txt", "ravenwood/texts/ravenwood-annotation-allowed-classes.txt", ":ravenwood-services-policies", ":ravenwood-standard-options", ":ravenwood-annotation-allowed-classes", ], out: [ "ravenwood.jar", Loading
config/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ prebuilt_etc { name: "preloaded-classes", src: "preloaded-classes", filename: "preloaded-classes", installable: false, no_full_install: true, } filegroup { Loading
core/java/android/app/admin/StringSetPolicyValue.java→core/java/android/app/admin/PackageSetPolicyValue.java +13 −13 Original line number Diff line number Diff line Loading @@ -28,18 +28,18 @@ import java.util.Set; /** * @hide */ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { public final class PackageSetPolicyValue extends PolicyValue<Set<String>> { public StringSetPolicyValue(@NonNull Set<String> value) { public PackageSetPolicyValue(@NonNull Set<String> value) { super(value); if (Flags.devicePolicySizeTrackingInternalBugFixEnabled()) { for (String str : value) { PolicySizeVerifier.enforceMaxStringLength(str, "policyValue"); for (String packageName : value) { PolicySizeVerifier.enforceMaxPackageNameLength(packageName); } } } public StringSetPolicyValue(Parcel source) { public PackageSetPolicyValue(Parcel source) { this(readValues(source)); } Loading @@ -56,7 +56,7 @@ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { public boolean equals(@Nullable Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; StringSetPolicyValue other = (StringSetPolicyValue) o; PackageSetPolicyValue other = (PackageSetPolicyValue) o; return Objects.equals(getValue(), other.getValue()); } Loading @@ -67,7 +67,7 @@ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { @Override public String toString() { return "StringSetPolicyValue { " + getValue() + " }"; return "PackageNameSetPolicyValue { " + getValue() + " }"; } @Override Loading @@ -84,16 +84,16 @@ public final class StringSetPolicyValue extends PolicyValue<Set<String>> { } @NonNull public static final Creator<StringSetPolicyValue> CREATOR = new Creator<StringSetPolicyValue>() { public static final Creator<PackageSetPolicyValue> CREATOR = new Creator<PackageSetPolicyValue>() { @Override public StringSetPolicyValue createFromParcel(Parcel source) { return new StringSetPolicyValue(source); public PackageSetPolicyValue createFromParcel(Parcel source) { return new PackageSetPolicyValue(source); } @Override public StringSetPolicyValue[] newArray(int size) { return new StringSetPolicyValue[size]; public PackageSetPolicyValue[] newArray(int size) { return new PackageSetPolicyValue[size]; } }; }
core/java/android/app/admin/SystemUpdatePolicy.java +5 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,11 @@ import java.util.stream.Collectors; * * <h3>Developer guide</h3> * To learn more, read <a href="{@docRoot}work/dpc/system-updates">Manage system updates</a>. * <p><strong>Note:</strong> <a href="https://source.android.com/docs/core/ota/modular-system"> * Google Play system updates</a> (also called Mainline updates) are automatically downloaded * but require a device reboot to be installed. Refer to the mainline section in * <a href="{@docRoot}work/dpc/system-updates#mainline">Manage system * updates</a> for further details.</p> * * @see DevicePolicyManager#setSystemUpdatePolicy * @see DevicePolicyManager#getSystemUpdatePolicy Loading
core/java/android/tracing/inputmethod/InputMethodDataSource.java 0 → 100644 +58 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.tracing.inputmethod; import android.annotation.NonNull; import android.tracing.perfetto.DataSource; import android.tracing.perfetto.DataSourceInstance; import android.tracing.perfetto.StartCallbackArguments; import android.tracing.perfetto.StopCallbackArguments; import android.util.proto.ProtoInputStream; /** * @hide */ public final class InputMethodDataSource extends DataSource<DataSourceInstance, Void, Void> { public static final String DATA_SOURCE_NAME = "android.inputmethod"; @NonNull private final Runnable mOnStartCallback; @NonNull private final Runnable mOnStopCallback; public InputMethodDataSource(@NonNull Runnable onStart, @NonNull Runnable onStop) { super(DATA_SOURCE_NAME); mOnStartCallback = onStart; mOnStopCallback = onStop; } @Override public DataSourceInstance createInstance(ProtoInputStream configStream, int instanceIndex) { return new DataSourceInstance(this, instanceIndex) { @Override protected void onStart(StartCallbackArguments args) { mOnStartCallback.run(); } @Override protected void onStop(StopCallbackArguments args) { mOnStopCallback.run(); } }; } }