Lines Matching refs:android
40 namespace android {
46 class WatchdogProcessService : public android::RefBase {
48 explicit WatchdogProcessService(const android::sp<Looper>& handlerLooper);
51 android::base::Result<void> start();
53 virtual android::base::Result<void> dump(int fd,
54 const android::Vector<android::String16>& args);
57 virtual android::base::Result<void> registerWatchdogServiceHelper(
58 const android::sp<IWatchdogServiceHelper>& helper);
60 virtual android::binder::Status registerClient(const android::sp<ICarWatchdogClient>& client,
62 virtual android::binder::Status unregisterClient(const android::sp<ICarWatchdogClient>& client);
63 virtual android::binder::Status registerCarWatchdogService(const android::sp<IBinder>& binder);
64 virtual void unregisterCarWatchdogService(const android::sp<IBinder>& binder);
65 virtual android::binder::Status registerMonitor(
66 const android::sp<android::automotive::watchdog::internal::ICarWatchdogMonitor>&
68 virtual android::binder::Status unregisterMonitor(
69 const android::sp<android::automotive::watchdog::internal::ICarWatchdogMonitor>&
71 virtual android::binder::Status tellClientAlive(const android::sp<ICarWatchdogClient>& client,
73 virtual android::binder::Status tellCarWatchdogServiceAlive(
74 const android::sp<
75 android::automotive::watchdog::internal::ICarWatchdogServiceForSystem>& service,
77 virtual android::binder::Status tellDumpFinished(
78 const android::sp<android::automotive::watchdog::internal::ICarWatchdogMonitor>&
82 virtual android::binder::Status notifyUserStateChange(
83 userid_t userId, android::automotive::watchdog::internal::UserState state);
92 ClientInfo(const android::sp<ICarWatchdogClient>& client, pid_t pid, userid_t userId) : in ClientInfo()
97 ClientInfo(const android::sp<IWatchdogServiceHelper>& helper, in ClientInfo()
98 const android::sp<android::IBinder>& binder, pid_t pid, userid_t userId) : in ClientInfo()
106 status_t linkToDeath(const android::sp<android::IBinder::DeathRecipient>& recipient) const;
108 const android::wp<android::IBinder::DeathRecipient>& recipient) const;
109 android::binder::Status checkIfAlive(TimeoutLength timeout) const;
110 android::binder::Status prepareProcessTermination() const;
114 bool matchesBinder(const android::sp<android::IBinder>& binder) const { in matchesBinder()
123 android::sp<android::IBinder> getBinder() const;
126 android::sp<ICarWatchdogClient> client = nullptr;
127 android::sp<IWatchdogServiceHelper> watchdogServiceHelper = nullptr;
128 android::sp<IBinder> watchdogServiceBinder = nullptr;
138 class BinderDeathRecipient : public android::IBinder::DeathRecipient {
140 explicit BinderDeathRecipient(const android::sp<WatchdogProcessService>& service);
142 void binderDied(const android::wp<android::IBinder>& who) override;
145 android::sp<WatchdogProcessService> mService;
148 class HidlDeathRecipient : public android::hardware::hidl_death_recipient {
150 explicit HidlDeathRecipient(const android::sp<WatchdogProcessService>& service);
153 const android::wp<android::hidl::base::V1_0::IBase>& who) override;
156 android::sp<WatchdogProcessService> mService;
160 public android::hardware::automotive::vehicle::V2_0::IVehicleCallback {
162 explicit PropertyChangeListener(const android::sp<WatchdogProcessService>& service);
164 android::hardware::Return<void> onPropertyEvent(
165 const android::hardware::hidl_vec<
166 android::hardware::automotive::vehicle::V2_0::VehiclePropValue>& propValues)
168 android::hardware::Return<void> onPropertySet(
169 const android::hardware::automotive::vehicle::V2_0::VehiclePropValue& propValue)
171 android::hardware::Return<void> onPropertySetError(
172 android::hardware::automotive::vehicle::V2_0::StatusCode errorCode, int32_t propId,
176 android::sp<WatchdogProcessService> mService;
181 explicit MessageHandlerImpl(const android::sp<WatchdogProcessService>& service);
186 android::sp<WatchdogProcessService> mService;
190 android::binder::Status registerClientLocked(const ClientInfo& clientInfo,
192 android::binder::Status unregisterClientLocked(const std::vector<TimeoutLength>& timeouts,
193 android::sp<IBinder> binder,
195 android::binder::Status tellClientAliveLocked(const android::sp<android::IBinder>& binder,
197 android::base::Result<void> startHealthCheckingLocked(TimeoutLength timeout);
198 android::base::Result<void> dumpAndKillClientsIfNotResponding(TimeoutLength timeout);
199 android::base::Result<void> dumpAndKillAllProcesses(
202 android::base::Result<void> updateVhal(
203 const android::hardware::automotive::vehicle::V2_0::VehiclePropValue& value);
204 android::base::Result<void> connectToVhalLocked();
208 android::base::Result<std::string> readProcCmdLine(int32_t pid);
209 void handleBinderDeath(const android::wp<android::IBinder>& who);
210 void handleHidlDeath(const android::wp<android::hidl::base::V1_0::IBase>& who);
213 android::hardware::automotive::vehicle::V2_0::VehicleProperty propId);
223 const android::sp<android::IBinder> binder,
227 android::sp<Looper> mHandlerLooper;
228 android::sp<MessageHandlerImpl> mMessageHandler;
229 android::Mutex mMutex;
233 android::sp<android::automotive::watchdog::internal::ICarWatchdogMonitor> mMonitor
239 android::sp<android::hardware::automotive::vehicle::V2_0::IVehicle> mVhalService
241 android::sp<BinderDeathRecipient> mBinderDeathRecipient;
242 android::sp<HidlDeathRecipient> mHidlDeathRecipient;
243 std::unordered_set<android::hardware::automotive::vehicle::V2_0::VehicleProperty>
245 android::sp<PropertyChangeListener> mPropertyChangeListener;
247 android::sp<IWatchdogServiceHelper> mWatchdogServiceHelper GUARDED_BY(mMutex);