Merge "Fix some doxygen issues." into main
diff --git a/cmds/installd/tests/fuzzers/InstalldServiceFuzzer.cpp b/cmds/installd/tests/fuzzers/InstalldServiceFuzzer.cpp
index b1c6940..50ea0c7 100644
--- a/cmds/installd/tests/fuzzers/InstalldServiceFuzzer.cpp
+++ b/cmds/installd/tests/fuzzers/InstalldServiceFuzzer.cpp
@@ -47,6 +47,8 @@
} // namespace android
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ // TODO(b/183141167): need to rewrite 'dump' to avoid SIGPIPE.
+ signal(SIGPIPE, SIG_IGN);
auto service = sp<InstalldNativeService>::make();
fuzzService(service, FuzzedDataProvider(data, size));
return 0;
diff --git a/include/android/thermal.h b/include/android/thermal.h
index 7f9d2ed..1d7ad12 100644
--- a/include/android/thermal.h
+++ b/include/android/thermal.h
@@ -254,7 +254,7 @@
* The headroom threshold is used to interpret the possible thermal throttling status based on
* the headroom prediction. For example, if the headroom threshold for
* {@link ATHERMAL_STATUS_LIGHT} is 0.7, and a headroom prediction in 10s returns 0.75
- * (or {@code AThermal_getThermalHeadroom(10)=0.75}), one can expect that in 10 seconds the system
+ * (or `AThermal_getThermalHeadroom(10)=0.75`), one can expect that in 10 seconds the system
* could be in lightly throttled state if the workload remains the same. The app can consider
* taking actions according to the nearest throttling status the difference between the headroom and
* the threshold.
@@ -262,10 +262,10 @@
* For new devices it's guaranteed to have a single sensor, but for older devices with multiple
* sensors reporting different threshold values, the minimum threshold is taken to be conservative
* on predictions. Thus, when reading real-time headroom, it's not guaranteed that a real-time value
- * of 0.75 (or {@code AThermal_getThermalHeadroom(0)}=0.75) exceeding the threshold of 0.7 above
+ * of 0.75 (or `AThermal_getThermalHeadroom(0)`=0.75) exceeding the threshold of 0.7 above
* will always come with lightly throttled state
- * (or {@code AThermal_getCurrentThermalStatus()=ATHERMAL_STATUS_LIGHT}) but it can be lower
- * (or {@code AThermal_getCurrentThermalStatus()=ATHERMAL_STATUS_NONE}).
+ * (or `AThermal_getCurrentThermalStatus()=ATHERMAL_STATUS_LIGHT`) but it can be lower
+ * (or `AThermal_getCurrentThermalStatus()=ATHERMAL_STATUS_NONE`).
* While it's always guaranteed that the device won't be throttled heavier than the unmet
* threshold's state, so a real-time headroom of 0.75 will never come with
* {@link #ATHERMAL_STATUS_MODERATE} but always lower, and 0.65 will never come with
diff --git a/libs/binder/BackendUnifiedServiceManager.cpp b/libs/binder/BackendUnifiedServiceManager.cpp
index 03d687a..34d5a09 100644
--- a/libs/binder/BackendUnifiedServiceManager.cpp
+++ b/libs/binder/BackendUnifiedServiceManager.cpp
@@ -132,6 +132,7 @@
serviceName.c_str());
return false;
}
+ if (kRemoveStaticList) return true;
for (const char* name : kStaticCachableList) {
if (name == serviceName) {
return true;
@@ -175,7 +176,7 @@
"isBinderAlive_false");
}
// If we reach here with kRemoveStaticList=true then we know service isn't lazy
- else if (kRemoveStaticList || mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
+ else if (mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL,
"BinderCacheWithInvalidation::updateCache successful");
return mCacheForGetService->setItem(serviceName, binder);
diff --git a/libs/binder/include/binder/IInterface.h b/libs/binder/include/binder/IInterface.h
index 30e005c..5924a2d 100644
--- a/libs/binder/include/binder/IInterface.h
+++ b/libs/binder/include/binder/IInterface.h
@@ -220,8 +220,6 @@
"android.app.IActivityManager",
"android.app.IUidObserver",
"android.drm.IDrm",
- "android.dvr.IVsyncCallback",
- "android.dvr.IVsyncService",
"android.gfx.tests.ICallback",
"android.gfx.tests.IIPCTest",
"android.gfx.tests.ISafeInterfaceTest",
@@ -264,17 +262,12 @@
"android.media.IResourceManagerService",
"android.os.IComplexTypeInterface",
"android.os.IPermissionController",
- "android.os.IPingResponder",
"android.os.IProcessInfoService",
"android.os.ISchedulingPolicyService",
- "android.os.IStringConstants",
"android.os.storage.IObbActionListener",
"android.os.storage.IStorageEventListener",
"android.os.storage.IStorageManager",
"android.os.storage.IStorageShutdownObserver",
- "android.service.vr.IPersistentVrStateCallbacks",
- "android.service.vr.IVrManager",
- "android.service.vr.IVrStateCallbacks",
"android.ui.ISurfaceComposer",
"android.utils.IMemory",
"android.utils.IMemoryHeap",
@@ -286,9 +279,6 @@
"com.android.internal.os.IShellCallback",
"drm.IDrmManagerService",
"drm.IDrmServiceListener",
- "IAAudioClient",
- "IAAudioService",
- "VtsFuzzer",
nullptr,
};
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp
index e56b7cf..d6cb508 100644
--- a/libs/binder/tests/binderLibTest.cpp
+++ b/libs/binder/tests/binderLibTest.cpp
@@ -43,6 +43,7 @@
#include <input/BlockingQueue.h>
#include <processgroup/processgroup.h>
#include <utils/Flattenable.h>
+#include <utils/SystemClock.h>
#include <linux/sched.h>
#include <sys/epoll.h>
@@ -340,7 +341,12 @@
}
bool checkFreezeSupport() {
- std::ifstream freezer_file("/sys/fs/cgroup/uid_0/cgroup.freeze");
+ std::string path;
+ if (!CgroupGetAttributePathForTask("FreezerState", getpid(), &path)) {
+ return false;
+ }
+
+ std::ifstream freezer_file(path);
// Pass test on devices where the cgroup v2 freezer is not supported
if (freezer_file.fail()) {
return false;
@@ -1716,14 +1722,6 @@
EXPECT_TRUE(reply.readBool());
}
-size_t epochMillis() {
- using std::chrono::duration_cast;
- using std::chrono::milliseconds;
- using std::chrono::seconds;
- using std::chrono::system_clock;
- return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
-}
-
TEST_F(BinderLibTest, HangingServices) {
Parcel data, reply;
sp<IBinder> server = addServer();
@@ -1732,7 +1730,7 @@
data.writeInt32(delay);
// b/266537959 - must take before taking lock, since countdown is started in the remote
// process there.
- size_t epochMsBefore = epochMillis();
+ int64_t timeBefore = uptimeMillis();
EXPECT_THAT(server->transact(BINDER_LIB_TEST_PROCESS_TEMPORARY_LOCK, data, &reply), NO_ERROR);
std::vector<std::thread> ts;
for (size_t i = 0; i < kKernelThreads + 1; i++) {
@@ -1746,10 +1744,10 @@
for (auto &t : ts) {
t.join();
}
- size_t epochMsAfter = epochMillis();
+ int64_t timeAfter = uptimeMillis();
// deadlock occurred and threads only finished after 1s passed.
- EXPECT_GE(epochMsAfter, epochMsBefore + delay);
+ EXPECT_GE(timeAfter, timeBefore + delay);
}
TEST_F(BinderLibTest, BinderProxyCount) {
diff --git a/libs/gralloc/types/Android.bp b/libs/gralloc/types/Android.bp
index 8dabc2c..f9f304a 100644
--- a/libs/gralloc/types/Android.bp
+++ b/libs/gralloc/types/Android.bp
@@ -56,7 +56,7 @@
],
export_shared_lib_headers: [
- "android.hardware.graphics.common-V5-ndk",
+ "android.hardware.graphics.common-V6-ndk",
"android.hardware.graphics.mapper@4.0",
"libhidlbase",
],
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index 4c3f4a6..cd083fe 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -92,7 +92,7 @@
"android.hardware.common-V2-ndk.so:"
"android.hardware.common.fmq-V1-ndk.so:"
"android.hardware.graphics.allocator-V2-ndk.so:"
- "android.hardware.graphics.common-V5-ndk.so:"
+ "android.hardware.graphics.common-V6-ndk.so:"
"android.hardware.graphics.common@1.0.so:"
"android.hardware.graphics.common@1.1.so:"
"android.hardware.graphics.common@1.2.so:"
diff --git a/libs/renderengine/skia/SkiaRenderEngine.cpp b/libs/renderengine/skia/SkiaRenderEngine.cpp
index e62640e..cf995bf 100644
--- a/libs/renderengine/skia/SkiaRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaRenderEngine.cpp
@@ -970,7 +970,7 @@
const auto& item = layer.source.buffer;
auto imageTextureRef = getOrCreateBackendTexture(item.buffer->getBuffer(), false);
- // if the layer's buffer has a fence, then we must must respect the fence prior to using
+ // if the layer's buffer has a fence, then we must respect the fence prior to using
// the buffer.
if (layer.source.buffer.fence != nullptr) {
waitFence(context, layer.source.buffer.fence->get());
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index b0c6e44..18c9a6b 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -596,6 +596,8 @@
width = height = stride = format = usage_deprecated = 0;
layerCount = 0;
usage = 0;
+ native_handle_close(handle);
+ native_handle_delete(const_cast<native_handle_t*>(handle));
handle = nullptr;
ALOGE("unflatten: registerBuffer failed: %s (%d)", strerror(-err), err);
return err;