Loading power/stats/1.0/default/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and cc_binary { name: "android.hardware.power.stats@1.0-service", name: "android.hardware.power.stats@1.0-service.mock", relative_install_path: "hw", init_rc: ["android.hardware.power.stats@1.0-service.rc"], srcs: ["service.cpp", "PowerStats.cpp"], Loading @@ -31,4 +31,5 @@ cc_binary { "android.hardware.power.stats@1.0", ], vendor: true, vintf_fragments: ["android.hardware.power.stats@1.0-service-mock.xml"], } power/stats/1.0/default/PowerStats.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. */ #define LOG_TAG "android.hardware.power.stats@1.0-service-mock" #include "PowerStats.h" #include <android-base/file.h> #include <android-base/logging.h> Loading power/stats/1.0/default/android.hardware.power.stats@1.0-service-mock.xml 0 → 100644 +11 −0 Original line number Diff line number Diff line <manifest version="1.0" type="device"> <hal format="hidl"> <name>android.hardware.power.stats</name> <transport>hwbinder</transport> <version>1.0</version> <interface> <name>IPowerStats</name> <instance>default</instance> </interface> </hal> </manifest> No newline at end of file power/stats/1.0/default/android.hardware.power.stats@1.0-service.rc +2 −1 Original line number Diff line number Diff line service vendor.power.stats-hal-1-0 /vendor/bin/hw/android.hardware.power.stats@1.0-service service vendor.power.stats-hal-1-0-mock /vendor/bin/hw/android.hardware.power.stats@1.0-service.mock interface android.hardware.power.stats@1.0::IPowerStats default class hal user system group system power/stats/1.0/default/service.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ #define LOG_TAG "android.hardware.power.stats@1.0-service" #define LOG_TAG "android.hardware.power.stats@1.0-service-mock" #include <android/log.h> #include <hidl/HidlTransportSupport.h> Loading Loading @@ -82,7 +82,7 @@ class DefaultStateResidencyDataProvider : public IStateResidencyDataProvider { }; int main(int /* argc */, char** /* argv */) { ALOGI("power.stats service 1.0 is starting."); ALOGI("power.stats service 1.0 mock is starting."); PowerStats* service = new PowerStats(); if (service == nullptr) { Loading Loading
power/stats/1.0/default/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and cc_binary { name: "android.hardware.power.stats@1.0-service", name: "android.hardware.power.stats@1.0-service.mock", relative_install_path: "hw", init_rc: ["android.hardware.power.stats@1.0-service.rc"], srcs: ["service.cpp", "PowerStats.cpp"], Loading @@ -31,4 +31,5 @@ cc_binary { "android.hardware.power.stats@1.0", ], vendor: true, vintf_fragments: ["android.hardware.power.stats@1.0-service-mock.xml"], }
power/stats/1.0/default/PowerStats.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. */ #define LOG_TAG "android.hardware.power.stats@1.0-service-mock" #include "PowerStats.h" #include <android-base/file.h> #include <android-base/logging.h> Loading
power/stats/1.0/default/android.hardware.power.stats@1.0-service-mock.xml 0 → 100644 +11 −0 Original line number Diff line number Diff line <manifest version="1.0" type="device"> <hal format="hidl"> <name>android.hardware.power.stats</name> <transport>hwbinder</transport> <version>1.0</version> <interface> <name>IPowerStats</name> <instance>default</instance> </interface> </hal> </manifest> No newline at end of file
power/stats/1.0/default/android.hardware.power.stats@1.0-service.rc +2 −1 Original line number Diff line number Diff line service vendor.power.stats-hal-1-0 /vendor/bin/hw/android.hardware.power.stats@1.0-service service vendor.power.stats-hal-1-0-mock /vendor/bin/hw/android.hardware.power.stats@1.0-service.mock interface android.hardware.power.stats@1.0::IPowerStats default class hal user system group system
power/stats/1.0/default/service.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ #define LOG_TAG "android.hardware.power.stats@1.0-service" #define LOG_TAG "android.hardware.power.stats@1.0-service-mock" #include <android/log.h> #include <hidl/HidlTransportSupport.h> Loading Loading @@ -82,7 +82,7 @@ class DefaultStateResidencyDataProvider : public IStateResidencyDataProvider { }; int main(int /* argc */, char** /* argv */) { ALOGI("power.stats service 1.0 is starting."); ALOGI("power.stats service 1.0 mock is starting."); PowerStats* service = new PowerStats(); if (service == nullptr) { Loading