/system/media/audio_utils/ |
D | Metadata.cpp | 29 int audio_metadata_put_int32(audio_metadata_t *metadata, const char *key, int32_t value) { in audio_metadata_put_int32() argument 30 if (metadata == nullptr || key == nullptr) { in audio_metadata_put_int32() 33 reinterpret_cast<Data *>(metadata)->emplace(key, value); in audio_metadata_put_int32() 37 int audio_metadata_put_int64(audio_metadata_t *metadata, const char *key, int64_t value) { in audio_metadata_put_int64() argument 38 if (metadata == nullptr || key == nullptr) { in audio_metadata_put_int64() 41 reinterpret_cast<Data *>(metadata)->emplace(key, value); in audio_metadata_put_int64() 45 int audio_metadata_put_float(audio_metadata_t *metadata, const char *key, float value) { in audio_metadata_put_float() argument 46 if (metadata == nullptr || key == nullptr) { in audio_metadata_put_float() 49 reinterpret_cast<Data *>(metadata)->emplace(key, value); in audio_metadata_put_float() 53 int audio_metadata_put_double(audio_metadata_t *metadata, const char *key, double value) { in audio_metadata_put_double() argument [all …]
|
/system/update_engine/common/ |
D | fake_prefs.cc | 31 void CheckNotNull(std::string_view key, void* ptr) { in CheckNotNull() argument 32 EXPECT_NE(nullptr, ptr) << "Called Get*() for key \"" << key in CheckNotNull() 66 bool FakePrefs::GetString(std::string_view key, string* value) const { in GetString() argument 67 return GetValue(key, value); in GetString() 70 bool FakePrefs::SetString(std::string_view key, std::string_view value) { in SetString() argument 71 SetValue(key, std::string(value)); in SetString() 75 bool FakePrefs::GetInt64(std::string_view key, int64_t* value) const { in GetInt64() argument 76 return GetValue(key, value); in GetInt64() 79 bool FakePrefs::SetInt64(std::string_view key, const int64_t value) { in SetInt64() argument 80 SetValue(key, value); in SetInt64() [all …]
|
D | prefs.cc | 54 bool PrefsBase::GetString(const std::string_view key, string* value) const { in GetString() argument 55 return storage_->GetKey(key, value); in GetString() 58 bool PrefsBase::SetString(std::string_view key, std::string_view value) { in SetString() argument 59 TEST_AND_RETURN_FALSE(storage_->SetKey(key, value)); in SetString() 60 const auto observers_for_key = observers_.find(key); in SetString() 64 observer->OnPrefSet(key); in SetString() 69 bool PrefsBase::GetInt64(const std::string_view key, int64_t* value) const { in GetInt64() argument 71 if (!GetString(key, &str_value)) in GetInt64() 78 bool PrefsBase::SetInt64(std::string_view key, const int64_t value) { in SetInt64() argument 79 return SetString(key, base::NumberToString(value)); in SetInt64() [all …]
|
D | mock_prefs.h | 32 MOCK_CONST_METHOD2(GetString, bool(std::string_view key, std::string* value)); 33 MOCK_METHOD2(SetString, bool(std::string_view key, std::string_view value)); 34 MOCK_CONST_METHOD2(GetInt64, bool(std::string_view key, int64_t* value)); 35 MOCK_METHOD2(SetInt64, bool(std::string_view key, const int64_t value)); 37 MOCK_CONST_METHOD2(GetBoolean, bool(std::string_view key, bool* value)); 38 MOCK_METHOD2(SetBoolean, bool(std::string_view key, const bool value)); 40 MOCK_CONST_METHOD1(Exists, bool(std::string_view key)); 41 MOCK_METHOD1(Delete, bool(std::string_view key)); 43 bool(std::string_view key, const std::vector<std::string>& nss)); 48 MOCK_METHOD2(AddObserver, void(std::string_view key, ObserverInterface*)); [all …]
|
D | prefs.h | 45 virtual bool GetKey(std::string_view key, std::string* value) const = 0; 54 virtual bool SetKey(std::string_view key, std::string_view value) = 0; 57 virtual bool KeyExists(std::string_view key) const = 0; 61 virtual bool DeleteKey(std::string_view key) = 0; 70 bool GetString(std::string_view key, std::string* value) const override; 71 bool SetString(std::string_view key, std::string_view value) override; 72 bool GetInt64(std::string_view key, int64_t* value) const override; 73 bool SetInt64(std::string_view key, const int64_t value) override; 74 bool GetBoolean(std::string_view key, bool* value) const override; 75 bool SetBoolean(std::string_view key, const bool value) override; [all …]
|
D | prefs_interface.h | 40 virtual void OnPrefSet(std::string_view key) = 0; 43 virtual void OnPrefDeleted(std::string_view key) = 0; 51 virtual bool GetString(std::string_view key, std::string* value) const = 0; 55 virtual bool SetString(std::string_view key, std::string_view value) = 0; 60 virtual bool GetInt64(std::string_view key, int64_t* value) const = 0; 64 virtual bool SetInt64(std::string_view key, const int64_t value) = 0; 69 virtual bool GetBoolean(std::string_view key, bool* value) const = 0; 73 virtual bool SetBoolean(std::string_view key, const bool value) = 0; 77 virtual bool Exists(std::string_view key) const = 0; 81 virtual bool Delete(std::string_view key) = 0; [all …]
|
D | fake_prefs.h | 44 bool GetString(std::string_view key, std::string* value) const override; 45 bool SetString(std::string_view key, std::string_view value) override; 46 bool GetInt64(std::string_view key, int64_t* value) const override; 47 bool SetInt64(std::string_view key, const int64_t value) override; 48 bool GetBoolean(std::string_view key, bool* value) const override; 49 bool SetBoolean(std::string_view key, const bool value) override; 51 bool Exists(std::string_view key) const override; 52 bool Delete(std::string_view key) override; 53 bool Delete(std::string_view key, 59 void AddObserver(std::string_view key, ObserverInterface* observer) override; [all …]
|
/system/sepolicy/tools/sepolicy-analyze/ |
D | typecmp.c | 21 if (k->source_type < c->key.source_type) in insert_type_rule() 23 if (k->source_type == c->key.source_type && in insert_type_rule() 24 k->target_type < c->key.target_type) in insert_type_rule() 26 if (k->source_type == c->key.source_type && in insert_type_rule() 27 k->target_type == c->key.target_type && in insert_type_rule() 28 k->target_class <= c->key.target_class) in insert_type_rule() 33 k->source_type == c->key.source_type && in insert_type_rule() 34 k->target_type == c->key.target_type && in insert_type_rule() 35 k->target_class == c->key.target_class) { in insert_type_rule() 47 n->key = *k; in insert_type_rule() [all …]
|
/system/core/libcutils/ |
D | str_parms.cpp | 86 const char *key; member 89 static bool remove_pair(void *key, void *value, void *context) in remove_pair() argument 102 if (!ctxt->key) { in remove_pair() 105 } else if (!strcmp(ctxt->key, static_cast<const char*>(key))) { in remove_pair() 113 hashmapRemove(ctxt->str_parms->map, key); in remove_pair() 114 free(key); in remove_pair() 119 void str_parms_del(struct str_parms *str_parms, const char *key) in str_parms_del() argument 123 .key = key, in str_parms_del() 161 char *key; in str_parms_create_str() local 168 key = strndup(kvpair, eq - kvpair); in str_parms_create_str() [all …]
|
D | properties.cpp | 27 int8_t property_get_bool(const char* key, int8_t default_value) { in property_get_bool() argument 28 if (!key) return default_value; in property_get_bool() 33 int len = property_get(key, buf, ""); in property_get_bool() 53 static T property_get_int(const char* key, T default_value) { in property_get_int() argument 54 if (!key) return default_value; in property_get_int() 57 if (property_get(key, value, "") < 1) return default_value; in property_get_int() 73 int64_t property_get_int64(const char* key, int64_t default_value) { in property_get_int64() argument 74 return property_get_int<int64_t>(key, default_value); in property_get_int64() 77 int32_t property_get_int32(const char* key, int32_t default_value) { in property_get_int32() argument 78 return property_get_int<int32_t>(key, default_value); in property_get_int32() [all …]
|
D | hashmap.cpp | 28 void* key; member 37 int (*hash)(void* key); 44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) { in hashmapCreate() argument 83 static inline int hashKey(Hashmap* map, void* key) { in hashKey() argument 84 int h = map->hash(key); in hashKey() 158 int hashmapHash(void* key, size_t keySize) { in hashmapHash() argument 160 char* data = (char*) key; in hashmapHash() 169 static Entry* createEntry(void* key, int hash, void* value) { in createEntry() argument 174 entry->key = key; in createEntry() 192 void* hashmapPut(Hashmap* map, void* key, void* value) { in hashmapPut() argument [all …]
|
/system/update_engine/scripts/update_payload/ |
D | histogram.py | 57 self.max_key_len = max([len(str(key)) for key, count in self.data]) 58 self.total = sum([count for key, count in self.data]) 81 namer = lambda key: key_names[key] argument 83 namer = lambda key: key argument 85 hist = [(namer(key), count) for key, count in count_dict.items()] 107 for key in key_list: 108 count_dict[key] += 1 114 for key, count in self.data: 120 str(key).ljust(self.max_key_len), 132 return [key for key, _ in self.data]
|
/system/security/keystore2/src/ |
D | audit_log.rs | 45 pub fn log_key_generated(key: &KeyDescriptor, calling_app: uid_t, success: bool) { in log_key_generated() 46 log_key_event(TAG_KEY_GENERATED, key, calling_app, success); in log_key_generated() 50 pub fn log_key_imported(key: &KeyDescriptor, calling_app: uid_t, success: bool) { in log_key_imported() 51 log_key_event(TAG_KEY_IMPORTED, key, calling_app, success); in log_key_imported() 55 pub fn log_key_deleted(key: &KeyDescriptor, calling_app: uid_t, success: bool) { in log_key_deleted() 56 log_key_event(TAG_KEY_DESTROYED, key, calling_app, success); in log_key_deleted() 60 pub fn log_key_integrity_violation(key: &KeyDescriptor) { in log_key_integrity_violation() 62 let owner = key_owner(key.domain, key.nspace, key.nspace as i32); in log_key_integrity_violation() 63 ctx.append_str(key.alias.as_ref().map_or("none", String::as_str)).append_i32(owner) in log_key_integrity_violation() 67 fn log_key_event(tag: u32, key: &KeyDescriptor, calling_app: uid_t, success: bool) { in log_key_event() [all …]
|
D | permission.rs | 289 key: &KeyDescriptor, in check_grant_permission() 291 let target_context = match key.domain { in check_grant_permission() 293 Domain::SELINUX => lookup_keystore2_key_context(key.nspace) in check_grant_permission() 295 _ => return Err(KsError::sys()).context(format!("Cannot grant {:?}.", key.domain)), in check_grant_permission() 338 key: &KeyDescriptor, in check_key_permission() 354 let target_context = match key.domain { in check_key_permission() 357 if caller_uid as i64 != key.nspace { in check_key_permission() 363 Domain::SELINUX => lookup_keystore2_key_context(key.nspace) in check_key_permission() 387 let tctx = lookup_keystore2_key_context(key.nspace) in check_key_permission() 397 .context(format!("Unknown domain value: \"{:?}\".", key.domain)) in check_key_permission() [all …]
|
/system/keymint/boringssl/src/ |
D | ec.rs | 62 let key = match curve { in generate_nist_key() localVariable 68 Ok(crypto::KeyMaterial::Ec(curve.into(), CurveType::Nist, key.into())) in generate_nist_key() 77 let key = ossl!(pkey.raw_private_key())?; in generate_ed25519_key() localVariable 78 let key: [u8; ec::CURVE25519_PRIV_KEY_LEN] = key.try_into().map_err(|e| { in generate_ed25519_key() localVariable 81 let key = Key::Ed25519(ec::Ed25519Key(key)); in generate_ed25519_key() localVariable 82 Ok(crypto::KeyMaterial::Ec(EcCurve::Curve25519, CurveType::EdDsa, key.into())) in generate_ed25519_key() 91 let key = ossl!(pkey.raw_private_key())?; in generate_x25519_key() localVariable 92 let key: [u8; ec::CURVE25519_PRIV_KEY_LEN] = key.try_into().map_err(|e| { in generate_x25519_key() localVariable 95 let key = Key::X25519(ec::X25519Key(key)); in generate_x25519_key() localVariable 96 Ok(crypto::KeyMaterial::Ec(EcCurve::Curve25519, CurveType::Xdh, key.into())) in generate_x25519_key() [all …]
|
/system/nfc/src/adaptation/ |
D | nfc_config.cc | 91 bool NfcConfig::hasKey(const std::string& key) { in hasKey() argument 92 return getInstance().config_.hasKey(key); in hasKey() 95 std::string NfcConfig::getString(const std::string& key) { in getString() argument 96 return getInstance().config_.getString(key); in getString() 99 std::string NfcConfig::getString(const std::string& key, in getString() argument 101 if (hasKey(key)) return getString(key); in getString() 105 unsigned NfcConfig::getUnsigned(const std::string& key) { in getUnsigned() argument 106 return getInstance().config_.getUnsigned(key); in getUnsigned() 109 unsigned NfcConfig::getUnsigned(const std::string& key, in getUnsigned() argument 111 if (hasKey(key)) return getUnsigned(key); in getUnsigned() [all …]
|
/system/keymaster/include/keymaster/cppcose/ |
D | cppcose.h | 160 auto key = parse(coseKey); in parse() local 161 if (!key) return key; in parse() 163 if (!key->checkIntValue(CoseKey::KEY_TYPE, expectedKeyType) || in parse() 164 !key->checkIntValue(CoseKey::ALGORITHM, expectedAlgorithm) || in parse() 165 !key->checkIntValue(CoseKey::CURVE, expectedCurve)) { in parse() 169 return key; in parse() 173 auto key = parse(coseKey, OCTET_KEY_PAIR, EDDSA, ED25519); in parseEd25519() local 174 if (!key) return key; in parseEd25519() 176 auto& pubkey = key->getMap().get(PUBKEY_X); in parseEd25519() 182 return key; in parseEd25519() [all …]
|
/system/core/mini_keyctl/ |
D | mini_keyctl.cpp | 50 key_serial_t key; in parseKeyOrDie() local 51 if (!android::base::ParseInt(str, &key)) { in parseKeyOrDie() 54 return key; in parseKeyOrDie() 57 int Unlink(key_serial_t key, const std::string& keyring) { in Unlink() argument 59 if (keyctl_unlink(key, keyring_id) < 0) { in Unlink() 60 error(1, errno, "Failed to unlink key %x from keyring %s", key, keyring.c_str()); in Unlink() 74 key_serial_t key = add_key(type.c_str(), desc.c_str(), data.c_str(), data.size(), keyring_id); in Add() local 76 if (key < 0) { in Add() 81 std::cout << key << std::endl; in Add() 97 key_serial_t key = add_key(type.c_str(), desc.c_str(), data.c_str(), data.size(), keyring_id); in Padd() local [all …]
|
/system/security/keystore2/tests/ |
D | keystore2_client_key_id_domain_tests.rs | 74 nspace: key_metadata.key.nspace, in keystore2_find_key_with_key_id_as_domain() 81 assert_eq!(key_metadata.key, key_entry_response.metadata.key); in keystore2_find_key_with_key_id_as_domain() 84 assert_eq!(key_metadata.key.nspace, key_entry_response.metadata.key.nspace); in keystore2_find_key_with_key_id_as_domain() 90 &key_entry_response.metadata.key, in keystore2_find_key_with_key_id_as_domain() 139 assert_ne!(key_metadata.key, new_key_metadata.key); in keystore2_key_id_alias_rebind_verify_by_alias() 141 assert_ne!(key_metadata.key.nspace, new_key_metadata.key.nspace); in keystore2_key_id_alias_rebind_verify_by_alias() 146 &key_metadata.key, in keystore2_key_id_alias_rebind_verify_by_alias() 157 &new_key_metadata.key, in keystore2_key_id_alias_rebind_verify_by_alias() 198 nspace: key_metadata.key.nspace, in keystore2_key_id_alias_rebind_verify_by_key_id() 205 assert_eq!(key_metadata.key, key_entry_response.metadata.key); in keystore2_key_id_alias_rebind_verify_by_key_id() [all …]
|
/system/core/libcutils/include/cutils/ |
D | str_parms.h | 31 void str_parms_del(struct str_parms *str_parms, const char *key); 33 int str_parms_add_str(struct str_parms *str_parms, const char *key, 35 int str_parms_add_int(struct str_parms *str_parms, const char *key, int value); 37 int str_parms_add_float(struct str_parms *str_parms, const char *key, 41 int str_parms_has_key(struct str_parms *str_parms, const char *key); 46 int str_parms_get_str(struct str_parms *str_parms, const char *key, 48 int str_parms_get_int(struct str_parms *str_parms, const char *key, 50 int str_parms_get_float(struct str_parms *str_parms, const char *key,
|
D | properties.h | 49 int property_get(const char* key, char* value, const char* default_value); 65 int8_t property_get_bool(const char *key, int8_t default_value); 86 int64_t property_get_int64(const char *key, int64_t default_value); 107 int32_t property_get_int32(const char *key, int32_t default_value); 111 int property_set(const char *key, const char *value); 113 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie); 123 int property_get(const char* key, char* value, const char* default_value) 136 int property_get(const char *key, char *value, const char *default_value) { in property_get() argument 141 return __property_get_real(key, value, default_value); in property_get()
|
/system/core/libcutils/include_outside_system/cutils/ |
D | str_parms.h | 31 void str_parms_del(struct str_parms *str_parms, const char *key); 33 int str_parms_add_str(struct str_parms *str_parms, const char *key, 35 int str_parms_add_int(struct str_parms *str_parms, const char *key, int value); 37 int str_parms_add_float(struct str_parms *str_parms, const char *key, 41 int str_parms_has_key(struct str_parms *str_parms, const char *key); 46 int str_parms_get_str(struct str_parms *str_parms, const char *key, 48 int str_parms_get_int(struct str_parms *str_parms, const char *key, 50 int str_parms_get_float(struct str_parms *str_parms, const char *key,
|
D | properties.h | 49 int property_get(const char* key, char* value, const char* default_value); 65 int8_t property_get_bool(const char *key, int8_t default_value); 86 int64_t property_get_int64(const char *key, int64_t default_value); 107 int32_t property_get_int32(const char *key, int32_t default_value); 111 int property_set(const char *key, const char *value); 113 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie); 123 int property_get(const char* key, char* value, const char* default_value) 136 int property_get(const char *key, char *value, const char *default_value) { in property_get() argument 141 return __property_get_real(key, value, default_value); in property_get()
|
/system/media/radio/src/ |
D | radio_metadata.c | 51 bool is_valid_metadata_key(const radio_metadata_key_t key) in is_valid_metadata_key() argument 53 if (key < RADIO_METADATA_KEY_MIN || key > RADIO_METADATA_KEY_MAX) { in is_valid_metadata_key() 106 const radio_metadata_key_t key, in add_metadata() argument 130 entry->key = key; in add_metadata() 183 radio_metadata_type_t radio_metadata_type_of_key(const radio_metadata_key_t key) in radio_metadata_type_of_key() argument 185 if (!is_valid_metadata_key(key)) { in radio_metadata_type_of_key() 188 return metadata_key_type_table[key - RADIO_METADATA_KEY_MIN]; in radio_metadata_type_of_key() 218 const radio_metadata_key_t key, in radio_metadata_add_int() argument 221 radio_metadata_type_t type = radio_metadata_type_of_key(key); in radio_metadata_add_int() 226 key, type, &value, sizeof(int32_t)); in radio_metadata_add_int() [all …]
|
/system/apex/shim/build/ |
D | Android.bp | 32 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 36 name: "com.android.apex.cts.shim.key", 53 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 57 name: "com.android.apex.cts.shim.debug.key", 81 key: "com.android.apex.cts.shim.key", 94 key: "com.android.apex.cts.shim.key", 108 key: "com.android.apex.cts.shim.debug.key", 120 key: "com.android.apex.cts.shim.key", 132 key: "com.android.apex.cts.shim.key", 147 key: "com.android.apex.cts.shim.key", [all …]
|