Home
last modified time | relevance | path

Searched refs:db (Results 1 – 25 of 240) sorted by relevance

12345678910

/system/iorap/src/db/
Dclean_up.cc31 namespace iorap::db { namespace
33 void CleanUpFilesForActivity(const db::DbHandle& db, in CleanUpFilesForActivity() argument
34 const db::VersionedComponentName& vcn) { in CleanUpFilesForActivity()
37 std::vector<db::RawTraceModel> raw_traces = in CleanUpFilesForActivity()
38 db::RawTraceModel::SelectByVersionedComponentName(db, vcn); in CleanUpFilesForActivity()
39 for (db::RawTraceModel raw_trace : raw_traces) { in CleanUpFilesForActivity()
47 std::optional<db::PrefetchFileModel> prefetch_file = in CleanUpFilesForActivity()
48 db::PrefetchFileModel::SelectByVersionedComponentName(db, vcn); in CleanUpFilesForActivity()
58 void CleanUpFilesForPackage(const db::DbHandle& db, in CleanUpFilesForPackage() argument
64 std::vector<db::ActivityModel> activities = in CleanUpFilesForPackage()
[all …]
Dmodels.h35 namespace iorap::db {
40 void operator()(sqlite3* db) { in operator()
41 if (db != nullptr) { in operator()
42 LOG(VERBOSE) << "sqlite3_close for: " << db; in operator()
43 sqlite3_close(db); in operator()
51 explicit DbHandle(sqlite3* db) in DbHandle() argument
52 : db_{std::shared_ptr<sqlite3>{db, SqliteDbDeleter{}}}, in DbHandle()
92 static DbStatement Prepare(DbHandle db, const std::string& sql, Args&&... args) { in Prepare() argument
93 return Prepare(db, sql.c_str(), std::forward<Args>(args)...); in Prepare()
97 static DbStatement Prepare(DbHandle db, const char* sql, Args&&... args) { in Prepare() argument
[all …]
Dclean_up.h26 namespace iorap::db {
30 void CleanUpFilesForDb(const db::DbHandle& db);
34 void CleanUpFilesForPackage(const db::DbHandle& db,
44 void CleanUpFilesForPackage(const db::DbHandle& db,
49 void CleanUpFilesForPackage(const db::DbHandle& db,
Dfile_models.cc29 namespace iorap::db { namespace
116 return ::iorap::db::MkdirWithParents(BaseDir()); in MkdirWithParents()
135 bool PerfettoTraceFileModel::NeedMorePerfettoTraces(DbHandle& db, in NeedMorePerfettoTraces() argument
138 RawTraceModel::SelectByVersionedComponentName(db, vcn); in NeedMorePerfettoTraces()
148 void PerfettoTraceFileModel::DeleteOlderFiles(DbHandle& db, VersionedComponentName vcn) { in DeleteOlderFiles() argument
150 RawTraceModel::SelectByVersionedComponentName(db, vcn); in DeleteOlderFiles()
/system/iorap/src/maintenance/
Dcontroller.cc58 db::CompiledTraceFileModel CalculateNewestFilePath( in CalculateNewestFilePath()
62 db::VersionedComponentName versioned_component_name{ in CalculateNewestFilePath()
65 db::CompiledTraceFileModel output_file = in CalculateNewestFilePath()
66 db::CompiledTraceFileModel::CalculateNewestFilePath(versioned_component_name); in CalculateNewestFilePath()
225 const db::DbHandle& db, in GetPerfettoTraceInfo() argument
226 const std::vector<db::AppLaunchHistoryModel>& histories) { in GetPerfettoTraceInfo()
229 for(db::AppLaunchHistoryModel history : histories) { in GetPerfettoTraceInfo()
231 std::optional<db::RawTraceModel> raw_trace = in GetPerfettoTraceInfo()
232 db::RawTraceModel::SelectByHistoryId(db, history.id); in GetPerfettoTraceInfo()
281 bool CompileActivity(const db::DbHandle& db, in CompileActivity() argument
[all …]
Ddb_cleaner.cc37 void CleanUpDatabase(const db::DbHandle& db, in CleanUpDatabase() argument
39 std::vector<db::PackageModel> packages = db::PackageModel::SelectAll(db); in CleanUpDatabase()
41 if (!db::DbQueryBuilder::ExecuteOnce(db, kForeignKeyOnSql)) { in CleanUpDatabase()
45 for (db::PackageModel package : packages) { in CleanUpDatabase()
57 db::CleanUpFilesForPackage(db, package.id, package.name, package.version); in CleanUpDatabase()
Dcontroller.h106 bool CompileAppsOnDevice(const db::DbHandle& db, const ControllerParameters& params);
108 bool CompileSingleAppOnDevice(const db::DbHandle& db,
112 void Dump(const db::DbHandle& db, ::android::Printer& printer);
Ddb_cleaner.h30 void CleanUpDatabase(const db::DbHandle& db,
/system/apex/apexd/
Dapex_database_test.cpp96 size_t CountPackages(const MountedApexDatabase& db) { in CountPackages() argument
98 db.ForallMountedApexes([&ret](const std::string& a ATTRIBUTE_UNUSED, in CountPackages()
104 bool Contains(const MountedApexDatabase& db, const std::string& package, in Contains() argument
109 db.ForallMountedApexes([&](const std::string& p, const MountedApexData& d, in Contains()
120 bool ContainsPackage(const MountedApexDatabase& db, const std::string& package, in ContainsPackage() argument
125 db.ForallMountedApexes( in ContainsPackage()
143 MountedApexDatabase db; in TEST() local
144 ASSERT_EQ(CountPackages(db), 0u); in TEST()
146 db.AddMountedApex(kPackage, false, kLoopName, kPath, kMountPoint, kDeviceName, in TEST()
148 ASSERT_TRUE(Contains(db, kPackage, kLoopName, kPath, kMountPoint, kDeviceName, in TEST()
[all …]
/system/sepolicy/tests/
Dsepol_wrap.cpp35 policydb_t *db = static_cast<policydb_t *>(policydbp); in init_genfs_iter() local
37 out->genfs = db->genfs; in init_genfs_iter()
38 out->ocon = db->genfs->head; in init_genfs_iter()
54 policydb_t *db = static_cast<policydb_t *>(policydbp); in get_genfs() local
59 db->p_user_val_to_name[i->ocon->context->user-1], in get_genfs()
60 db->p_role_val_to_name[i->ocon->context->role-1], in get_genfs()
61 db->p_type_val_to_name[i->ocon->context->type-1]); in get_genfs()
100 policydb_t *db = static_cast<policydb_t *>(policydbp); in init_type_iter() local
110 out->length = db->p_types.nprim; in init_type_iter()
118 out->d = static_cast<type_datum *>(hashtab_search(db->p_types.table, type)); in init_type_iter()
[all …]
/system/security/keystore2/legacykeystore/
Dlib.rs46 let mut db = Self { in new() localVariable
50 db.init_tables().context("Trying to initialize legacy keystore db.")?; in new()
51 Ok(db) in new()
309 let mut db = self.open_db().context("In get.")?; in get() localVariable
312 if let Some(entry) = db.get(uid, alias).context("In get: Trying to load entry from DB.")? { in get()
318 db.get(uid, alias).context("In get: Trying to load entry from DB.")? in get()
331 let mut db = self.open_db().context("In put.")?; in put() localVariable
332 db.put(uid, alias, entry).context("In put: Trying to insert entry into DB.") in put()
337 let mut db = self.open_db().context("In remove.")?; in remove() localVariable
342 db.remove(uid, alias).context("In remove: Trying to remove entry from DB.")?; in remove()
[all …]
/system/security/keystore2/src/
Dremote_provisioning.rs69 fn check_rem_prov_enabled(&self, db: &mut KeystoreDB) -> Result<bool> { in check_rem_prov_enabled()
80 let pool_status = db in check_rem_prov_enabled()
94 db: &mut KeystoreDB, in get_rem_prov_attest_key()
103 self.get_rem_prov_attest_key_helper(key, caller_uid, db) in get_rem_prov_attest_key()
106 || self.get_rem_prov_attest_key_helper(key, caller_uid, db), in get_rem_prov_attest_key()
132 db: &mut KeystoreDB, in get_rem_prov_attest_key_helper()
134 let cert_chain = db in get_rem_prov_attest_key_helper()
143 db.assign_attestation_key(key.domain, caller_uid as i64, &self.km_uuid) in get_rem_prov_attest_key_helper()
176 db: &mut KeystoreDB, in get_remotely_provisioned_attestation_key_and_certs()
178 if !self.is_asymmetric_key(params) || !self.check_rem_prov_enabled(db)? { in get_remotely_provisioned_attestation_key_and_certs()
[all …]
Ddatabase.rs848 let mut db = Self { conn, gc, perboot: perboot::PERBOOT_DB.clone() }; in new() localVariable
849 db.with_transaction(TransactionBehavior::Immediate, |tx| { in new()
854 Ok(db) in new()
3246 let mut db = KeystoreDB { conn, gc: None, perboot: Arc::new(perboot::PerbootDB::new()) }; in new_test_db() localVariable
3247 db.with_transaction(TransactionBehavior::Immediate, |tx| { in new_test_db()
3250 Ok(db) in new_test_db()
3266 db: &mut KeystoreDB, in rebind_alias()
3272 db.with_transaction(TransactionBehavior::Immediate, |tx| { in rebind_alias()
3319 let db = new_test_db()?; in test_tables() localVariable
3320 let tables = db in test_tables()
[all …]
Dmaintenance.rs75 DB.with(|db| { in on_user_password_changed()
76 SUPER_KEY.unlock_screen_lock_bound_key(&mut db.borrow_mut(), user_id as u32, pw) in on_user_password_changed()
82 .with(|db| { in on_user_password_changed()
84 &mut db.borrow_mut(), in on_user_password_changed()
109 DB.with(|db| { in add_or_remove_user()
111 &mut db.borrow_mut(), in add_or_remove_user()
131 DB.with(|db| db.borrow_mut().unbind_keys_for_namespace(domain, nspace)) in clear_namespace()
143 .with(|db| { in get_state()
144 UserState::get(&mut db.borrow_mut(), &LEGACY_MIGRATOR, &SUPER_KEY, user_id as u32) in get_state()
204 if let Err(e) = DB.with(|db| SUPER_KEY.set_up_boot_level_cache(&mut db.borrow_mut())) { in early_boot_ended()
[all …]
Dservice.rs136 .with(|db| { in get_key_entry()
138 db.borrow_mut().load_key_entry( in get_key_entry()
187 DB.with::<_, Result<()>>(|db| { in update_subcomponent()
189 db.borrow_mut().load_key_entry( in update_subcomponent()
208 let mut db = db.borrow_mut(); in update_subcomponent() localVariable
210 db.set_blob(&key_id_guard, SubComponentType::CERT, public_cert, None) in update_subcomponent()
213 db.set_blob(&key_id_guard, SubComponentType::CERT_CHAIN, certificate_chain, None) in update_subcomponent()
244 db.store_new_certificate( in update_subcomponent()
297 .with(|db| { in list_entries()
298 let mut db = db.borrow_mut(); in list_entries() localVariable
[all …]
Dattestation_key_utils.rs58 db: &mut KeystoreDB, in get_attest_key_info()
63 .get_remotely_provisioned_attestation_key_and_certs(&key, caller_uid, params, db) in get_attest_key_info()
74 Some(attest_key) => get_user_generated_attestation_key(&attest_key, caller_uid, db) in get_attest_key_info()
83 db: &mut KeystoreDB, in get_user_generated_attestation_key()
86 load_attest_key_blob_and_cert(&key, caller_uid, db) in get_user_generated_attestation_key()
99 db: &mut KeystoreDB, in load_attest_key_blob_and_cert()
106 let (key_id_guard, mut key_entry) = db in load_attest_key_blob_and_cert()
Dkey_parameter.rs1154 let db = init_db()?; in test_new_from_sql_enum_i32() localVariable
1156 &db, in test_new_from_sql_enum_i32()
1162 let key_param = query_from_keyparameter(&db)?; in test_new_from_sql_enum_i32()
1173 let db = init_db()?; in test_new_from_sql_i32() localVariable
1174 insert_into_keyparameter(&db, 1, Tag::KEY_SIZE.0, &1024, SecurityLevel::STRONGBOX.0)?; in test_new_from_sql_i32()
1175 let key_param = query_from_keyparameter(&db)?; in test_new_from_sql_i32()
1185 let db = init_db()?; in test_new_from_sql_i64() localVariable
1188 &db, in test_new_from_sql_i64()
1194 let key_param = query_from_keyparameter(&db)?; in test_new_from_sql_i64()
1207 let db = init_db()?; in test_new_from_sql_bool() localVariable
[all …]
Draw_device.rs102 db: &mut KeystoreDB, in create_and_store_key()
122 db.store_new_key( in create_and_store_key()
147 db: &mut KeystoreDB, in lookup_from_desc()
151 db.load_key_entry(&key_desc, key_type, KeyEntryLoadBits::KM, AID_KEYSTORE, |_, _| Ok(())) in lookup_from_desc()
172 db: &mut KeystoreDB, in lookup_or_generate_key()
186 let lookup = Self::not_found_is_none(Self::lookup_from_desc(db, key_desc, key_type)) in lookup_or_generate_key()
204 db, in lookup_or_generate_key()
231 self.create_and_store_key(db, &key_desc, key_type, |km_dev| { in lookup_or_generate_key()
235 Self::lookup_from_desc(db, key_desc, key_type) in lookup_or_generate_key()
253 db: &mut KeystoreDB, in upgrade_keyblob_if_required_with()
[all …]
Dsuper_key.rs191 db: &mut KeystoreDB, in decrypt()
214 db, in decrypt()
284 pub fn set_up_boot_level_cache(self: &Arc<Self>, db: &mut KeystoreDB) -> Result<()> { in set_up_boot_level_cache()
290 let level_zero_key = get_level_zero_key(db) in set_up_boot_level_cache()
392 db: &mut KeystoreDB, in unlock_user_key()
397 let (_, entry) = db in unlock_user_key()
499 db: &mut KeystoreDB, in super_key_exists_in_db_for_user()
503 let key_in_db = db in super_key_exists_in_db_for_user()
521 db: &mut KeystoreDB, in check_and_unlock_super_key()
528 .with_try_migrate_super_key(user_id, pw, || db.load_super_key(alias, user_id)) in check_and_unlock_super_key()
[all …]
Dauthorization.rs150 DB.with(|db| { in on_lock_screen_event()
152 &mut db.borrow_mut(), in on_lock_screen_event()
161 .with(|db| { in on_lock_screen_event()
163 &mut db.borrow_mut(), in on_lock_screen_event()
183 DB.with(|db| { in on_lock_screen_event()
184 SUPER_KEY.try_unlock_user_with_biometric(&mut db.borrow_mut(), user_id as u32) in on_lock_screen_event()
193 DB.with(|db| { in on_lock_screen_event()
195 &mut db.borrow_mut(), in on_lock_screen_event()
Dmetrics_store.rs540 DB.with(|db| { in pull_storage_stats()
541 let mut db = db.borrow_mut(); in pull_storage_stats() localVariable
542 append(db.get_storage_stat(MetricsStorage::DATABASE)); in pull_storage_stats()
543 append(db.get_storage_stat(MetricsStorage::KEY_ENTRY)); in pull_storage_stats()
544 append(db.get_storage_stat(MetricsStorage::KEY_ENTRY_ID_INDEX)); in pull_storage_stats()
545 append(db.get_storage_stat(MetricsStorage::KEY_ENTRY_DOMAIN_NAMESPACE_INDEX)); in pull_storage_stats()
546 append(db.get_storage_stat(MetricsStorage::BLOB_ENTRY)); in pull_storage_stats()
547 append(db.get_storage_stat(MetricsStorage::BLOB_ENTRY_KEY_ENTRY_ID_INDEX)); in pull_storage_stats()
548 append(db.get_storage_stat(MetricsStorage::KEY_PARAMETER)); in pull_storage_stats()
549 append(db.get_storage_stat(MetricsStorage::KEY_PARAMETER_KEY_ENTRY_ID_INDEX)); in pull_storage_stats()
[all …]
Dgc.rs59 let (invalidate_key, db, super_key) = init(); in new_init_with()
65 db, in new_init_with()
88 db: KeystoreDB, field
104 .db in process_one_key()
/system/iorap/src/manager/
Devent_manager.cc64 using db::AppComponentName;
374 db::DbHandle db{db::SchemaModel::GetSingleton()}; in GetCompiledTrace() local
381 db::VersionedComponentName vcn{component_name.package, in GetCompiledTrace()
385 std::optional<db::PrefetchFileModel> compiled_trace = in GetCompiledTrace()
386 db::PrefetchFileModel::SelectByVersionedComponentName(db, vcn); in GetCompiledTrace()
468 db::VersionedComponentName versioned_component_name{component_name.package, in StartTracing()
471 db::DbHandle db{db::SchemaModel::GetSingleton()}; in StartTracing() local
476 if (!db::PerfettoTraceFileModel::NeedMorePerfettoTraces( in StartTracing()
477 db, versioned_component_name)) { in StartTracing()
523 db::PerfettoTraceFileModel file_model = in StartTracing()
[all …]
/system/bt/stack/gatt/
Dgatt_db.cc45 static tGATT_ATTR& allocate_attr_in_db(tGATT_SVC_DB& db, const Uuid& uuid,
54 void gatts_init_service_db(tGATT_SVC_DB& db, const Uuid& service_uuid, in gatts_init_service_db() argument
56 db.attr_list.reserve(num_handle); in gatts_init_service_db()
62 db.next_handle = s_hdl; in gatts_init_service_db()
63 db.end_handle = s_hdl + num_handle; in gatts_init_service_db()
68 tGATT_ATTR& attr = allocate_attr_in_db(db, uuid, GATT_PERM_READ); in gatts_init_service_db()
326 uint16_t gatts_add_included_service(tGATT_SVC_DB& db, uint16_t s_handle, in gatts_add_included_service() argument
339 tGATT_ATTR& attr = allocate_attr_in_db(db, uuid, GATT_PERM_READ); in gatts_add_included_service()
365 uint16_t gatts_add_characteristic(tGATT_SVC_DB& db, tGATT_PERM perm, in gatts_add_characteristic() argument
373 tGATT_ATTR& char_decl = allocate_attr_in_db(db, uuid, GATT_PERM_READ); in gatts_add_characteristic()
[all …]
/system/bt/stack/test/fuzzers/sdp/
DsdpFuzzFunctions.h76 tSDP_DISCOVERY_DB* db =
78 if (db) {
79 SDP_ServiceSearchRequest(bd_addr, db, &sdp_disc_cmpl_cb);
86 tSDP_DISCOVERY_DB* db =
88 if (db) {
89 SDP_ServiceSearchAttributeRequest(bd_addr, db, &sdp_disc_cmpl_cb);
98 tSDP_DISCOVERY_DB* db =
101 if (db) {
102 SDP_ServiceSearchAttributeRequest2(bd_addr, db, &sdp_disc_cmpl_cb2,

12345678910