/system/update_engine/common/ |
D | prefs.cc | 32 bool PrefsBase::GetString(const string& key, string* value) const { in GetString() argument 33 return storage_->GetKey(key, value); in GetString() 36 bool PrefsBase::SetString(const string& key, const string& value) { in SetString() argument 37 TEST_AND_RETURN_FALSE(storage_->SetKey(key, value)); in SetString() 38 const auto observers_for_key = observers_.find(key); in SetString() 42 observer->OnPrefSet(key); in SetString() 47 bool PrefsBase::GetInt64(const string& key, int64_t* value) const { in GetInt64() argument 49 if (!GetString(key, &str_value)) in GetInt64() 56 bool PrefsBase::SetInt64(const string& key, const int64_t value) { in SetInt64() argument 57 return SetString(key, base::Int64ToString(value)); in SetInt64() [all …]
|
D | fake_prefs.cc | 29 void CheckNotNull(const string& key, void* ptr) { in CheckNotNull() argument 30 EXPECT_NE(nullptr, ptr) << "Called Get*() for key \"" << key in CheckNotNull() 64 bool FakePrefs::GetString(const string& key, string* value) const { in GetString() argument 65 return GetValue(key, value); in GetString() 68 bool FakePrefs::SetString(const string& key, const string& value) { in SetString() argument 69 SetValue(key, value); in SetString() 73 bool FakePrefs::GetInt64(const string& key, int64_t* value) const { in GetInt64() argument 74 return GetValue(key, value); in GetInt64() 77 bool FakePrefs::SetInt64(const string& key, const int64_t value) { in SetInt64() argument 78 SetValue(key, value); in SetInt64() [all …]
|
D | prefs.h | 43 virtual bool GetKey(const std::string& key, std::string* value) const = 0; 47 virtual bool SetKey(const std::string& key, const std::string& value) = 0; 50 virtual bool KeyExists(const std::string& key) const = 0; 54 virtual bool DeleteKey(const std::string& key) = 0; 63 bool GetString(const std::string& key, std::string* value) const override; 64 bool SetString(const std::string& key, const std::string& value) override; 65 bool GetInt64(const std::string& key, int64_t* value) const override; 66 bool SetInt64(const std::string& key, const int64_t value) override; 67 bool GetBoolean(const std::string& key, bool* value) const override; 68 bool SetBoolean(const std::string& key, const bool value) override; [all …]
|
D | prefs_interface.h | 39 virtual void OnPrefSet(const std::string& key) = 0; 42 virtual void OnPrefDeleted(const std::string& key) = 0; 50 virtual bool GetString(const std::string& key, std::string* value) const = 0; 54 virtual bool SetString(const std::string& key, const std::string& value) = 0; 59 virtual bool GetInt64(const std::string& key, int64_t* value) const = 0; 63 virtual bool SetInt64(const std::string& key, const int64_t value) = 0; 68 virtual bool GetBoolean(const std::string& key, bool* value) const = 0; 72 virtual bool SetBoolean(const std::string& key, const bool value) = 0; 76 virtual bool Exists(const std::string& key) const = 0; 80 virtual bool Delete(const std::string& key) = 0; [all …]
|
D | mock_prefs.h | 32 bool(const std::string& key, std::string* value)); 34 bool(const std::string& key, const std::string& value)); 35 MOCK_CONST_METHOD2(GetInt64, bool(const std::string& key, int64_t* value)); 36 MOCK_METHOD2(SetInt64, bool(const std::string& key, const int64_t value)); 38 MOCK_CONST_METHOD2(GetBoolean, bool(const std::string& key, bool* value)); 39 MOCK_METHOD2(SetBoolean, bool(const std::string& key, const bool value)); 41 MOCK_CONST_METHOD1(Exists, bool(const std::string& key)); 42 MOCK_METHOD1(Delete, bool(const std::string& key)); 44 MOCK_METHOD2(AddObserver, void(const std::string& key, ObserverInterface*)); 46 void(const std::string& key, ObserverInterface*));
|
D | fake_prefs.h | 42 bool GetString(const std::string& key, std::string* value) const override; 43 bool SetString(const std::string& key, const std::string& value) override; 44 bool GetInt64(const std::string& key, int64_t* value) const override; 45 bool SetInt64(const std::string& key, const int64_t value) override; 46 bool GetBoolean(const std::string& key, bool* value) const override; 47 bool SetBoolean(const std::string& key, const bool value) override; 49 bool Exists(const std::string& key) const override; 50 bool Delete(const std::string& key) override; 52 void AddObserver(const std::string& key, 54 void RemoveObserver(const std::string& key, [all …]
|
/system/libhidl/libhidlcache/ |
D | HidlCache.h | 36 HidlCacheLock(sp<HidlCache> cache, const Key& key) : mCache(cache), mKey(key) { in HidlCacheLock() argument 47 virtual bool lock(const Key& key); 48 virtual sp<Value> unlock(const Key& key); 49 virtual bool flush(const Key& key); 52 virtual sp<Value> fetch(const Key& key); 53 virtual sp<HidlCacheLock> lockGuard(const Key& key) { return new HidlCacheLock(this, key); } in lockGuard() argument 60 virtual sp<Value> fillLocked(const Key& key) = 0; 64 virtual sp<Value> getCachedLocked(const Key& key); 65 bool cached(Key key) const { return mCached.count(key) > 0; } in cached() argument 66 bool locked(Key key) const { return mLocked.count(key) > 0; } in locked() argument [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 | 33 int8_t property_get_bool(const char *key, int8_t default_value) { in property_get_bool() argument 34 if (!key) { in property_get_bool() 41 int len = property_get(key, buf, ""); in property_get_bool() 61 static intmax_t property_get_imax(const char *key, intmax_t lower_bound, intmax_t upper_bound, in property_get_imax() argument 63 if (!key) { in property_get_imax() 71 int len = property_get(key, buf, ""); in property_get_imax() 81 ALOGV("%s(%s,%" PRIdMAX ") - overflow", __FUNCTION__, key, default_value); in property_get_imax() 85 ALOGV("%s(%s,%" PRIdMAX ") - out of range", __FUNCTION__, key, default_value); in property_get_imax() 89 ALOGV("%s(%s,%" PRIdMAX ") - numeric conversion failed", __FUNCTION__, key, in property_get_imax() 99 int64_t property_get_int64(const char *key, int64_t default_value) { in property_get_int64() argument [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 | 54 self.max_key_len = max([len(str(key)) for key, count in self.data]) 55 self.total = sum([count for key, count in self.data]) 78 namer = lambda key: key_names[key] argument 80 namer = lambda key: key argument 82 hist = [(namer(key), count) for key, count in count_dict.items()] 104 for key in key_list: 105 count_dict[key] += 1 111 for key, count in self.data: 117 str(key).ljust(self.max_key_len), 129 return [key for key, _ in self.data]
|
/system/vold/ |
D | KeyUtil.cpp | 38 bool randomKey(KeyBuffer* key) { in randomKey() argument 39 *key = KeyBuffer(FS_AES_256_XTS_KEY_SIZE); in randomKey() 40 if (ReadRandomBytes(key->size(), key->data()) != 0) { in randomKey() 49 static std::string generateKeyRef(const uint8_t* key, int length) { in generateKeyRef() argument 53 SHA512_Update(&c, key, length); in generateKeyRef() 66 static bool fillKey(const KeyBuffer& key, fscrypt_key* fs_key) { in fillKey() argument 67 if (key.size() != FS_AES_256_XTS_KEY_SIZE) { in fillKey() 68 LOG(ERROR) << "Wrong size key " << key.size(); in fillKey() 73 fs_key->size = key.size(); in fillKey() 75 memcpy(fs_key->raw, key.data(), key.size()); in fillKey() [all …]
|
/system/extras/libperfmgr/tests/ |
D | PropertyNodeTest.cc | 50 std::string key = _InitProperty("test.libperfmgr.key"); in TEST() local 51 PropertyNode t("t", key, {{"value0"}, {"value1"}, {"value2"}}, 1, false); in TEST() 52 _VerifyPropertyValue(key, ""); in TEST() 57 std::string key = _InitProperty("test.libperfmgr.key"); in TEST() local 58 PropertyNode t("t", key, {{"value0"}, {"value1"}, {"value2"}}, 1, true); in TEST() 59 _VerifyPropertyValue(key, "value1"); in TEST() 67 std::string key = _InitProperty("test.libperfmgr.key"); in TEST() local 68 PropertyNode t("test_dump", key, {{"value0"}, {"value1"}, {"value2"}}, 1, in TEST() 74 android::base::StringPrintf("test_dump\t%s\t1\tvalue1\n", key.c_str())); in TEST() 83 std::string key = _InitProperty("test.libperfmgr.key"); in TEST() local [all …]
|
/system/nfc/src/adaptation/ |
D | nfc_config.cc | 70 bool NfcConfig::hasKey(const std::string& key) { in hasKey() argument 71 return getInstance().config_.hasKey(key); in hasKey() 74 std::string NfcConfig::getString(const std::string& key) { in getString() argument 75 return getInstance().config_.getString(key); in getString() 78 std::string NfcConfig::getString(const std::string& key, in getString() argument 80 if (hasKey(key)) return getString(key); in getString() 84 unsigned NfcConfig::getUnsigned(const std::string& key) { in getUnsigned() argument 85 return getInstance().config_.getUnsigned(key); in getUnsigned() 88 unsigned NfcConfig::getUnsigned(const std::string& key, in getUnsigned() argument 90 if (hasKey(key)) return getUnsigned(key); in getUnsigned() [all …]
|
/system/bpf/libbpf_android/ |
D | BpfMapTest.cpp | 88 void writeToMapAndCheck(BpfMap<uint32_t, uint32_t>& map, uint32_t key, uint32_t value) { in writeToMapAndCheck() argument 89 ASSERT_TRUE(isOk(map.writeValue(key, value, BPF_ANY))); in writeToMapAndCheck() 91 ASSERT_EQ(0, findMapEntry(map.getMap(), &key, &value_read)); in writeToMapAndCheck() 101 for (uint32_t key = 0; key < total; key++) { in populateMap() local 102 uint32_t value = key * 10; in populateMap() 103 EXPECT_TRUE(isOk(map.writeValue(key, value, BPF_ANY))); in populateMap() 131 uint32_t key = TEST_KEY1; in TEST_F() local 133 writeToMapAndCheck(testMap, key, value_write); in TEST_F() 134 StatusOr<uint32_t> value_read = testMap.readValue(key); in TEST_F() 137 checkValueAndStatus(key, key_read); in TEST_F() [all …]
|
/system/bt/btif/include/ |
D | btif_config.h | 33 bool btif_config_exist(const std::string& section, const std::string& key); 34 bool btif_config_get_int(const std::string& section, const std::string& key, 36 bool btif_config_set_int(const std::string& section, const std::string& key, 38 bool btif_config_get_uint64(const std::string& section, const std::string& key, 40 bool btif_config_set_uint64(const std::string& section, const std::string& key, 42 bool btif_config_get_str(const std::string& section, const std::string& key, 44 bool btif_config_set_str(const std::string& section, const std::string& key, 46 bool btif_config_get_bin(const std::string& section, const std::string& key, 48 bool btif_config_set_bin(const std::string& section, const std::string& key, 50 bool btif_config_remove(const std::string& section, const std::string& key); [all …]
|
/system/bt/osi/src/ |
D | properties.cc | 31 int osi_property_get(const char* key, char* value, const char* default_value) { in osi_property_get() argument 44 return property_get(key, value, default_value); in osi_property_get() 48 int osi_property_set(const char* key, const char* value) { in osi_property_set() argument 52 return property_set(key, value); in osi_property_set() 56 int32_t osi_property_get_int32(const char* key, int32_t default_value) { in osi_property_get_int32() argument 60 return property_get_int32(key, default_value); in osi_property_get_int32() 64 bool osi_property_get_bool(const char* key, bool default_value) { in osi_property_get_bool() argument 68 return property_get_bool(key, default_value); in osi_property_get_bool()
|
/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 | 46 int property_get(const char* key, char* value, const char* default_value); 62 int8_t property_get_bool(const char *key, int8_t default_value); 83 int64_t property_get_int64(const char *key, int64_t default_value); 104 int32_t property_get_int32(const char *key, int32_t default_value); 108 int property_set(const char *key, const char *value); 110 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie); 120 int property_get(const char* key, char* value, const char* default_value) 133 int property_get(const char *key, char *value, const char *default_value) { in property_get() argument 138 return __property_get_real(key, value, default_value); in property_get()
|
/system/core/libcutils/include_vndk/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 | 46 int property_get(const char* key, char* value, const char* default_value); 62 int8_t property_get_bool(const char *key, int8_t default_value); 83 int64_t property_get_int64(const char *key, int64_t default_value); 104 int32_t property_get_int32(const char *key, int32_t default_value); 108 int property_set(const char *key, const char *value); 110 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie); 120 int property_get(const char* key, char* value, const char* default_value) 133 int property_get(const char *key, char *value, const char *default_value) { in property_get() argument 138 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() 105 const radio_metadata_key_t key, in add_metadata() argument 129 entry->key = key; in add_metadata() 182 radio_metadata_type_t radio_metadata_type_of_key(const radio_metadata_key_t key) in radio_metadata_type_of_key() argument 184 if (!is_valid_metadata_key(key)) { in radio_metadata_type_of_key() 187 return metadata_key_type_table[key - RADIO_METADATA_KEY_MIN]; in radio_metadata_type_of_key() 216 const radio_metadata_key_t key, in radio_metadata_add_int() argument 219 radio_metadata_type_t type = radio_metadata_type_of_key(key); in radio_metadata_add_int() 224 key, type, &value, sizeof(int32_t)); in radio_metadata_add_int() [all …]
|
/system/core/libutils/include/utils/ |
D | KeyedVector.h | 69 const VALUE& valueFor(const KEY& key) const; 72 ssize_t indexOfKey(const KEY& key) const; 79 VALUE& editValueFor(const KEY& key); 86 ssize_t add(const KEY& key, const VALUE& item); 87 ssize_t replaceValueFor(const KEY& key, const VALUE& item); 94 ssize_t removeItem(const KEY& key); 112 const VALUE& valueFor(const KEY& key) const; 131 ssize_t KeyedVector<KEY,VALUE>::indexOfKey(const KEY& key) const { in indexOfKey() argument 132 return mVector.indexOf( key_value_pair_t<KEY,VALUE>(key) ); in indexOfKey() 136 const VALUE& KeyedVector<KEY,VALUE>::valueFor(const KEY& key) const { in valueFor() argument [all …]
|
/system/nfc/utils/ |
D | config.cc | 105 void ConfigFile::addConfig(const std::string& key, ConfigValue& value) { in addConfig() argument 106 CHECK(!hasKey(key)); in addConfig() 107 values_.emplace(key, value); in addConfig() 130 string key(Trim(line.substr(0, search))); in parseFromString() local 136 addConfig(key, value); in parseFromString() 138 LOG(INFO) << "ConfigFile - [" << key << "] = " << value_string; in parseFromString() 142 bool ConfigFile::hasKey(const std::string& key) { in hasKey() argument 143 return values_.count(key) != 0; in hasKey() 146 ConfigValue& ConfigFile::getValue(const std::string& key) { in getValue() argument 147 auto search = values_.find(key); in getValue() [all …]
|