Loading dumpstate/1.0/default/Android.mk +5 −5 Original line number Diff line number Diff line LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.dumpstate@1.0-impl LOCAL_MODULE := android.hardware.dumpstate@1.0-service LOCAL_INIT_RC := android.hardware.dumpstate@1.0-service.rc LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_SRC_FILES := \ DumpstateDevice.cpp \ service.cpp LOCAL_SHARED_LIBRARIES := \ android.hardware.dumpstate@1.0 \ libbase \ libcutils \ libdumpstateutil \ libhidlbase \ libhidltransport \ libhwbinder \ liblog \ libutils LOCAL_STATIC_LIBRARIES := \ libdumpstateutil include $(BUILD_SHARED_LIBRARY) include $(BUILD_EXECUTABLE) dumpstate/1.0/default/DumpstateDevice.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ #include "DumpstateUtil.h" using android::os::dumpstate::DumpFileToFd; using android::os::dumpstate::RunCommandToFd; namespace android { namespace hardware { namespace dumpstate { Loading @@ -30,6 +33,10 @@ namespace implementation { // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow. Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) { // NOTE: this is just an example on how to use the DumpstateUtil.h functions to implement // this interface - since HIDL_FETCH_IDumpstateDevice() is not defined, this function will never // be called by dumpstate. if (handle->numFds < 1) { ALOGE("no FDs\n"); return Void(); Loading @@ -51,13 +58,6 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) { return Void(); } IDumpstateDevice* HIDL_FETCH_IDumpstateDevice(const char* /* name */) { // TODO: temporary returning nullptr until it's implemented on master devices return nullptr; // return new DumpstateDevice(); } } // namespace implementation } // namespace V1_0 } // namespace dumpstate Loading dumpstate/1.0/default/DumpstateDevice.h +0 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,6 @@ struct DumpstateDevice : public IDumpstateDevice { }; extern "C" IDumpstateDevice* HIDL_FETCH_IDumpstateDevice(const char* name); } // namespace implementation } // namespace V1_0 } // namespace dumpstate Loading dumpstate/1.0/default/android.hardware.dumpstate@1.0-service.rc 0 → 100644 +4 −0 Original line number Diff line number Diff line service dumpstate-1-0 /system/bin/hw/android.hardware.dumpstate@1.0-service class hal user system group system dumpstate/1.0/default/service.cpp 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define LOG_TAG "android.hardware.dumpstate@1.0-service" #include <hidl/HidlSupport.h> #include <hidl/HidlTransportSupport.h> #include "DumpstateDevice.h" using ::android::hardware::configureRpcThreadpool; using ::android::hardware::dumpstate::V1_0::IDumpstateDevice; using ::android::hardware::dumpstate::V1_0::implementation::DumpstateDevice; using ::android::hardware::joinRpcThreadpool; using ::android::sp; int main (int /* argc */, char * /* argv */ []) { sp<IDumpstateDevice> dumpstate = new DumpstateDevice; configureRpcThreadpool(1, true); dumpstate->registerAsService("dumpstate"); joinRpcThreadpool(); } Loading
dumpstate/1.0/default/Android.mk +5 −5 Original line number Diff line number Diff line LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.dumpstate@1.0-impl LOCAL_MODULE := android.hardware.dumpstate@1.0-service LOCAL_INIT_RC := android.hardware.dumpstate@1.0-service.rc LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_SRC_FILES := \ DumpstateDevice.cpp \ service.cpp LOCAL_SHARED_LIBRARIES := \ android.hardware.dumpstate@1.0 \ libbase \ libcutils \ libdumpstateutil \ libhidlbase \ libhidltransport \ libhwbinder \ liblog \ libutils LOCAL_STATIC_LIBRARIES := \ libdumpstateutil include $(BUILD_SHARED_LIBRARY) include $(BUILD_EXECUTABLE)
dumpstate/1.0/default/DumpstateDevice.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ #include "DumpstateUtil.h" using android::os::dumpstate::DumpFileToFd; using android::os::dumpstate::RunCommandToFd; namespace android { namespace hardware { namespace dumpstate { Loading @@ -30,6 +33,10 @@ namespace implementation { // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow. Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) { // NOTE: this is just an example on how to use the DumpstateUtil.h functions to implement // this interface - since HIDL_FETCH_IDumpstateDevice() is not defined, this function will never // be called by dumpstate. if (handle->numFds < 1) { ALOGE("no FDs\n"); return Void(); Loading @@ -51,13 +58,6 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) { return Void(); } IDumpstateDevice* HIDL_FETCH_IDumpstateDevice(const char* /* name */) { // TODO: temporary returning nullptr until it's implemented on master devices return nullptr; // return new DumpstateDevice(); } } // namespace implementation } // namespace V1_0 } // namespace dumpstate Loading
dumpstate/1.0/default/DumpstateDevice.h +0 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,6 @@ struct DumpstateDevice : public IDumpstateDevice { }; extern "C" IDumpstateDevice* HIDL_FETCH_IDumpstateDevice(const char* name); } // namespace implementation } // namespace V1_0 } // namespace dumpstate Loading
dumpstate/1.0/default/android.hardware.dumpstate@1.0-service.rc 0 → 100644 +4 −0 Original line number Diff line number Diff line service dumpstate-1-0 /system/bin/hw/android.hardware.dumpstate@1.0-service class hal user system group system
dumpstate/1.0/default/service.cpp 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define LOG_TAG "android.hardware.dumpstate@1.0-service" #include <hidl/HidlSupport.h> #include <hidl/HidlTransportSupport.h> #include "DumpstateDevice.h" using ::android::hardware::configureRpcThreadpool; using ::android::hardware::dumpstate::V1_0::IDumpstateDevice; using ::android::hardware::dumpstate::V1_0::implementation::DumpstateDevice; using ::android::hardware::joinRpcThreadpool; using ::android::sp; int main (int /* argc */, char * /* argv */ []) { sp<IDumpstateDevice> dumpstate = new DumpstateDevice; configureRpcThreadpool(1, true); dumpstate->registerAsService("dumpstate"); joinRpcThreadpool(); }