diff options
author | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2018-07-26 22:01:07 +0000 |
---|---|---|
committer | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2018-07-26 22:01:07 +0000 |
commit | a1dd1f0aaf0a52f479d307557cd1f594c7c45d8f (patch) | |
tree | 2338fe1404d3578bd610ea99ee20987839f074da | |
parent | 767770dcffb7a6553d25740d2975b6e201f592be (diff) | |
parent | c9eed2722b97c4d4e8f8bfc2558d02b17fa5ef21 (diff) | |
download | android_hardware_ril-a1dd1f0aaf0a52f479d307557cd1f594c7c45d8f.tar.gz android_hardware_ril-a1dd1f0aaf0a52f479d307557cd1f594c7c45d8f.tar.bz2 android_hardware_ril-a1dd1f0aaf0a52f479d307557cd1f594c7c45d8f.zip |
Snap for 4914984 from c9eed2722b97c4d4e8f8bfc2558d02b17fa5ef21 to p-keystone-qcom-release
Change-Id: Id8e6273acfb4f973965a3c99b29bdfd6a5f036ad
-rw-r--r-- | libril/ril.cpp | 13 | ||||
-rw-r--r-- | rild/rild.c | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libril/ril.cpp b/libril/ril.cpp index 514ac90..ceec055 100644 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -22,6 +22,7 @@ #include <telephony/ril_cdma_sms.h> #include <cutils/sockets.h> #include <cutils/jstring.h> +#include <hwbinder/ProcessState.h> #include <telephony/record_stream.h> #include <utils/Log.h> #include <utils/SystemClock.h> @@ -54,6 +55,10 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel extern "C" void RIL_onRequestAck(RIL_Token t); + +extern "C" void +initWithMmapSize(); + namespace android { #define PHONE_PROCESS "radio" @@ -83,6 +88,9 @@ namespace android { // request, response, and unsolicited msg print macro #define PRINTBUF_SIZE 8096 +// Set hwbinder buffer size to 512KB +#define HW_BINDER_MMAP_SIZE 524288 + enum WakeType {DONT_WAKE, WAKE_PARTIAL}; typedef struct { @@ -1238,4 +1246,9 @@ rilSocketIdToString(RIL_SOCKET_ID socket_id) } } +extern "C" void +initWithMmapSize() { + android::hardware::ProcessState::initWithMmapSize((size_t)(HW_BINDER_MMAP_SIZE)); +} + } /* namespace android */ diff --git a/rild/rild.c b/rild/rild.c index c554a9f..041413d 100644 --- a/rild/rild.c +++ b/rild/rild.c @@ -74,6 +74,7 @@ extern void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, extern void RIL_requestTimedCallback (RIL_TimedCallback callback, void *param, const struct timeval *relativeTime); +extern void initWithMmapSize(); static struct RIL_Env s_rilEnv = { RIL_onRequestComplete, @@ -125,6 +126,7 @@ int main(int argc, char **argv) { RLOGD("**RIL Daemon Started**"); RLOGD("**RILd param count=%d**", argc); + initWithMmapSize(); umask(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH); for (i = 1; i < argc ;) { if (0 == strcmp(argv[i], "-l") && (argc - i > 1)) { |