Merge "lshal: Fix empty hidl_array access." into main
diff --git a/cmds/atrace/atrace.rc b/cmds/atrace/atrace.rc
index 9b357e7..fdac5db 100644
--- a/cmds/atrace/atrace.rc
+++ b/cmds/atrace/atrace.rc
@@ -319,7 +319,7 @@
# Only create the tracing instance if persist.mm_events.enabled
# Attempting to remove the tracing instance after it has been created
# will likely fail with EBUSY as it would be in use by traced_probes.
-on post-fs-data && property:persist.mm_events.enabled=true
+on mm_events_property_available && property:persist.mm_events.enabled=true
# Create MM Events Tracing Instance for Kmem Activity Trigger
mkdir /sys/kernel/debug/tracing/instances/mm_events 0755 system system
mkdir /sys/kernel/tracing/instances/mm_events 0755 system system
@@ -404,6 +404,9 @@
chmod 0666 /sys/kernel/debug/tracing/instances/mm_events/per_cpu/cpu23/trace
chmod 0666 /sys/kernel/tracing/instances/mm_events/per_cpu/cpu23/trace
+on property:ro.persistent_properties.ready=true
+ trigger mm_events_property_available
+
# Handle hyp tracing instance
on late-init && property:ro.boot.hypervisor.vm.supported=1
diff --git a/data/etc/Android.bp b/data/etc/Android.bp
index e90b8d8..89c6c0f 100644
--- a/data/etc/Android.bp
+++ b/data/etc/Android.bp
@@ -317,6 +317,12 @@
}
prebuilt_etc {
+ name: "android.hardware.vulkan.compute-0.prebuilt.xml",
+ src: "android.hardware.vulkan.compute-0.xml",
+ defaults: ["frameworks_native_data_etc_defaults"],
+}
+
+prebuilt_etc {
name: "android.hardware.vulkan.level-1.prebuilt.xml",
src: "android.hardware.vulkan.level-1.xml",
defaults: ["frameworks_native_data_etc_defaults"],
diff --git a/include/android/surface_control.h b/include/android/surface_control.h
index cce2e46..23461e2 100644
--- a/include/android/surface_control.h
+++ b/include/android/surface_control.h
@@ -346,7 +346,7 @@
*/
void ASurfaceTransaction_setBuffer(ASurfaceTransaction* transaction,
ASurfaceControl* surface_control, AHardwareBuffer* buffer,
- int acquire_fence_fd = -1) __INTRODUCED_IN(29);
+ int acquire_fence_fd) __INTRODUCED_IN(29);
/**
* Updates the color for \a surface_control. This will make the background color for the
diff --git a/libs/binder/ndk/Android.bp b/libs/binder/ndk/Android.bp
index ccf3ce8..30dbddd 100644
--- a/libs/binder/ndk/Android.bp
+++ b/libs/binder/ndk/Android.bp
@@ -40,6 +40,7 @@
llndk: {
symbol_file: "libbinder_ndk.map.txt",
+ export_llndk_headers: ["libvendorsupport_llndk_headers"],
},
export_include_dirs: [
@@ -79,9 +80,11 @@
],
header_libs: [
+ "libvendorsupport_llndk_headers",
"jni_headers",
],
export_header_lib_headers: [
+ "libvendorsupport_llndk_headers",
"jni_headers",
],
diff --git a/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h b/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h
index 864ff50..3aacbe9 100644
--- a/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h
+++ b/libs/binder/ndk/include_cpp/android/persistable_bundle_aidl.h
@@ -24,6 +24,13 @@
namespace aidl::android::os {
+#if defined(__ANDROID_VENDOR__)
+#define AT_LEAST_V_OR_202404 constexpr(__ANDROID_VENDOR_API__ >= 202404)
+#else
+// TODO(b/322384429) switch this to __ANDROID_API_V__ when V is finalized
+#define AT_LEAST_V_OR_202404 (__builtin_available(android __ANDROID_API_FUTURE__, *))
+#endif
+
/**
* Wrapper class that enables interop with AIDL NDK generation
* Takes ownership of the APersistableBundle* given to it in reset() and will automatically
@@ -32,7 +39,7 @@
class PersistableBundle {
public:
PersistableBundle() noexcept {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
mPBundle = APersistableBundle_new();
}
}
@@ -42,13 +49,13 @@
PersistableBundle(PersistableBundle&& other) noexcept : mPBundle(other.release()) {}
// duplicates, does not take ownership of the APersistableBundle*
PersistableBundle(const PersistableBundle& other) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
mPBundle = APersistableBundle_dup(other.mPBundle);
}
}
// duplicates, does not take ownership of the APersistableBundle*
PersistableBundle& operator=(const PersistableBundle& other) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
mPBundle = APersistableBundle_dup(other.mPBundle);
}
return *this;
@@ -58,7 +65,7 @@
binder_status_t readFromParcel(const AParcel* _Nonnull parcel) {
reset();
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_readFromParcel(parcel, &mPBundle);
} else {
return STATUS_INVALID_OPERATION;
@@ -69,7 +76,7 @@
if (!mPBundle) {
return STATUS_BAD_VALUE;
}
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_writeToParcel(mPBundle, parcel);
} else {
return STATUS_INVALID_OPERATION;
@@ -84,7 +91,7 @@
*/
void reset(APersistableBundle* _Nullable pBundle = nullptr) noexcept {
if (mPBundle) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle_delete(mPBundle);
}
mPBundle = nullptr;
@@ -97,7 +104,7 @@
* what should be used to check for equality.
*/
bool deepEquals(const PersistableBundle& rhs) const {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_isEqual(get(), rhs.get());
} else {
return false;
@@ -136,7 +143,7 @@
inline std::string toString() const {
if (!mPBundle) {
return "<PersistableBundle: null>";
- } else if (__builtin_available(android __ANDROID_API_V__, *)) {
+ } else if AT_LEAST_V_OR_202404 {
std::ostringstream os;
os << "<PersistableBundle: ";
os << "size: " << std::to_string(APersistableBundle_size(mPBundle));
@@ -147,7 +154,7 @@
}
int32_t size() const {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_size(mPBundle);
} else {
return 0;
@@ -155,7 +162,7 @@
}
int32_t erase(const std::string& key) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_erase(mPBundle, key.c_str());
} else {
return 0;
@@ -163,37 +170,37 @@
}
void putBoolean(const std::string& key, bool val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle_putBoolean(mPBundle, key.c_str(), val);
}
}
void putInt(const std::string& key, int32_t val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle_putInt(mPBundle, key.c_str(), val);
}
}
void putLong(const std::string& key, int64_t val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle_putLong(mPBundle, key.c_str(), val);
}
}
void putDouble(const std::string& key, double val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle_putDouble(mPBundle, key.c_str(), val);
}
}
void putString(const std::string& key, const std::string& val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle_putString(mPBundle, key.c_str(), val.c_str());
}
}
void putBooleanVector(const std::string& key, const std::vector<bool>& vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
// std::vector<bool> has no ::data().
int32_t num = vec.size();
if (num > 0) {
@@ -210,7 +217,7 @@
}
void putIntVector(const std::string& key, const std::vector<int32_t>& vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
int32_t num = vec.size();
if (num > 0) {
APersistableBundle_putIntVector(mPBundle, key.c_str(), vec.data(), num);
@@ -218,7 +225,7 @@
}
}
void putLongVector(const std::string& key, const std::vector<int64_t>& vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
int32_t num = vec.size();
if (num > 0) {
APersistableBundle_putLongVector(mPBundle, key.c_str(), vec.data(), num);
@@ -226,7 +233,7 @@
}
}
void putDoubleVector(const std::string& key, const std::vector<double>& vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
int32_t num = vec.size();
if (num > 0) {
APersistableBundle_putDoubleVector(mPBundle, key.c_str(), vec.data(), num);
@@ -234,7 +241,7 @@
}
}
void putStringVector(const std::string& key, const std::vector<std::string>& vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
int32_t num = vec.size();
if (num > 0) {
char** inVec = (char**)malloc(num * sizeof(char*));
@@ -249,13 +256,13 @@
}
}
void putPersistableBundle(const std::string& key, const PersistableBundle& pBundle) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle_putPersistableBundle(mPBundle, key.c_str(), pBundle.mPBundle);
}
}
bool getBoolean(const std::string& key, bool* _Nonnull val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_getBoolean(mPBundle, key.c_str(), val);
} else {
return false;
@@ -263,7 +270,7 @@
}
bool getInt(const std::string& key, int32_t* _Nonnull val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_getInt(mPBundle, key.c_str(), val);
} else {
return false;
@@ -271,7 +278,7 @@
}
bool getLong(const std::string& key, int64_t* _Nonnull val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_getLong(mPBundle, key.c_str(), val);
} else {
return false;
@@ -279,7 +286,7 @@
}
bool getDouble(const std::string& key, double* _Nonnull val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return APersistableBundle_getDouble(mPBundle, key.c_str(), val);
} else {
return false;
@@ -291,7 +298,7 @@
}
bool getString(const std::string& key, std::string* _Nonnull val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
char* outString = nullptr;
bool ret = APersistableBundle_getString(mPBundle, key.c_str(), &outString,
&stringAllocator, nullptr);
@@ -309,7 +316,7 @@
const char* _Nonnull, T* _Nullable, int32_t),
const APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
std::vector<T>* _Nonnull vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
int32_t bytes = 0;
// call first with nullptr to get required size in bytes
bytes = getVec(pBundle, key, nullptr, 0);
@@ -331,28 +338,28 @@
}
bool getBooleanVector(const std::string& key, std::vector<bool>* _Nonnull vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getVecInternal<bool>(&APersistableBundle_getBooleanVector, mPBundle, key.c_str(),
vec);
}
return false;
}
bool getIntVector(const std::string& key, std::vector<int32_t>* _Nonnull vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getVecInternal<int32_t>(&APersistableBundle_getIntVector, mPBundle, key.c_str(),
vec);
}
return false;
}
bool getLongVector(const std::string& key, std::vector<int64_t>* _Nonnull vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getVecInternal<int64_t>(&APersistableBundle_getLongVector, mPBundle, key.c_str(),
vec);
}
return false;
}
bool getDoubleVector(const std::string& key, std::vector<double>* _Nonnull vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getVecInternal<double>(&APersistableBundle_getDoubleVector, mPBundle,
key.c_str(), vec);
}
@@ -377,7 +384,7 @@
}
bool getStringVector(const std::string& key, std::vector<std::string>* _Nonnull vec) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
int32_t bytes = APersistableBundle_getStringVector(mPBundle, key.c_str(), nullptr, 0,
&stringAllocator, nullptr);
if (bytes > 0) {
@@ -394,7 +401,7 @@
}
bool getPersistableBundle(const std::string& key, PersistableBundle* _Nonnull val) {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
APersistableBundle* bundle = nullptr;
bool ret = APersistableBundle_getPersistableBundle(mPBundle, key.c_str(), &bundle);
if (ret) {
@@ -426,77 +433,77 @@
}
std::set<std::string> getBooleanKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getBooleanKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getIntKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getIntKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getLongKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getLongKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getDoubleKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getDoubleKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getStringKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getStringKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getBooleanVectorKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getBooleanVectorKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getIntVectorKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getIntVectorKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getLongVectorKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getLongVectorKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getDoubleVectorKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getDoubleVectorKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getStringVectorKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getStringVectorKeys, mPBundle);
} else {
return {};
}
}
std::set<std::string> getPersistableBundleKeys() {
- if (__builtin_available(android __ANDROID_API_V__, *)) {
+ if AT_LEAST_V_OR_202404 {
return getKeys(&APersistableBundle_getPersistableBundleKeys, mPBundle);
} else {
return {};
diff --git a/libs/binder/ndk/include_ndk/android/persistable_bundle.h b/libs/binder/ndk/include_ndk/android/persistable_bundle.h
index 98c0cb2..1247e8e 100644
--- a/libs/binder/ndk/include_ndk/android/persistable_bundle.h
+++ b/libs/binder/ndk/include_ndk/android/persistable_bundle.h
@@ -17,6 +17,11 @@
#pragma once
#include <android/binder_parcel.h>
+#if defined(__ANDROID_VENDOR__)
+#include <android/llndk-versioning.h>
+#else
+#define __INTRODUCED_IN_LLNDK(x)
+#endif
#include <stdbool.h>
#include <stdint.h>
#include <sys/cdefs.h>
@@ -67,25 +72,26 @@
/**
* Create a new APersistableBundle.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \return Pointer to a new APersistableBundle
*/
-APersistableBundle* _Nullable APersistableBundle_new() __INTRODUCED_IN(__ANDROID_API_V__);
+APersistableBundle* _Nullable APersistableBundle_new() __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Create a new APersistableBundle based off an existing APersistableBundle.
* This is a deep copy, so the new APersistableBundle has its own values from
* copying the original underlying PersistableBundle.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to duplicate
*
* \return Pointer to a new APersistableBundle
*/
APersistableBundle* _Nullable APersistableBundle_dup(const APersistableBundle* _Nonnull pBundle)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Delete an APersistableBundle. This must always be called when finished using
@@ -93,15 +99,15 @@
*
* \param pBundle to delete. No-op if null.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_delete(APersistableBundle* _Nullable pBundle)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Check for equality of APersistableBundles.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param lhs bundle to compare against the other param
* \param rhs bundle to compare against the other param
@@ -110,12 +116,12 @@
*/
bool APersistableBundle_isEqual(const APersistableBundle* _Nonnull lhs,
const APersistableBundle* _Nonnull rhs)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Read an APersistableBundle from an AParcel.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param parcel to read from
* \param outPBundle bundle to write to
@@ -129,12 +135,12 @@
*/
binder_status_t APersistableBundle_readFromParcel(
const AParcel* _Nonnull parcel, APersistableBundle* _Nullable* _Nonnull outPBundle)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Write an APersistableBundle to an AParcel.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle bundle to write to the parcel
* \param parcel to write to
@@ -149,25 +155,25 @@
*/
binder_status_t APersistableBundle_writeToParcel(const APersistableBundle* _Nonnull pBundle,
AParcel* _Nonnull parcel)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get the size of an APersistableBundle. This is the number of mappings in the
* object.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to get the size of (number of mappings)
*
* \return number of mappings in the object
*/
int32_t APersistableBundle_size(const APersistableBundle* _Nonnull pBundle)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Erase any entries added with the provided key.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to operate on
* \param key for the mapping in UTF-8 to erase
@@ -175,7 +181,7 @@
* \return number of entries erased. Either 0 or 1.
*/
int32_t APersistableBundle_erase(APersistableBundle* _Nonnull pBundle, const char* _Nonnull key)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Put a boolean associated with the provided key.
@@ -185,10 +191,11 @@
* \param key for the mapping in UTF-8
* \param value to put for the mapping
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putBoolean(APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
- bool val) __INTRODUCED_IN(__ANDROID_API_V__);
+ bool val) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put an int32_t associated with the provided key.
@@ -198,10 +205,11 @@
* \param key for the mapping in UTF-8
* \param val value to put for the mapping
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putInt(APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
- int32_t val) __INTRODUCED_IN(__ANDROID_API_V__);
+ int32_t val) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put an int64_t associated with the provided key.
@@ -211,10 +219,11 @@
* \param key for the mapping in UTF-8
* \param val value to put for the mapping
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putLong(APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
- int64_t val) __INTRODUCED_IN(__ANDROID_API_V__);
+ int64_t val) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put a double associated with the provided key.
@@ -224,10 +233,11 @@
* \param key for the mapping in UTF-8
* \param val value to put for the mapping
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putDouble(APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
- double val) __INTRODUCED_IN(__ANDROID_API_V__);
+ double val) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put a string associated with the provided key.
@@ -238,10 +248,11 @@
* \param key for the mapping in UTF-8
* \param vec vector to put for the mapping
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putString(APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
- const char* _Nonnull val) __INTRODUCED_IN(__ANDROID_API_V__);
+ const char* _Nonnull val) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put a boolean vector associated with the provided key.
@@ -253,11 +264,12 @@
* \param vec vector to put for the mapping
* \param num number of elements in the vector
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putBooleanVector(APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, const bool* _Nonnull vec,
- int32_t num) __INTRODUCED_IN(__ANDROID_API_V__);
+ int32_t num) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put an int32_t vector associated with the provided key.
@@ -269,11 +281,11 @@
* \param vec vector to put for the mapping
* \param num number of elements in the vector
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putIntVector(APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
const int32_t* _Nonnull vec, int32_t num)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Put an int64_t vector associated with the provided key.
@@ -285,11 +297,12 @@
* \param vec vector to put for the mapping
* \param num number of elements in the vector
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putLongVector(APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, const int64_t* _Nonnull vec,
- int32_t num) __INTRODUCED_IN(__ANDROID_API_V__);
+ int32_t num) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put a double vector associated with the provided key.
@@ -301,11 +314,12 @@
* \param vec vector to put for the mapping
* \param num number of elements in the vector
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putDoubleVector(APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, const double* _Nonnull vec,
- int32_t num) __INTRODUCED_IN(__ANDROID_API_V__);
+ int32_t num) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Put a string vector associated with the provided key.
@@ -317,12 +331,12 @@
* \param vec vector to put for the mapping
* \param num number of elements in the vector
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putStringVector(APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key,
const char* _Nullable const* _Nullable vec, int32_t num)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Put an APersistableBundle associated with the provided key.
@@ -333,17 +347,17 @@
* \param key for the mapping in UTF-8
* \param val value to put for the mapping
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*/
void APersistableBundle_putPersistableBundle(APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key,
const APersistableBundle* _Nonnull val)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get a boolean associated with the provided key.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to operate on
* \param key for the mapping in UTF-8
@@ -353,12 +367,12 @@
*/
bool APersistableBundle_getBoolean(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, bool* _Nonnull val)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get an int32_t associated with the provided key.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to operate on
* \param key for the mapping in UTF-8
@@ -367,12 +381,13 @@
* \return true if a value exists for the provided key
*/
bool APersistableBundle_getInt(const APersistableBundle* _Nonnull pBundle, const char* _Nonnull key,
- int32_t* _Nonnull val) __INTRODUCED_IN(__ANDROID_API_V__);
+ int32_t* _Nonnull val) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get an int64_t associated with the provided key.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to operate on
* \param key for the mapping in UTF-8
@@ -382,12 +397,12 @@
*/
bool APersistableBundle_getLong(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, int64_t* _Nonnull val)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get a double associated with the provided key.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to operate on
* \param key for the mapping in UTF-8
@@ -397,13 +412,13 @@
*/
bool APersistableBundle_getDouble(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, double* _Nonnull val)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get a string associated with the provided key.
* The caller is responsible for freeing the returned data.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to operate on
* \param key for the mapping in UTF-8
@@ -418,7 +433,8 @@
int32_t APersistableBundle_getString(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, char* _Nullable* _Nonnull val,
APersistableBundle_stringAllocator stringAllocator,
- void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__);
+ void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get a boolean vector associated with the provided key and place it in the
@@ -445,7 +461,7 @@
int32_t APersistableBundle_getBooleanVector(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, bool* _Nullable buffer,
int32_t bufferSizeBytes)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get an int32_t vector associated with the provided key and place it in the
@@ -471,7 +487,8 @@
*/
int32_t APersistableBundle_getIntVector(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, int32_t* _Nullable buffer,
- int32_t bufferSizeBytes) __INTRODUCED_IN(__ANDROID_API_V__);
+ int32_t bufferSizeBytes) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get an int64_t vector associated with the provided key and place it in the
@@ -497,8 +514,8 @@
*/
int32_t APersistableBundle_getLongVector(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, int64_t* _Nullable buffer,
- int32_t bufferSizeBytes)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ int32_t bufferSizeBytes) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get a double vector associated with the provided key and place it in the
@@ -525,7 +542,7 @@
int32_t APersistableBundle_getDoubleVector(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key, double* _Nullable buffer,
int32_t bufferSizeBytes)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get a string vector associated with the provided key and place it in the
@@ -562,12 +579,12 @@
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get an APersistableBundle* associated with the provided key.
*
- * Available since API level __ANDROID_API_V__.
+ * Available since API level 202404.
*
* \param pBundle to operate on
* \param key for the mapping in UTF-8
@@ -581,7 +598,7 @@
bool APersistableBundle_getPersistableBundle(const APersistableBundle* _Nonnull pBundle,
const char* _Nonnull key,
APersistableBundle* _Nullable* _Nonnull outBundle)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -614,7 +631,7 @@
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -645,7 +662,8 @@
int32_t APersistableBundle_getIntKeys(const APersistableBundle* _Nonnull pBundle,
char* _Nullable* _Nullable outKeys, int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
- void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__);
+ void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -676,7 +694,8 @@
int32_t APersistableBundle_getLongKeys(const APersistableBundle* _Nonnull pBundle,
char* _Nullable* _Nullable outKeys, int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
- void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__);
+ void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -708,8 +727,8 @@
char* _Nullable* _Nullable outKeys,
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
- void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -741,8 +760,8 @@
char* _Nullable* _Nullable outKeys,
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
- void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__)
+ __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -775,7 +794,7 @@
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -808,7 +827,7 @@
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -841,7 +860,7 @@
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -873,7 +892,7 @@
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -906,7 +925,7 @@
int32_t bufferSizeBytes,
APersistableBundle_stringAllocator stringAllocator,
void* _Nullable context)
- __INTRODUCED_IN(__ANDROID_API_V__);
+ __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
/**
* Get all of the keys associated with this specific type and place it in the
@@ -937,6 +956,6 @@
int32_t APersistableBundle_getPersistableBundleKeys(
const APersistableBundle* _Nonnull pBundle, char* _Nullable* _Nullable outKeys,
int32_t bufferSizeBytes, APersistableBundle_stringAllocator stringAllocator,
- void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__);
+ void* _Nullable context) __INTRODUCED_IN(__ANDROID_API_V__) __INTRODUCED_IN_LLNDK(202404);
__END_DECLS
diff --git a/libs/binder/ndk/libbinder_ndk.map.txt b/libs/binder/ndk/libbinder_ndk.map.txt
index de624e4..826e199 100644
--- a/libs/binder/ndk/libbinder_ndk.map.txt
+++ b/libs/binder/ndk/libbinder_ndk.map.txt
@@ -164,47 +164,88 @@
LIBBINDER_NDK35 { # introduced=VanillaIceCream
global:
APersistableBundle_readFromParcel;
+ APersistableBundle_readFromParcel; # llndk=202404
APersistableBundle_writeToParcel;
+ APersistableBundle_writeToParcel; # llndk=202404
APersistableBundle_new;
+ APersistableBundle_new; # llndk=202404
APersistableBundle_dup;
+ APersistableBundle_dup; # llndk=202404
APersistableBundle_delete;
+ APersistableBundle_delete; # llndk=202404
APersistableBundle_isEqual;
+ APersistableBundle_isEqual; # llndk=202404
APersistableBundle_size;
+ APersistableBundle_size; # llndk=202404
APersistableBundle_erase;
+ APersistableBundle_erase; # llndk=202404
APersistableBundle_putBoolean;
+ APersistableBundle_putBoolean; # llndk=202404
APersistableBundle_putInt;
+ APersistableBundle_putInt; # llndk=202404
APersistableBundle_putLong;
+ APersistableBundle_putLong; # llndk=202404
APersistableBundle_putDouble;
+ APersistableBundle_putDouble; # llndk=202404
APersistableBundle_putString;
+ APersistableBundle_putString; # llndk=202404
APersistableBundle_putBooleanVector;
+ APersistableBundle_putBooleanVector; # llndk=202404
APersistableBundle_putIntVector;
+ APersistableBundle_putIntVector; # llndk=202404
APersistableBundle_putLongVector;
+ APersistableBundle_putLongVector; # llndk=202404
APersistableBundle_putDoubleVector;
+ APersistableBundle_putDoubleVector; # llndk=202404
APersistableBundle_putStringVector;
+ APersistableBundle_putStringVector; # llndk=202404
APersistableBundle_putPersistableBundle;
+ APersistableBundle_putPersistableBundle; # llndk=202404
APersistableBundle_getBoolean;
+ APersistableBundle_getBoolean; # llndk=202404
APersistableBundle_getInt;
+ APersistableBundle_getInt; # llndk=202404
APersistableBundle_getLong;
+ APersistableBundle_getLong; # llndk=202404
APersistableBundle_getDouble;
+ APersistableBundle_getDouble; # llndk=202404
APersistableBundle_getString;
+ APersistableBundle_getString; # llndk=202404
APersistableBundle_getBooleanVector;
+ APersistableBundle_getBooleanVector; # llndk=202404
APersistableBundle_getIntVector;
+ APersistableBundle_getIntVector; # llndk=202404
APersistableBundle_getLongVector;
+ APersistableBundle_getLongVector; # llndk=202404
APersistableBundle_getDoubleVector;
+ APersistableBundle_getDoubleVector; # llndk=202404
APersistableBundle_getStringVector;
+ APersistableBundle_getStringVector; # llndk=202404
APersistableBundle_getPersistableBundle;
+ APersistableBundle_getPersistableBundle; # llndk=202404
APersistableBundle_getBooleanKeys;
+ APersistableBundle_getBooleanKeys; # llndk=202404
APersistableBundle_getIntKeys;
+ APersistableBundle_getIntKeys; # llndk=202404
APersistableBundle_getLongKeys;
+ APersistableBundle_getLongKeys; # llndk=202404
APersistableBundle_getDoubleKeys;
+ APersistableBundle_getDoubleKeys; # llndk=202404
APersistableBundle_getStringKeys;
+ APersistableBundle_getStringKeys; # llndk=202404
APersistableBundle_getBooleanVectorKeys;
+ APersistableBundle_getBooleanVectorKeys; # llndk=202404
APersistableBundle_getIntVectorKeys;
+ APersistableBundle_getIntVectorKeys; # llndk=202404
APersistableBundle_getLongVectorKeys;
+ APersistableBundle_getLongVectorKeys; # llndk=202404
APersistableBundle_getDoubleVectorKeys;
+ APersistableBundle_getDoubleVectorKeys; # llndk=202404
APersistableBundle_getStringVectorKeys;
+ APersistableBundle_getStringVectorKeys; # llndk=202404
APersistableBundle_getPersistableBundleKeys;
- AServiceManager_openDeclaredPassthroughHal; # systemapi llndk
+ APersistableBundle_getPersistableBundleKeys; # llndk=202404
+ AServiceManager_openDeclaredPassthroughHal; # systemapi llndk=202404
};
LIBBINDER_NDK_PLATFORM {
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index e487cbc..af0bcff 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -67,7 +67,6 @@
static const char* RO_DRIVER_SUFFIX_PROPERTY = "ro.hardware.egl";
static const char* RO_BOARD_PLATFORM_PROPERTY = "ro.board.platform";
static const char* ANGLE_SUFFIX_VALUE = "angle";
-static const char* VENDOR_ANGLE_BUILD = "ro.gfx.angle.supported";
static const char* HAL_SUBNAME_KEY_PROPERTIES[3] = {
PERSIST_DRIVER_SUFFIX_PROPERTY,
@@ -494,14 +493,9 @@
void* dso = nullptr;
- const bool AngleInVendor = property_get_bool(VENDOR_ANGLE_BUILD, false);
const bool isSuffixAngle = suffix != nullptr && strcmp(suffix, ANGLE_SUFFIX_VALUE) == 0;
- // Only use sphal namespace when system ANGLE binaries are not the default drivers.
- const bool useSphalNamespace = !isSuffixAngle || AngleInVendor;
-
const std::string absolutePath =
- findLibrary(libraryName, useSphalNamespace ? VENDOR_LIB_EGL_DIR : SYSTEM_LIB_PATH,
- exact);
+ findLibrary(libraryName, isSuffixAngle ? SYSTEM_LIB_PATH : VENDOR_LIB_EGL_DIR, exact);
if (absolutePath.empty()) {
// this happens often, we don't want to log an error
return nullptr;
@@ -509,8 +503,9 @@
const char* const driverAbsolutePath = absolutePath.c_str();
// Currently the default driver is unlikely to be ANGLE on most devices,
- // hence put this first.
- if (useSphalNamespace) {
+ // hence put this first. Only use sphal namespace when system ANGLE binaries
+ // are not the default drivers.
+ if (!isSuffixAngle) {
// Try to load drivers from the 'sphal' namespace, if it exist. Fall back to
// the original routine when the namespace does not exist.
// See /system/linkerconfig/contents/namespace for the configuration of the
diff --git a/services/surfaceflinger/FrameTracker.cpp b/services/surfaceflinger/FrameTracker.cpp
index 178c531..ca8cdc3 100644
--- a/services/surfaceflinger/FrameTracker.cpp
+++ b/services/surfaceflinger/FrameTracker.cpp
@@ -18,9 +18,6 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
-// This is needed for stdint.h to define INT64_MAX in C++
-#define __STDC_LIMIT_MACROS
-
#include <inttypes.h>
#include <android-base/stringprintf.h>
diff --git a/services/surfaceflinger/Tracing/TransactionTracing.h b/services/surfaceflinger/Tracing/TransactionTracing.h
index ddbf3e4..cb96e05 100644
--- a/services/surfaceflinger/Tracing/TransactionTracing.h
+++ b/services/surfaceflinger/Tracing/TransactionTracing.h
@@ -24,6 +24,7 @@
#include <mutex>
#include <optional>
+#include <set>
#include <thread>
#include "FrontEnd/DisplayInfo.h"