summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Atneya Nair <atneya@google.com> 2024-03-21 16:36:06 -0700
committer Atneya Nair <atneya@google.com> 2024-03-22 12:19:50 -0700
commit5af964cd57a27a8aa49e1969daed9ee21d58d1f9 (patch)
tree5493051dd8a1a57b49b27c7d5756a31bff07860b
parent97834be3f83400470536a67d8a188a134f8010a3 (diff)
Migrate BatteryStats audio calls to oneway
The batterystats binder interfaces used by audioserver are currently synchronous, which causes layering violations leading to threadpool starvation in system server. Migrate the calls used by audioserver in particular to oneway. These calls are already void returning, and are logically async. Fixes: 330359963 Test: dumpsys batterystats contains audio info Change-Id: I271eb5e8cf709e0e7b74ed767c5e232ba0e548b7
-rw-r--r--libs/binder/IBatteryStats.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/binder/IBatteryStats.cpp b/libs/binder/IBatteryStats.cpp
index 69b11c0ee9..7b58046d36 100644
--- a/libs/binder/IBatteryStats.cpp
+++ b/libs/binder/IBatteryStats.cpp
@@ -66,14 +66,14 @@ public:
Parcel data, reply;
data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
data.writeInt32(uid);
- remote()->transact(NOTE_START_AUDIO_TRANSACTION, data, &reply);
+ remote()->transact(NOTE_START_AUDIO_TRANSACTION, data, &reply, IBinder::FLAG_ONEWAY);
}
virtual void noteStopAudio(int uid) {
Parcel data, reply;
data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
data.writeInt32(uid);
- remote()->transact(NOTE_STOP_AUDIO_TRANSACTION, data, &reply);
+ remote()->transact(NOTE_STOP_AUDIO_TRANSACTION, data, &reply, IBinder::FLAG_ONEWAY);
}
virtual void noteResetVideo() {
@@ -85,7 +85,7 @@ public:
virtual void noteResetAudio() {
Parcel data, reply;
data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
- remote()->transact(NOTE_RESET_AUDIO_TRANSACTION, data, &reply);
+ remote()->transact(NOTE_RESET_AUDIO_TRANSACTION, data, &reply, IBinder::FLAG_ONEWAY);
}
virtual void noteFlashlightOn(int uid) {