1 /** 2 * Copyright (c) 2020, The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 #include <aidl/android/automotive/watchdog/internal/BnCarWatchdogServiceForSystem.h> 20 #include <aidl/android/automotive/watchdog/internal/TimeoutLength.h> 21 #include <gmock/gmock.h> 22 23 namespace android { 24 namespace automotive { 25 namespace watchdog { 26 27 class MockCarWatchdogServiceForSystem : 28 public aidl::android::automotive::watchdog::internal::BnCarWatchdogServiceForSystem { 29 public: MockCarWatchdogServiceForSystem()30 MockCarWatchdogServiceForSystem() {} 31 32 MOCK_METHOD(ndk::ScopedAStatus, checkIfAlive, 33 (int32_t, aidl::android::automotive::watchdog::internal::TimeoutLength), 34 (override)); 35 MOCK_METHOD(ndk::ScopedAStatus, prepareProcessTermination, (), (override)); 36 MOCK_METHOD(ndk::ScopedAStatus, getPackageInfosForUids, 37 (const std::vector<int32_t>&, const std::vector<std::string>&, 38 std::vector<aidl::android::automotive::watchdog::internal::PackageInfo>*), 39 (override)); 40 MOCK_METHOD(ndk::ScopedAStatus, latestIoOveruseStats, 41 (const std::vector< 42 aidl::android::automotive::watchdog::internal::PackageIoOveruseStats>&), 43 (override)); 44 MOCK_METHOD(ndk::ScopedAStatus, resetResourceOveruseStats, (const std::vector<std::string>&), 45 (override)); 46 MOCK_METHOD( 47 ndk::ScopedAStatus, getTodayIoUsageStats, 48 (std::vector<aidl::android::automotive::watchdog::internal::UserPackageIoUsageStats>*), 49 (override)); 50 MOCK_METHOD(ndk::ScopedAStatus, onLatestResourceStats, 51 (const std::vector<aidl::android::automotive::watchdog::internal::ResourceStats>&), 52 (override)); 53 MOCK_METHOD(ndk::ScopedAStatus, requestAidlVhalPid, (), (override)); 54 MOCK_METHOD(ndk::ScopedAStatus, requestTodayIoUsageStats, (), (override)); 55 }; 56 57 } // namespace watchdog 58 } // namespace automotive 59 } // namespace android 60