1 /*
2 * This file is auto-generated. DO NOT MODIFY.
3 * Using: out/host/linux-x86/bin/aidl --lang=ndk -Weverything -Wno-missing-permission-annotation -t --min_sdk_version 30 --ninja -d out/soong/.intermediates/packages/modules/StatsD/aidl/statsd-aidl-ndk-source/gen/staging/android/os/IPendingIntentRef.cpp.d -h out/soong/.intermediates/packages/modules/StatsD/aidl/statsd-aidl-ndk-source/gen/include/staging -o out/soong/.intermediates/packages/modules/StatsD/aidl/statsd-aidl-ndk-source/gen/staging -Npackages/modules/StatsD/aidl packages/modules/StatsD/aidl/android/os/IPendingIntentRef.aidl
4 *
5 * DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
6 * ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
7 * AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
8 */
9 #include "aidl/android/os/IPendingIntentRef.h"
10
11 #include <android/binder_parcel_utils.h>
12 #include <aidl/android/os/BnPendingIntentRef.h>
13 #include <aidl/android/os/BpPendingIntentRef.h>
14
15 namespace aidl {
16 namespace android {
17 namespace os {
_aidl_android_os_IPendingIntentRef_onTransact(AIBinder * _aidl_binder,transaction_code_t _aidl_code,const AParcel * _aidl_in,AParcel * _aidl_out)18 static binder_status_t _aidl_android_os_IPendingIntentRef_onTransact(AIBinder* _aidl_binder, transaction_code_t _aidl_code, const AParcel* _aidl_in, AParcel* _aidl_out) {
19 (void)_aidl_in;
20 (void)_aidl_out;
21 binder_status_t _aidl_ret_status = STATUS_UNKNOWN_TRANSACTION;
22 std::shared_ptr<BnPendingIntentRef> _aidl_impl = std::static_pointer_cast<BnPendingIntentRef>(::ndk::ICInterface::asInterface(_aidl_binder));
23 switch (_aidl_code) {
24 case (FIRST_CALL_TRANSACTION + 0 /*sendDataBroadcast*/): {
25 int64_t in_lastReportTimeNs;
26
27 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_lastReportTimeNs);
28 if (_aidl_ret_status != STATUS_OK) break;
29
30 ::ndk::ScopedAStatus _aidl_status = _aidl_impl->sendDataBroadcast(in_lastReportTimeNs);
31 _aidl_ret_status = STATUS_OK;
32 break;
33 }
34 case (FIRST_CALL_TRANSACTION + 1 /*sendActiveConfigsChangedBroadcast*/): {
35 std::vector<int64_t> in_configIds;
36
37 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_configIds);
38 if (_aidl_ret_status != STATUS_OK) break;
39
40 ::ndk::ScopedAStatus _aidl_status = _aidl_impl->sendActiveConfigsChangedBroadcast(in_configIds);
41 _aidl_ret_status = STATUS_OK;
42 break;
43 }
44 case (FIRST_CALL_TRANSACTION + 2 /*sendSubscriberBroadcast*/): {
45 int64_t in_configUid;
46 int64_t in_configId;
47 int64_t in_subscriptionId;
48 int64_t in_subscriptionRuleId;
49 std::vector<std::string> in_cookies;
50 ::aidl::android::os::StatsDimensionsValueParcel in_dimensionsValueParcel;
51
52 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_configUid);
53 if (_aidl_ret_status != STATUS_OK) break;
54
55 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_configId);
56 if (_aidl_ret_status != STATUS_OK) break;
57
58 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_subscriptionId);
59 if (_aidl_ret_status != STATUS_OK) break;
60
61 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_subscriptionRuleId);
62 if (_aidl_ret_status != STATUS_OK) break;
63
64 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_cookies);
65 if (_aidl_ret_status != STATUS_OK) break;
66
67 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_dimensionsValueParcel);
68 if (_aidl_ret_status != STATUS_OK) break;
69
70 ::ndk::ScopedAStatus _aidl_status = _aidl_impl->sendSubscriberBroadcast(in_configUid, in_configId, in_subscriptionId, in_subscriptionRuleId, in_cookies, in_dimensionsValueParcel);
71 _aidl_ret_status = STATUS_OK;
72 break;
73 }
74 case (FIRST_CALL_TRANSACTION + 3 /*sendRestrictedMetricsChangedBroadcast*/): {
75 std::vector<int64_t> in_metricIds;
76
77 _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_metricIds);
78 if (_aidl_ret_status != STATUS_OK) break;
79
80 ::ndk::ScopedAStatus _aidl_status = _aidl_impl->sendRestrictedMetricsChangedBroadcast(in_metricIds);
81 _aidl_ret_status = STATUS_OK;
82 break;
83 }
84 }
85 return _aidl_ret_status;
86 }
87
88 static const char* _g_aidl_android_os_IPendingIntentRef_clazz_code_to_function[] = { "sendDataBroadcast","sendActiveConfigsChangedBroadcast","sendSubscriberBroadcast","sendRestrictedMetricsChangedBroadcast",};
89 static AIBinder_Class* _g_aidl_android_os_IPendingIntentRef_clazz = ::ndk::ICInterface::defineClass(IPendingIntentRef::descriptor, _aidl_android_os_IPendingIntentRef_onTransact, _g_aidl_android_os_IPendingIntentRef_clazz_code_to_function, 4);
90
BpPendingIntentRef(const::ndk::SpAIBinder & binder)91 BpPendingIntentRef::BpPendingIntentRef(const ::ndk::SpAIBinder& binder) : BpCInterface(binder) {}
~BpPendingIntentRef()92 BpPendingIntentRef::~BpPendingIntentRef() {}
93
sendDataBroadcast(int64_t in_lastReportTimeNs)94 ::ndk::ScopedAStatus BpPendingIntentRef::sendDataBroadcast(int64_t in_lastReportTimeNs) {
95 binder_status_t _aidl_ret_status = STATUS_OK;
96 ::ndk::ScopedAStatus _aidl_status;
97 ::ndk::ScopedAParcel _aidl_in;
98 ::ndk::ScopedAParcel _aidl_out;
99
100 _aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
101 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
102
103 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_lastReportTimeNs);
104 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
105
106 _aidl_ret_status = AIBinder_transact(
107 asBinderReference().get(),
108 (FIRST_CALL_TRANSACTION + 0 /*sendDataBroadcast*/),
109 _aidl_in.getR(),
110 _aidl_out.getR(),
111 FLAG_ONEWAY
112 #ifdef BINDER_STABILITY_SUPPORT
113 | static_cast<int>(FLAG_PRIVATE_LOCAL)
114 #endif // BINDER_STABILITY_SUPPORT
115 );
116 if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IPendingIntentRef::getDefaultImpl()) {
117 _aidl_status = IPendingIntentRef::getDefaultImpl()->sendDataBroadcast(in_lastReportTimeNs);
118 goto _aidl_status_return;
119 }
120 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
121
122 _aidl_error:
123 _aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
124 _aidl_status_return:
125 return _aidl_status;
126 }
sendActiveConfigsChangedBroadcast(const std::vector<int64_t> & in_configIds)127 ::ndk::ScopedAStatus BpPendingIntentRef::sendActiveConfigsChangedBroadcast(const std::vector<int64_t>& in_configIds) {
128 binder_status_t _aidl_ret_status = STATUS_OK;
129 ::ndk::ScopedAStatus _aidl_status;
130 ::ndk::ScopedAParcel _aidl_in;
131 ::ndk::ScopedAParcel _aidl_out;
132
133 _aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
134 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
135
136 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_configIds);
137 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
138
139 _aidl_ret_status = AIBinder_transact(
140 asBinderReference().get(),
141 (FIRST_CALL_TRANSACTION + 1 /*sendActiveConfigsChangedBroadcast*/),
142 _aidl_in.getR(),
143 _aidl_out.getR(),
144 FLAG_ONEWAY
145 #ifdef BINDER_STABILITY_SUPPORT
146 | static_cast<int>(FLAG_PRIVATE_LOCAL)
147 #endif // BINDER_STABILITY_SUPPORT
148 );
149 if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IPendingIntentRef::getDefaultImpl()) {
150 _aidl_status = IPendingIntentRef::getDefaultImpl()->sendActiveConfigsChangedBroadcast(in_configIds);
151 goto _aidl_status_return;
152 }
153 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
154
155 _aidl_error:
156 _aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
157 _aidl_status_return:
158 return _aidl_status;
159 }
sendSubscriberBroadcast(int64_t in_configUid,int64_t in_configId,int64_t in_subscriptionId,int64_t in_subscriptionRuleId,const std::vector<std::string> & in_cookies,const::aidl::android::os::StatsDimensionsValueParcel & in_dimensionsValueParcel)160 ::ndk::ScopedAStatus BpPendingIntentRef::sendSubscriberBroadcast(int64_t in_configUid, int64_t in_configId, int64_t in_subscriptionId, int64_t in_subscriptionRuleId, const std::vector<std::string>& in_cookies, const ::aidl::android::os::StatsDimensionsValueParcel& in_dimensionsValueParcel) {
161 binder_status_t _aidl_ret_status = STATUS_OK;
162 ::ndk::ScopedAStatus _aidl_status;
163 ::ndk::ScopedAParcel _aidl_in;
164 ::ndk::ScopedAParcel _aidl_out;
165
166 _aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
167 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
168
169 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_configUid);
170 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
171
172 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_configId);
173 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
174
175 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_subscriptionId);
176 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
177
178 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_subscriptionRuleId);
179 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
180
181 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_cookies);
182 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
183
184 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_dimensionsValueParcel);
185 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
186
187 _aidl_ret_status = AIBinder_transact(
188 asBinderReference().get(),
189 (FIRST_CALL_TRANSACTION + 2 /*sendSubscriberBroadcast*/),
190 _aidl_in.getR(),
191 _aidl_out.getR(),
192 FLAG_ONEWAY
193 #ifdef BINDER_STABILITY_SUPPORT
194 | static_cast<int>(FLAG_PRIVATE_LOCAL)
195 #endif // BINDER_STABILITY_SUPPORT
196 );
197 if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IPendingIntentRef::getDefaultImpl()) {
198 _aidl_status = IPendingIntentRef::getDefaultImpl()->sendSubscriberBroadcast(in_configUid, in_configId, in_subscriptionId, in_subscriptionRuleId, in_cookies, in_dimensionsValueParcel);
199 goto _aidl_status_return;
200 }
201 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
202
203 _aidl_error:
204 _aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
205 _aidl_status_return:
206 return _aidl_status;
207 }
sendRestrictedMetricsChangedBroadcast(const std::vector<int64_t> & in_metricIds)208 ::ndk::ScopedAStatus BpPendingIntentRef::sendRestrictedMetricsChangedBroadcast(const std::vector<int64_t>& in_metricIds) {
209 binder_status_t _aidl_ret_status = STATUS_OK;
210 ::ndk::ScopedAStatus _aidl_status;
211 ::ndk::ScopedAParcel _aidl_in;
212 ::ndk::ScopedAParcel _aidl_out;
213
214 _aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
215 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
216
217 _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_metricIds);
218 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
219
220 _aidl_ret_status = AIBinder_transact(
221 asBinderReference().get(),
222 (FIRST_CALL_TRANSACTION + 3 /*sendRestrictedMetricsChangedBroadcast*/),
223 _aidl_in.getR(),
224 _aidl_out.getR(),
225 FLAG_ONEWAY
226 #ifdef BINDER_STABILITY_SUPPORT
227 | static_cast<int>(FLAG_PRIVATE_LOCAL)
228 #endif // BINDER_STABILITY_SUPPORT
229 );
230 if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IPendingIntentRef::getDefaultImpl()) {
231 _aidl_status = IPendingIntentRef::getDefaultImpl()->sendRestrictedMetricsChangedBroadcast(in_metricIds);
232 goto _aidl_status_return;
233 }
234 if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
235
236 _aidl_error:
237 _aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
238 _aidl_status_return:
239 return _aidl_status;
240 }
241 // Source for BnPendingIntentRef
BnPendingIntentRef()242 BnPendingIntentRef::BnPendingIntentRef() {}
~BnPendingIntentRef()243 BnPendingIntentRef::~BnPendingIntentRef() {}
createBinder()244 ::ndk::SpAIBinder BnPendingIntentRef::createBinder() {
245 AIBinder* binder = AIBinder_new(_g_aidl_android_os_IPendingIntentRef_clazz, static_cast<void*>(this));
246 #ifdef BINDER_STABILITY_SUPPORT
247 AIBinder_markCompilationUnitStability(binder);
248 #endif // BINDER_STABILITY_SUPPORT
249 return ::ndk::SpAIBinder(binder);
250 }
251 // Source for IPendingIntentRef
252 const char* IPendingIntentRef::descriptor = "android.os.IPendingIntentRef";
IPendingIntentRef()253 IPendingIntentRef::IPendingIntentRef() {}
~IPendingIntentRef()254 IPendingIntentRef::~IPendingIntentRef() {}
255
256
fromBinder(const::ndk::SpAIBinder & binder)257 std::shared_ptr<IPendingIntentRef> IPendingIntentRef::fromBinder(const ::ndk::SpAIBinder& binder) {
258 if (!AIBinder_associateClass(binder.get(), _g_aidl_android_os_IPendingIntentRef_clazz)) {
259 #if __ANDROID_API__ >= 31
260 const AIBinder_Class* originalClass = AIBinder_getClass(binder.get());
261 if (originalClass == nullptr) return nullptr;
262 if (0 == strcmp(AIBinder_Class_getDescriptor(originalClass), descriptor)) {
263 return ::ndk::SharedRefBase::make<BpPendingIntentRef>(binder);
264 }
265 #endif
266 return nullptr;
267 }
268 std::shared_ptr<::ndk::ICInterface> interface = ::ndk::ICInterface::asInterface(binder.get());
269 if (interface) {
270 return std::static_pointer_cast<IPendingIntentRef>(interface);
271 }
272 return ::ndk::SharedRefBase::make<BpPendingIntentRef>(binder);
273 }
274
writeToParcel(AParcel * parcel,const std::shared_ptr<IPendingIntentRef> & instance)275 binder_status_t IPendingIntentRef::writeToParcel(AParcel* parcel, const std::shared_ptr<IPendingIntentRef>& instance) {
276 return AParcel_writeStrongBinder(parcel, instance ? instance->asBinder().get() : nullptr);
277 }
readFromParcel(const AParcel * parcel,std::shared_ptr<IPendingIntentRef> * instance)278 binder_status_t IPendingIntentRef::readFromParcel(const AParcel* parcel, std::shared_ptr<IPendingIntentRef>* instance) {
279 ::ndk::SpAIBinder binder;
280 binder_status_t status = AParcel_readStrongBinder(parcel, binder.getR());
281 if (status != STATUS_OK) return status;
282 *instance = IPendingIntentRef::fromBinder(binder);
283 return STATUS_OK;
284 }
setDefaultImpl(const std::shared_ptr<IPendingIntentRef> & impl)285 bool IPendingIntentRef::setDefaultImpl(const std::shared_ptr<IPendingIntentRef>& impl) {
286 // Only one user of this interface can use this function
287 // at a time. This is a heuristic to detect if two different
288 // users in the same process use this function.
289 assert(!IPendingIntentRef::default_impl);
290 if (impl) {
291 IPendingIntentRef::default_impl = impl;
292 return true;
293 }
294 return false;
295 }
getDefaultImpl()296 const std::shared_ptr<IPendingIntentRef>& IPendingIntentRef::getDefaultImpl() {
297 return IPendingIntentRef::default_impl;
298 }
299 std::shared_ptr<IPendingIntentRef> IPendingIntentRef::default_impl = nullptr;
sendDataBroadcast(int64_t)300 ::ndk::ScopedAStatus IPendingIntentRefDefault::sendDataBroadcast(int64_t /*in_lastReportTimeNs*/) {
301 ::ndk::ScopedAStatus _aidl_status;
302 _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
303 return _aidl_status;
304 }
sendActiveConfigsChangedBroadcast(const std::vector<int64_t> &)305 ::ndk::ScopedAStatus IPendingIntentRefDefault::sendActiveConfigsChangedBroadcast(const std::vector<int64_t>& /*in_configIds*/) {
306 ::ndk::ScopedAStatus _aidl_status;
307 _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
308 return _aidl_status;
309 }
sendSubscriberBroadcast(int64_t,int64_t,int64_t,int64_t,const std::vector<std::string> &,const::aidl::android::os::StatsDimensionsValueParcel &)310 ::ndk::ScopedAStatus IPendingIntentRefDefault::sendSubscriberBroadcast(int64_t /*in_configUid*/, int64_t /*in_configId*/, int64_t /*in_subscriptionId*/, int64_t /*in_subscriptionRuleId*/, const std::vector<std::string>& /*in_cookies*/, const ::aidl::android::os::StatsDimensionsValueParcel& /*in_dimensionsValueParcel*/) {
311 ::ndk::ScopedAStatus _aidl_status;
312 _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
313 return _aidl_status;
314 }
sendRestrictedMetricsChangedBroadcast(const std::vector<int64_t> &)315 ::ndk::ScopedAStatus IPendingIntentRefDefault::sendRestrictedMetricsChangedBroadcast(const std::vector<int64_t>& /*in_metricIds*/) {
316 ::ndk::ScopedAStatus _aidl_status;
317 _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
318 return _aidl_status;
319 }
asBinder()320 ::ndk::SpAIBinder IPendingIntentRefDefault::asBinder() {
321 return ::ndk::SpAIBinder();
322 }
isRemote()323 bool IPendingIntentRefDefault::isRemote() {
324 return false;
325 }
326 } // namespace os
327 } // namespace android
328 } // namespace aidl
329