Home
last modified time | relevance | path

Searched full:context (Results 1 – 25 of 951) sorted by relevance

12345678910>>...39

/system/logging/liblog/
Dlog_event_list.cpp48 static void init_context(android_log_context_internal* context, uint32_t tag) { in init_context() argument
49 context->tag = tag; in init_context()
50 context->read_write_flag = kAndroidLoggerWrite; in init_context()
52 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in init_context()
53 context->overflow = true; in init_context()
56 context->storage[context->pos + 0] = EVENT_TYPE_LIST; in init_context()
57 context->list[0] = context->pos + 1; in init_context()
58 context->pos += needed; in init_context()
61 static void init_parser_context(android_log_context_internal* context, const char* msg, in init_parser_context() argument
64 context->len = len; in init_parser_context()
[all …]
/system/chre/chpp/
Dtransport.c41 static void chppSetRxState(struct ChppTransportState *context,
43 static size_t chppConsumePreamble(struct ChppTransportState *context,
45 static size_t chppConsumeHeader(struct ChppTransportState *context,
47 static size_t chppConsumePayload(struct ChppTransportState *context,
49 static size_t chppConsumeFooter(struct ChppTransportState *context,
51 static void chppAbortRxPacket(struct ChppTransportState *context);
54 struct ChppTransportState *context);
58 struct ChppTransportState *context);
60 static void chppSetResetComplete(struct ChppTransportState *context);
61 static void chppProcessResetAck(struct ChppTransportState *context);
[all …]
Dclients.c55 struct ChppAppState *context, uint8_t index);
109 * @param context Maintains status for each app layer instance.
115 struct ChppAppState *context, uint8_t index) { in chppGetClientDeinitFunction() argument
116 CHPP_DEBUG_NOT_NULL(context); in chppGetClientDeinitFunction()
118 return context->registeredClients[index]->deinitFunctionPtr; in chppGetClientDeinitFunction()
125 void chppRegisterCommonClients(struct ChppAppState *context) { in chppRegisterCommonClients() argument
126 UNUSED_VAR(context); in chppRegisterCommonClients()
127 CHPP_DEBUG_NOT_NULL(context); in chppRegisterCommonClients()
132 if (context->clientServiceSet.wwanClient) { in chppRegisterCommonClients()
133 chppRegisterWwanClient(context); in chppRegisterCommonClients()
[all …]
Dapp.c56 static bool chppProcessPredefinedClientRequest(struct ChppAppState *context,
58 static bool chppProcessPredefinedServiceResponse(struct ChppAppState *context,
61 static bool chppDatagramLenIsOk(struct ChppAppState *context,
65 struct ChppAppState *context, uint8_t handle, enum ChppMessageType type);
68 struct ChppAppState *context, uint8_t index);
71 struct ChppAppState *context, uint8_t index);
83 static void chppProcessPredefinedHandleDatagram(struct ChppAppState *context,
85 static void chppProcessNegotiatedHandleDatagram(struct ChppAppState *context,
96 * @param context State of the app layer.
102 static bool chppProcessPredefinedClientRequest(struct ChppAppState *context, in chppProcessPredefinedClientRequest() argument
[all …]
Dservices.c44 void chppRegisterCommonServices(struct ChppAppState *context) { in chppRegisterCommonServices() argument
45 CHPP_DEBUG_NOT_NULL(context); in chppRegisterCommonServices()
46 UNUSED_VAR(context); in chppRegisterCommonServices()
49 if (context->clientServiceSet.wwanService) { in chppRegisterCommonServices()
50 chppRegisterWwanService(context); in chppRegisterCommonServices()
55 if (context->clientServiceSet.wifiService) { in chppRegisterCommonServices()
56 chppRegisterWifiService(context); in chppRegisterCommonServices()
61 if (context->clientServiceSet.gnssService) { in chppRegisterCommonServices()
62 chppRegisterGnssService(context); in chppRegisterCommonServices()
67 void chppDeregisterCommonServices(struct ChppAppState *context) { in chppDeregisterCommonServices() argument
[all …]
/system/chre/chpp/platform/linux/
Dlink.c52 struct ChppLinuxLinkState *context = in linkSendThread() local
55 uint32_t signal = chppNotifierTimedWait(&context->notifier, CHPP_TIME_MAX); in linkSendThread()
64 chppMutexLock(&context->mutex); in linkSendThread()
66 if (context->remoteLinkState == NULL) { in linkSendThread()
69 } else if (!context->linkEstablished) { in linkSendThread()
76 if (context->rxInRemoteEndpointWorker && in linkSendThread()
77 context->remoteLinkState != context) { in linkSendThread()
78 chppNotifierSignal(&context->remoteLinkState->notifier, in linkSendThread()
83 chppNotifierTimedWait(&context->rxNotifier, CHPP_TIME_MAX); in linkSendThread()
84 } else if (!chppRxDataCb(context->remoteLinkState->transportContext, in linkSendThread()
[all …]
/system/core/libstats/push_compat/
Dstats_event_list.c52 android_log_context_internal* context = (android_log_context_internal*)(ctx); in reset_log_context() local
53 uint32_t tag = context->tag; in reset_log_context()
54 memset(context, 0, sizeof(android_log_context_internal)); in reset_log_context()
56 context->tag = tag; in reset_log_context()
57 context->read_write_flag = kAndroidLoggerWrite; in reset_log_context()
59 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in reset_log_context()
60 context->overflow = true; in reset_log_context()
63 context->storage[context->pos + 0] = EVENT_TYPE_LIST; in reset_log_context()
64 context->list[0] = context->pos + 1; in reset_log_context()
65 context->pos += needed; in reset_log_context()
[all …]
/system/media/audio_utils/tests/
Dfifo_threads.cpp27 struct Context { struct
38 Context *context = (Context *) arg; in input_routine() argument
44 ssize_t actual = context->mInputReader->read(buffer, sizeof(buffer), &timeout); in input_routine()
51 ssize_t actual2 = context->mTransferWriter->write(buffer, actual, &timeout); in input_routine()
69 Context *context = (Context *) arg; in output_routine() local
79 ssize_t actual = context->mTransferReader->read(buffer, sizeof(buffer), &timeout); in output_routine()
85 ssize_t actual2 = context->mOutputWriter->write(buffer, actual, NULL /*timeout*/); in output_routine()
125 Context context; in main() local
126 context.mInputWriter = &inputWriter; in main()
127 context.mInputReader = &inputReader; in main()
[all …]
/system/linkerconfig/contents/context/
Dcontext.cc17 #include "linkerconfig/context.h"
34 bool Context::IsSystemSection() const { in IsSystemSection()
38 bool Context::IsVendorSection() const { in IsVendorSection()
42 bool Context::IsProductSection() const { in IsProductSection()
46 bool Context::IsUnrestrictedSection() const { in IsUnrestrictedSection()
50 bool Context::IsDefaultConfig() const { in IsDefaultConfig()
54 bool Context::IsLegacyConfig() const { in IsLegacyConfig()
58 bool Context::IsRecoveryConfig() const { in IsRecoveryConfig()
62 bool Context::IsApexBinaryConfig() const { in IsApexBinaryConfig()
66 const ApexInfo& Context::GetCurrentApex() const { in GetCurrentApex()
[all …]
/system/core/libusbhost/
Dusbhost.c138 static void watch_existing_subdirs(struct usb_host_context *context, in watch_existing_subdirs() argument
144 wds[0] = inotify_add_watch(context->fd, USB_FS_DIR, IN_CREATE | IN_DELETE); in watch_existing_subdirs()
151 ret = inotify_add_watch(context->fd, path, IN_CREATE | IN_DELETE); in watch_existing_subdirs()
159 struct usb_host_context *context = calloc(1, sizeof(struct usb_host_context)); in usb_host_init() local
160 if (!context) { in usb_host_init()
164 context->fd = inotify_init(); in usb_host_init()
165 if (context->fd < 0) { in usb_host_init()
167 free(context); in usb_host_init()
170 return context; in usb_host_init()
173 void usb_host_cleanup(struct usb_host_context *context) in usb_host_cleanup() argument
[all …]
/system/security/keystore2/src/
Dec_crypto.rs18 use anyhow::{Context, Result};
32 ec_key_generate_key().map(ECDHPrivateKey).context(ks_err!("generation failed")) in generate()
37 ec_key_parse_private_key(buf).map(ECDHPrivateKey).context(ks_err!("parsing failed")) in from_private_key()
42 ec_key_marshal_private_key(&self.0).context(ks_err!("marshalling failed")) in private_key()
48 ec_point_point_to_oct(point.get_point()).context(ks_err!("marshalling failed")) in public_key()
62 .context(ks_err!("hkdf_extract on sender_public_key failed"))?; in agree_key()
64 .context(ks_err!("hkdf_extract on recipient_public_key failed"))?; in agree_key()
66 .context(ks_err!("ec_point_oct_to_point failed"))?; in agree_key()
68 .context(ks_err!("ecdh_compute_key failed"))?; in agree_key()
69 let prk = hkdf_extract(&secret, &hkdf).context(ks_err!("hkdf_extract on secret failed"))?; in agree_key()
[all …]
Ddatabase.rs71 use anyhow::{anyhow, Context, Result};
171 .context(ks_err!("KeyMetaData::load_from_db: prepare statement failed."))?; in load_from_db()
177 .context(ks_err!("KeyMetaData::load_from_db: query failed."))?; in load_from_db()
179 let db_tag: i64 = row.get(0).context("Failed to read tag.")?; in load_from_db()
183 .context("Failed to read KeyMetaEntry.")?, in load_from_db()
187 .context(ks_err!("KeyMetaData::load_from_db."))?; in load_from_db()
198 .context(ks_err!("KeyMetaData::store_in_db: Failed to prepare statement."))?; in store_in_db()
247 .context(ks_err!("BlobMetaData::load_from_db: prepare statement failed."))?; in load_from_db()
251 let mut rows = stmt.query(params![blob_id]).context(ks_err!("query failed."))?; in load_from_db()
253 let db_tag: i64 = row.get(0).context("Failed to read tag.")?; in load_from_db()
[all …]
Dsecurity_level.rs66 use anyhow::{anyhow, Context, Result};
97 .context(ks_err!("KeystoreSecurityLevel::new_native_binder."))?; in new_native_binder()
170 let creation_date = DateTime::now().context(ks_err!("Trying to make creation time."))?; in store_new_key()
194 .context(ks_err!("Failed to handle super encryption."))?; in store_new_key()
210 .context(ks_err!())?; in store_new_key()
217 .context(ks_err!())?, in store_new_key()
244 .context(ks_err!("checking use permission for Domain::BLOB."))?; in create_operation()
247 .context(ks_err!("checking forced permission for Domain::BLOB."))?; in create_operation()
253 return Err(Error::sys()).context(ks_err!( in create_operation()
287 .context(ks_err!("Failed to load key blob."))?; in create_operation()
[all …]
/system/chre/java/test/utils/src/com/google/android/utils/chre/
DContextHubHostTestUtil.java18 import android.content.Context;
44 * A class that defines various utility functions to be used by Context Hub host tests.
58 * to the assets directory of the context of the calling app.
60 * @param context the Context to find the asset resources
64 public static String getNanoAppBinaryPath(Context context, ContextHubInfo hubInfo) { in getNanoAppBinaryPath() argument
77 haveNanoApps = context.getAssets().list(path).length > 0; in getNanoAppBinaryPath()
115 Context context = InstrumentationRegistry.getInstrumentation().getContext(); in createNanoAppBinary() local
116 String fullName = getNanoAppBinaryPath(context, hub) + "/" + filename; in createNanoAppBinary()
118 InputStream stream = getNanoAppInputStream(context, fullName); in createNanoAppBinary()
133 * @param context the Context to find the asset resources
[all …]
/system/core/property_service/libpropertyinfoserializer/
Dtrie_builder.h29 PropertyEntryBuilder() : context(nullptr), type(nullptr) {} in PropertyEntryBuilder()
30 PropertyEntryBuilder(const std::string& name, const std::string* context, const std::string* type) in PropertyEntryBuilder()
31 : name(name), context(context), type(type) {} in PropertyEntryBuilder()
33 const std::string* context; member
57 bool AddPrefixContext(const std::string& prefix, const std::string* context, in AddPrefixContext() argument
64 prefixes_.emplace_back(prefix, context, type); in AddPrefixContext()
68 bool AddExactMatchContext(const std::string& exact_match, const std::string* context, in AddExactMatchContext() argument
76 exact_matches_.emplace_back(exact_match, context, type); in AddExactMatchContext()
81 const std::string* context() const { return property_entry_.context; } in context() function
82 void set_context(const std::string* context) { property_entry_.context = context; } in set_context() argument
[all …]
Dproperty_info_serializer_test.cpp48 EXPECT_STREQ("default", property_info_area->context(root_node.context_index())); in TEST()
61 EXPECT_STREQ("1st", property_info_area->context(test_node.context_index())); in TEST()
71 EXPECT_STREQ("2nd", property_info_area->context(prefix->context_index)); in TEST()
84 EXPECT_STREQ("3rd", property_info_area->context(match1->context_index)); in TEST()
85 EXPECT_STREQ("3rd", property_info_area->context(match2->context_index)); in TEST()
86 EXPECT_STREQ("3rd", property_info_area->context(match3->context_index)); in TEST()
122 EXPECT_STREQ("4th", property_info_area->context(final_match->context_index)); in TEST()
145 EXPECT_STREQ("default", property_info_area->context(root_node.context_index())); in TEST()
148 const char* context; in TEST() local
150 property_info_area->GetPropertyInfo("abc", &context, &type); in TEST()
[all …]
Dtrie_builder_test.cpp43 ASSERT_NE(nullptr, builder_root.context()); in TEST()
44 EXPECT_EQ("default", *builder_root.context()); in TEST()
56 ASSERT_NE(nullptr, test_node->context()); in TEST()
57 EXPECT_EQ("1st", *test_node->context()); in TEST()
66 ASSERT_NE(nullptr, property_entry.context); in TEST()
67 EXPECT_EQ("2nd", *property_entry.context); in TEST()
76 ASSERT_NE(nullptr, test_node->exact_matches()[0].context); in TEST()
77 ASSERT_NE(nullptr, test_node->exact_matches()[1].context); in TEST()
78 ASSERT_NE(nullptr, test_node->exact_matches()[2].context); in TEST()
79 EXPECT_EQ("3rd", *test_node->exact_matches()[0].context); in TEST()
[all …]
/system/core/init/
Dselabel.cpp30 // its value. selinux_android_restorecon() also needs an sehandle for file context look up. It
39 // If sehandle is null, this returns success with an empty context.
45 char* context; in SelabelLookupFileContext() local
46 if (selabel_lookup(sehandle, &context, key.c_str(), type) != 0) { in SelabelLookupFileContext()
49 *result = context; in SelabelLookupFileContext()
50 free(context); in SelabelLookupFileContext()
55 // If sehandle is null, this returns success with an empty context.
69 char* context; in SelabelLookupFileContextBestMatch() local
70 if (selabel_lookup_best_match(sehandle, &context, key.c_str(), &c_aliases[0], type) != 0) { in SelabelLookupFileContextBestMatch()
73 *result = context; in SelabelLookupFileContextBestMatch()
[all …]
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/crypto/
Dhmac.h29 * - hmacInit() for initializing hmac keys and hash context
31 * - hmacUpdateHashInit() for initializing hash context and updating input data
60 * Initializes hmac keys and hash context internally
61 * Updates input data to the context
72 * @ctx: HMAC context
76 * Initializes hmac keys and hash context
84 * @ctx: HMAC context
88 * Updates input data to the context
96 * @ctx: HMAC context
100 * Initializes hash context and updates input data to the context
[all …]
/system/extras/power_profile/camera_avg/Application/src/main/java/com/example/android/powerprofile/cameraavg/
DAutoFitTextureView.java19 import android.content.Context;
31 public AutoFitTextureView(Context context) { in AutoFitTextureView() argument
32 this(context, null); in AutoFitTextureView()
35 public AutoFitTextureView(Context context, AttributeSet attrs) { in AutoFitTextureView() argument
36 this(context, attrs, 0); in AutoFitTextureView()
39 public AutoFitTextureView(Context context, AttributeSet attrs, int defStyle) { in AutoFitTextureView() argument
40 super(context, attrs, defStyle); in AutoFitTextureView()
/system/linkerconfig/contents/include/linkerconfig/
Dnamespacebuilder.h20 #include "linkerconfig/context.h"
27 typedef modules::Namespace NamespaceBuilder(const Context& ctx);
41 modules::Namespace BuildVendorNamespace(const Context& ctx,
43 modules::Namespace BuildProductNamespace(const Context& ctx,
46 modules::Namespace BuildVndkNamespace(const Context& ctx,
50 modules::Namespace BuildApexDefaultNamespace(const Context& ctx,
53 const Context& ctx, const modules::ApexInfo& apex_info);
56 void AddVendorSubdirNamespaceProviders(const Context& ctx,
/system/chre/chpp/services/
Ddiscovery.c34 static void chppDiscoveryDiscoverAll(struct ChppAppState *context,
44 * @param context Maintains status for each app layer instance.
48 struct ChppAppState *context, const struct ChppAppHeader *requestHeader) { in chppDiscoveryDiscoverAll() argument
52 context->registeredServiceCount * sizeof(struct ChppServiceDescriptor); in chppDiscoveryDiscoverAll()
56 context->registeredServiceCount, services); in chppDiscoveryDiscoverAll()
63 CHPP_LOGI("Discovery resp count=%" PRIu8, context->registeredServiceCount); in chppDiscoveryDiscoverAll()
68 for (size_t i = 0; i < context->registeredServiceCount; i++) { in chppDiscoveryDiscoverAll()
69 response->services[i] = context->registeredServices[i]->descriptor; in chppDiscoveryDiscoverAll()
73 chppEnqueueTxDatagramOrFail(context->transportContext, response, in chppDiscoveryDiscoverAll()
82 bool chppDispatchDiscoveryClientRequest(struct ChppAppState *context, in chppDispatchDiscoveryClientRequest() argument
[all …]
/system/security/keystore2/selinux/src/
Dlib.rs22 //! And it provides an owning wrapper around context strings `Context`.
27 use anyhow::Context as AnyhowContext;
89 /// Context represents an SELinux context string. It can take ownership of a raw
94 pub enum Context { enum
95 /// Wraps a raw context c-string as returned by libselinux.
97 /// Stores a context string as `std::ffi::CString`.
101 impl PartialEq for Context { implementation
109 impl Eq for Context {} implementation
111 impl fmt::Display for Context { implementation
113 write!(f, "{}", (**self).to_str().unwrap_or("Invalid context")) in fmt()
[all …]
/system/core/property_service/property_info_checker/
Dproperty_info_checker.cpp9 #include <sepol/context.h>
90 bool CheckContext(const char* context) { in CheckContext() argument
92 if (sepol_context_from_string(sepol_handle_, context, &sepol_context_raw) < 0) { in CheckContext()
93 std::cerr << "Could not allocate context for " << context << std::endl; in CheckContext()
100 std::cerr << "Sepol context check failed for " << context << std::endl; in CheckContext()
109 std::cerr << "Could not find context '" << context << "' in policy database" << std::endl; in CheckContext()
114 std::cerr << "Context '" << context << "' is not defined as a type in policy database" in CheckContext()
120 std::cerr << "Context '" << context << "' does not have property_type attribute" << std::endl; in CheckContext()
181 if (!checker.CheckContext(property_info_area->context(i))) { in main()
/system/cros-codecs/src/decoder/stateless/av1/
Dvaapi.rs8 use anyhow::Context;
323 .context("Invalid width_in_sbs_minus_1")?;
333 .context("Invalid height_in_sbs_minus_1")?;
350 u16::try_from(quant.qm_y).context("Invalid qm_y")?,
351 u16::try_from(quant.qm_u).context("Invalid qm_u")?,
352 u16::try_from(quant.qm_v).context("Invalid qm_v")?,
381 .context("Failed to merge primary and secondary strengths")?;
392 .context("Failed to merge primary and secondary strengths")?;
410 u8::try_from(seq.seq_profile as u32).context("Invalid profile")?,
411 u8::try_from(seq.order_hint_bits_minus_1).context("Invalid order hint bits")?,
[all …]

12345678910>>...39