Merge "Automatically add FEATURE_IPSEC_TUNNEL_MIGRATION for U/U+ devices." am: 3653fce54c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1634882 Change-Id: Ifb2807c681e36222f456863b57ef233923ea5694 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1521,6 +1521,8 @@ public class SystemConfig {
|
|||||||
addFeature(PackageManager.FEATURE_IPSEC_TUNNELS, 0);
|
addFeature(PackageManager.FEATURE_IPSEC_TUNNELS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enableIpSecTunnelMigrationOnVsrUAndAbove();
|
||||||
|
|
||||||
if (isErofsSupported()) {
|
if (isErofsSupported()) {
|
||||||
if (isKernelVersionAtLeast(5, 10)) {
|
if (isKernelVersionAtLeast(5, 10)) {
|
||||||
addFeature(PackageManager.FEATURE_EROFS, 0);
|
addFeature(PackageManager.FEATURE_EROFS, 0);
|
||||||
@@ -1534,6 +1536,18 @@ public class SystemConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method only enables a new Android feature added in U and will not have impact on app
|
||||||
|
// compatibility
|
||||||
|
@SuppressWarnings("AndroidFrameworkCompatChange")
|
||||||
|
private void enableIpSecTunnelMigrationOnVsrUAndAbove() {
|
||||||
|
final int vsrApi =
|
||||||
|
SystemProperties.getInt(
|
||||||
|
"ro.vendor.api_level", Build.VERSION.DEVICE_INITIAL_SDK_INT);
|
||||||
|
if (vsrApi > Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
addFeature(PackageManager.FEATURE_IPSEC_TUNNEL_MIGRATION, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void addFeature(String name, int version) {
|
private void addFeature(String name, int version) {
|
||||||
FeatureInfo fi = mAvailableFeatures.get(name);
|
FeatureInfo fi = mAvailableFeatures.get(name);
|
||||||
if (fi == null) {
|
if (fi == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user