Merge "Add errorcode in AconfigStorageException" into main
diff --git a/core/main.mk b/core/main.mk
index 2b8c132..5142adc 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -984,7 +984,6 @@
# variables being set.
define auto-included-modules
$(foreach vndk_ver,$(PRODUCT_EXTRA_VNDK_VERSIONS),com.android.vndk.v$(vndk_ver)) \
- $(filter-out $(LLNDK_MOVED_TO_APEX_LIBRARIES),$(LLNDK_LIBRARIES)) \
llndk.libraries.txt \
$(if $(DEVICE_MANIFEST_SKUS),$(foreach sku, $(DEVICE_MANIFEST_SKUS),vendor_manifest_$(sku).xml)) \
$(if $(ODM_MANIFEST_FILES),odm_manifest.xml) \
diff --git a/core/product_config.mk b/core/product_config.mk
index 3e1f120..abe6e38 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -424,10 +424,12 @@
endif
endif
-$(foreach pair,$(PRODUCT_APEX_BOOT_JARS), \
- $(eval jar := $(call word-colon,2,$(pair))) \
- $(if $(findstring $(jar), $(PRODUCT_BOOT_JARS)), \
- $(error A jar in PRODUCT_APEX_BOOT_JARS must not be in PRODUCT_BOOT_JARS, but $(jar) is)))
+$(foreach apexpair,$(PRODUCT_APEX_BOOT_JARS), \
+ $(foreach platformpair,$(PRODUCT_BOOT_JARS), \
+ $(eval apexjar := $(call word-colon,2,$(apexpair))) \
+ $(eval platformjar := $(call word-colon,2,$(platformpair))) \
+ $(if $(filter $(apexjar), $(platformjar)), \
+ $(error A jar in PRODUCT_APEX_BOOT_JARS must not be in PRODUCT_BOOT_JARS, but $(apexjar) is))))
ENFORCE_SYSTEM_CERTIFICATE := $(PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT)
ENFORCE_SYSTEM_CERTIFICATE_ALLOW_LIST := $(PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_ALLOW_LIST)
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 5bdf0f1..c0641de 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -441,6 +441,10 @@
$(call add_json_bool, BuildingSystemDlkmImage, $(BUILDING_SYSTEM_DLKM_IMAGE))
$(call add_json_list, SystemKernelModules, $(BOARD_SYSTEM_KERNEL_MODULES))
+ # Used to generate /vendor/build.prop
+ $(call add_json_list, BoardInfoFiles, $(if $(TARGET_BOARD_INFO_FILES),$(TARGET_BOARD_INFO_FILES),$(firstword $(TARGET_BOARD_INFO_FILE) $(wildcard $(TARGET_DEVICE_DIR)/board-info.txt))))
+ $(call add_json_str, BootLoaderBoardName, $(TARGET_BOOTLOADER_BOARD_NAME))
+
$(call add_json_map, ProductCopyFiles)
$(foreach pair,$(PRODUCT_COPY_FILES),\
$(call add_json_str,$(word 1,$(subst :, ,$(pair))),$(word 2,$(subst :, ,$(pair)))))
diff --git a/core/sysprop.mk b/core/sysprop.mk
index dc6f2c4..9b70d1c 100644
--- a/core/sysprop.mk
+++ b/core/sysprop.mk
@@ -281,51 +281,17 @@
# ----------------------------------------------------------------
# vendor_dlkm/etc/build.prop
-#
+# odm_dlkm/etc/build.prop
+# system_dlkm/build.prop
+# These are built by Soong. See build/soong/Android.bp
INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR_DLKM)/etc/build.prop
-$(eval $(call build-properties,\
- vendor_dlkm,\
- $(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET),\
- $(empty),\
- $(empty),\
- $(empty),\
- $(empty),\
- $(empty)))
-
-$(eval $(call declare-1p-target,$(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET)))
-
-# ----------------------------------------------------------------
-# odm_dlkm/etc/build.prop
-#
-
INSTALLED_ODM_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM_DLKM)/etc/build.prop
-$(eval $(call build-properties,\
- odm_dlkm,\
- $(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET),\
- $(empty),\
- $(empty),\
- $(empty),\
- $(empty),\
- $(empty)))
-
-$(eval $(call declare-1p-target,$(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET)))
-
-# ----------------------------------------------------------------
-# system_dlkm/build.prop
-#
-
INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_DLKM)/etc/build.prop
-$(eval $(call build-properties,\
- system_dlkm,\
- $(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET),\
- $(empty),\
- $(empty),\
- $(empty),\
- $(empty),\
- $(empty)))
-
-$(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET)))
+ALL_DEFAULT_INSTALLED_MODULES += \
+ $(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET) \
+ $(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET) \
+ $(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET) \
# -----------------------------------------------------------------
# system_ext/etc/build.prop
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 8f2f7e3..9d6402e 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -96,6 +96,7 @@
enhanced-confirmation.xml \
ExtShared \
flags_health_check \
+ framework-connectivity-b \
framework-graphics \
framework-location \
framework-minus-apex \
@@ -211,6 +212,7 @@
libwilhelm \
linker \
llkd \
+ llndk_libs \
lmkd \
LocalTransport \
locksettings \
diff --git a/target/product/build_variables.mk b/target/product/build_variables.mk
index 9fc9ff9..7661e06 100644
--- a/target/product/build_variables.mk
+++ b/target/product/build_variables.mk
@@ -22,3 +22,6 @@
# Use the configured release of sqlite
$(call soong_config_set, libsqlite3, release_package_libsqlite3, $(RELEASE_PACKAGE_LIBSQLITE3))
+
+# Use the configured MessageQueue implementation
+$(call soong_config_set, messagequeue, release_package_messagequeue_implementation, $(RELEASE_PACKAGE_MESSAGEQUEUE_IMPLEMENTATION))
diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk
index 668f054..83d9215 100644
--- a/target/product/default_art_config.mk
+++ b/target/product/default_art_config.mk
@@ -51,6 +51,7 @@
framework-minus-apex \
framework-graphics \
framework-location \
+ framework-connectivity-b \
ext \
telephony-common \
voip-common \
diff --git a/target/product/generic/Android.bp b/target/product/generic/Android.bp
index 017f8fb..c81e66c 100644
--- a/target/product/generic/Android.bp
+++ b/target/product/generic/Android.bp
@@ -701,6 +701,7 @@
"framework-graphics", // base_system
"framework-location", // base_system
"framework-minus-apex-install-dependencies", // base_system
+ "framework-connectivity-b", // base_system
"framework_compatibility_matrix.device.xml",
"generic_system_fonts", // ok
"hwservicemanager_compat_symlink_module", // base_system
diff --git a/target/product/generic_ramdisk.mk b/target/product/generic_ramdisk.mk
index ebac62f..388b180 100644
--- a/target/product/generic_ramdisk.mk
+++ b/target/product/generic_ramdisk.mk
@@ -35,8 +35,6 @@
_my_paths := \
$(TARGET_COPY_OUT_RAMDISK)/ \
$(TARGET_COPY_OUT_DEBUG_RAMDISK)/ \
- system/usr/share/zoneinfo/tz_version \
- system/usr/share/zoneinfo/tzdata \
$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/system \
diff --git a/tools/aconfig/aconfig/src/codegen/java.rs b/tools/aconfig/aconfig/src/codegen/java.rs
index 067a3b4..bfdf1a7 100644
--- a/tools/aconfig/aconfig/src/codegen/java.rs
+++ b/tools/aconfig/aconfig/src/codegen/java.rs
@@ -513,6 +513,7 @@
package com.android.aconfig.test;
// TODO(b/303773055): Remove the annotation after access issue is resolved.
import android.compat.annotation.UnsupportedAppUsage;
+ import android.os.Binder;
import android.provider.DeviceConfig;
import android.provider.DeviceConfig.Properties;
import android.aconfig.storage.StorageInternalReader;
@@ -544,6 +545,7 @@
isCached = true;
}
private void load_overrides_aconfig_test() {
+ final long ident = Binder.clearCallingIdentity();
try {
Properties properties = DeviceConfig.getProperties("aconfig_test");
disabledRw =
@@ -563,11 +565,14 @@
);
} catch (SecurityException e) {
// for isolated process case, skip loading flag value from the storage, use the default
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
aconfig_test_is_cached = true;
}
private void load_overrides_other_namespace() {
+ final long ident = Binder.clearCallingIdentity();
try {
Properties properties = DeviceConfig.getProperties("other_namespace");
disabledRwInOtherNamespace =
@@ -583,6 +588,8 @@
);
} catch (SecurityException e) {
// for isolated process case, skip loading flag value from the storage, use the default
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
other_namespace_is_cached = true;
}
@@ -764,6 +771,7 @@
let expect_feature_flags_impl_content = r#"
package com.android.aconfig.test;
+ import android.os.Binder;
import android.provider.DeviceConfig;
import android.provider.DeviceConfig.Properties;
/** @hide */
@@ -774,6 +782,7 @@
private static boolean enabledRoExported = false;
private void load_overrides_aconfig_test() {
+ final long ident = Binder.clearCallingIdentity();
try {
Properties properties = DeviceConfig.getProperties("aconfig_test");
disabledRwExported =
@@ -793,6 +802,8 @@
);
} catch (SecurityException e) {
// for isolated process case, skip loading flag value from the storage, use the default
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
aconfig_test_is_cached = true;
}
diff --git a/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template b/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
index 15df902..cb52150 100644
--- a/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
+++ b/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
@@ -7,6 +7,7 @@
{{ -endif }}
{{ -if runtime_lookup_required }}
+import android.os.Binder;
import android.provider.DeviceConfig;
import android.provider.DeviceConfig.Properties;
@@ -57,6 +58,7 @@
{{ for namespace_with_flags in namespace_flags }}
private void load_overrides_{namespace_with_flags.namespace}() \{
+ final long ident = Binder.clearCallingIdentity();
try \{
Properties properties = DeviceConfig.getProperties("{namespace_with_flags.namespace}");
{{ -for flag in namespace_with_flags.flags }}
@@ -76,6 +78,8 @@
);
} catch (SecurityException e) \{
// for isolated process case, skip loading flag value from the storage, use the default
+ } finally \{
+ Binder.restoreCallingIdentity(ident);
}
{namespace_with_flags.namespace}_is_cached = true;
}
@@ -121,6 +125,7 @@
{{ -endif }}
{{ -if runtime_lookup_required }}
+import android.os.Binder;
import android.provider.DeviceConfig;
import android.provider.DeviceConfig.Properties;
{{ -endif }}
@@ -138,6 +143,7 @@
{{ -endfor }}
{{ for namespace_with_flags in namespace_flags }}
private void load_overrides_{namespace_with_flags.namespace}() \{
+ final long ident = Binder.clearCallingIdentity();
try \{
Properties properties = DeviceConfig.getProperties("{namespace_with_flags.namespace}");
{{ -for flag in namespace_with_flags.flags }}
@@ -155,6 +161,8 @@
+ "flag declaration.",
e
);
+ } finally \{
+ Binder.restoreCallingIdentity(ident);
}
{namespace_with_flags.namespace}_is_cached = true;
}
diff --git a/tools/aconfig/fake_device_config/src/android/os/Binder.java b/tools/aconfig/fake_device_config/src/android/os/Binder.java
new file mode 100644
index 0000000..8a2313d
--- /dev/null
+++ b/tools/aconfig/fake_device_config/src/android/os/Binder.java
@@ -0,0 +1,26 @@
+/*
+ * 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.os;
+
+public class Binder {
+ public static final long clearCallingIdentity() {
+ throw new UnsupportedOperationException("Stub!");
+ }
+ public static final void restoreCallingIdentity(long token) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+}