From c78404c14274ebe69babbbdd0d829948636a72c0 Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Wed, 17 Feb 2016 20:46:53 -0800 Subject: [PATCH] Remove unused native binder impl. Bug: 27073437 Change-Id: I65eca22cc42164715610e461d2e390decab202f9 --- include/binder/IProcessInfoService.h | 10 ------ libs/binder/IProcessInfoService.cpp | 68 ------------------------------------ 2 files changed, 78 deletions(-) diff --git a/include/binder/IProcessInfoService.h b/include/binder/IProcessInfoService.h index 34ce0f00c2..69dc9a79f1 100644 --- a/include/binder/IProcessInfoService.h +++ b/include/binder/IProcessInfoService.h @@ -44,16 +44,6 @@ public: // ---------------------------------------------------------------------- -class BnProcessInfoService : public BnInterface { -public: - virtual status_t onTransact( uint32_t code, - const Parcel& data, - Parcel* reply, - uint32_t flags = 0); -}; - -// ---------------------------------------------------------------------- - }; // namespace android #endif // ANDROID_I_PROCESS_INFO_SERVICE_H diff --git a/libs/binder/IProcessInfoService.cpp b/libs/binder/IProcessInfoService.cpp index c37920d8c2..76508b88bf 100644 --- a/libs/binder/IProcessInfoService.cpp +++ b/libs/binder/IProcessInfoService.cpp @@ -88,72 +88,4 @@ IMPLEMENT_META_INTERFACE(ProcessInfoService, "android.os.IProcessInfoService"); // ---------------------------------------------------------------------- -status_t BnProcessInfoService::onTransact( uint32_t code, const Parcel& data, Parcel* reply, - uint32_t flags) { - switch(code) { - case GET_PROCESS_STATES_FROM_PIDS: { - CHECK_INTERFACE(IProcessInfoService, data, reply); - int32_t arrayLen = data.readInt32(); - if (arrayLen <= 0) { - reply->writeNoException(); - reply->writeInt32(0); - reply->writeInt32(NOT_ENOUGH_DATA); - return NO_ERROR; - } - - size_t len = static_cast(arrayLen); - int32_t pids[len]; - status_t res = data.read(pids, len * sizeof(*pids)); - - // Ignore output array length returned in the parcel here, as the states array must - // always be the same length as the input PIDs array. - int32_t states[len]; - for (size_t i = 0; i < len; i++) states[i] = -1; - if (res == NO_ERROR) { - res = getProcessStatesFromPids(len, /*in*/ pids, /*out*/ states); - } - reply->writeNoException(); - reply->writeInt32Array(len, states); - reply->writeInt32(res); - return NO_ERROR; - } break; - case GET_PROCESS_STATES_AND_OOM_SCORES_FROM_PIDS: { - CHECK_INTERFACE(IProcessInfoService, data, reply); - int32_t arrayLen = data.readInt32(); - if (arrayLen <= 0) { - reply->writeNoException(); - reply->writeInt32(0); - reply->writeInt32(NOT_ENOUGH_DATA); - return NO_ERROR; - } - - size_t len = static_cast(arrayLen); - int32_t pids[len]; - status_t res = data.read(pids, len * sizeof(*pids)); - - // Ignore output array length returned in the parcel here, as the - // states array must always be the same length as the input PIDs array. - int32_t states[len]; - int32_t scores[len]; - for (size_t i = 0; i < len; i++) { - states[i] = -1; - scores[i] = -10000; - } - if (res == NO_ERROR) { - res = getProcessStatesAndOomScoresFromPids( - len, /*in*/ pids, /*out*/ states, /*out*/ scores); - } - reply->writeNoException(); - reply->writeInt32Array(len, states); - reply->writeInt32Array(len, scores); - reply->writeInt32(res); - return NO_ERROR; - } break; - default: - return BBinder::onTransact(code, data, reply, flags); - } -} - -// ---------------------------------------------------------------------- - }; // namespace android -- 2.11.0