summaryrefslogtreecommitdiff
path: root/libs/binder/IPCThreadState.cpp
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2021-09-16 01:07:08 +0000
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2021-09-16 01:07:08 +0000
commit950b7df53c47944ea656cab5baf357ee421f8dcc (patch)
tree18ab058001db29e61922f0c402026f129bc0cf18 /libs/binder/IPCThreadState.cpp
parentb91655e8e0c80a95234c23d93632c43cc5c45c43 (diff)
parent4095348d8f6d5472289eecebe03ecd667684c247 (diff)
Snap for 7736530 from 4095348d8f6d5472289eecebe03ecd667684c247 to sc-qpr1-release
Change-Id: Iac257cecc0a453e5789e82474071375699064cca
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
-rw-r--r--libs/binder/IPCThreadState.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 445df9eeff..c415ea02e2 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -1398,6 +1398,25 @@ status_t IPCThreadState::getProcessFreezeInfo(pid_t pid, bool *sync_received, bo
return ret;
}
+#ifndef __ANDROID_VNDK__
+status_t IPCThreadState::getProcessFreezeInfo(pid_t pid, uint32_t *sync_received,
+ uint32_t *async_received)
+{
+ int ret = 0;
+ binder_frozen_status_info info;
+ info.pid = pid;
+
+#if defined(__ANDROID__)
+ if (ioctl(self()->mProcess->mDriverFD, BINDER_GET_FROZEN_INFO, &info) < 0)
+ ret = -errno;
+#endif
+ *sync_received = info.sync_recv;
+ *async_received = info.async_recv;
+
+ return ret;
+}
+#endif
+
status_t IPCThreadState::freeze(pid_t pid, bool enable, uint32_t timeout_ms) {
struct binder_freeze_info info;
int ret = 0;