/system/bt/common/ |
D | lru_unittest.cc | 162 for (int key = 0; key <= 30; key++) { in TEST() local 163 cache.Put(key, key * 100); in TEST() 165 for (int key = 0; key <= 20; key++) { in TEST() local 166 EXPECT_FALSE(cache.HasKey(key)); in TEST() 168 for (int key = 21; key <= 30; key++) { in TEST() local 169 EXPECT_TRUE(cache.HasKey(key)); in TEST() 171 for (int key = 21; key <= 30; key++) { in TEST() local 172 EXPECT_TRUE(cache.Remove(key)); in TEST() 174 for (int key = 21; key <= 30; key++) { in TEST() local 175 EXPECT_FALSE(cache.HasKey(key)); in TEST() [all …]
|
D | metric_id_allocator_unittest.cc | 44 for (size_t key = 0; key < num; key++) { in generateAddresses() local 45 device_map[kthAddress(key)] = key + MetricIdAllocator::kMinId; in generateAddresses() 204 int key = 0; in TEST() local 205 for (key = 0; in TEST() 206 key < static_cast<int>(MetricIdAllocator::kMaxNumPairedDevicesInMemory); in TEST() 207 key++) { in TEST() 208 EXPECT_EQ(allocator.AllocateId(kthAddress(key)), in TEST() 209 key + MetricIdAllocator::kMinId); in TEST() 219 EXPECT_EQ(allocator.AllocateId(kthAddress(key)), id++); in TEST() 224 EXPECT_TRUE(allocator.SaveDevice(kthAddress(key))); in TEST() [all …]
|
/system/update_engine/common/ |
D | fake_prefs.cc | 30 void CheckNotNull(const string& key, void* ptr) { in CheckNotNull() argument 31 EXPECT_NE(nullptr, ptr) << "Called Get*() for key \"" << key in CheckNotNull() 65 bool FakePrefs::GetString(const string& key, string* value) const { in GetString() argument 66 return GetValue(key, value); in GetString() 69 bool FakePrefs::SetString(const string& key, const string& value) { in SetString() argument 70 SetValue(key, value); in SetString() 74 bool FakePrefs::GetInt64(const string& key, int64_t* value) const { in GetInt64() argument 75 return GetValue(key, value); in GetInt64() 78 bool FakePrefs::SetInt64(const string& key, const int64_t value) { in SetInt64() argument 79 SetValue(key, value); in SetInt64() [all …]
|
D | prefs.cc | 52 bool PrefsBase::GetString(const string& key, string* value) const { in GetString() argument 53 return storage_->GetKey(key, value); in GetString() 56 bool PrefsBase::SetString(const string& key, const string& value) { in SetString() argument 57 TEST_AND_RETURN_FALSE(storage_->SetKey(key, value)); in SetString() 58 const auto observers_for_key = observers_.find(key); in SetString() 62 observer->OnPrefSet(key); in SetString() 67 bool PrefsBase::GetInt64(const string& key, int64_t* value) const { in GetInt64() argument 69 if (!GetString(key, &str_value)) in GetInt64() 76 bool PrefsBase::SetInt64(const string& key, const int64_t value) { in SetInt64() argument 77 return SetString(key, base::NumberToString(value)); in SetInt64() [all …]
|
D | prefs.h | 43 virtual bool GetKey(const std::string& key, std::string* value) const = 0; 52 virtual bool SetKey(const std::string& key, const std::string& value) = 0; 55 virtual bool KeyExists(const std::string& key) const = 0; 59 virtual bool DeleteKey(const std::string& key) = 0; 68 bool GetString(const std::string& key, std::string* value) const override; 69 bool SetString(const std::string& key, const std::string& value) override; 70 bool GetInt64(const std::string& key, int64_t* value) const override; 71 bool SetInt64(const std::string& key, const int64_t value) override; 72 bool GetBoolean(const std::string& key, bool* value) const override; 73 bool SetBoolean(const std::string& key, const bool value) override; [all …]
|
D | prefs_interface.h | 40 virtual void OnPrefSet(const std::string& key) = 0; 43 virtual void OnPrefDeleted(const std::string& key) = 0; 51 virtual bool GetString(const std::string& key, std::string* value) const = 0; 55 virtual bool SetString(const std::string& key, const std::string& value) = 0; 60 virtual bool GetInt64(const std::string& key, int64_t* value) const = 0; 64 virtual bool SetInt64(const std::string& key, const int64_t value) = 0; 69 virtual bool GetBoolean(const std::string& key, bool* value) const = 0; 73 virtual bool SetBoolean(const std::string& key, const bool value) = 0; 77 virtual bool Exists(const std::string& key) const = 0; 81 virtual bool Delete(const std::string& key) = 0; [all …]
|
D | mock_prefs.h | 33 bool(const std::string& key, std::string* value)); 35 bool(const std::string& key, const std::string& value)); 36 MOCK_CONST_METHOD2(GetInt64, bool(const std::string& key, int64_t* value)); 37 MOCK_METHOD2(SetInt64, bool(const std::string& key, const int64_t value)); 39 MOCK_CONST_METHOD2(GetBoolean, bool(const std::string& key, bool* value)); 40 MOCK_METHOD2(SetBoolean, bool(const std::string& key, const bool value)); 42 MOCK_CONST_METHOD1(Exists, bool(const std::string& key)); 43 MOCK_METHOD1(Delete, bool(const std::string& key)); 48 MOCK_METHOD2(AddObserver, void(const std::string& key, ObserverInterface*)); 50 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; 55 void AddObserver(const std::string& key, 57 void RemoveObserver(const std::string& key, [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 …]
|
/system/bt/gd/common/ |
D | lru_cache_test.cc | 338 for (int key = 0; key <= 30; key++) { in TEST() local 339 cache.insert_or_assign(key, key * 100); in TEST() 341 for (int key = 0; key <= 20; key++) { in TEST() local 342 EXPECT_FALSE(cache.contains(key)); in TEST() 344 for (int key = 21; key <= 30; key++) { in TEST() local 345 EXPECT_TRUE(cache.contains(key)); in TEST() 347 for (int key = 0; key <= 20; key++) { in TEST() local 348 EXPECT_FALSE(cache.extract(key)); in TEST() 350 for (int key = 21; key <= 30; key++) { in TEST() local 351 auto removed = cache.extract(key); in TEST() [all …]
|
D | list_map_test.cc | 257 for (int key = 0; key <= 30; key++) { in TEST() local 258 list_map.insert_or_assign(key, key * 100); in TEST() 260 for (int key = 0; key <= 30; key++) { in TEST() local 261 EXPECT_TRUE(list_map.contains(key)); in TEST() 263 for (int key = 0; key <= 30; key++) { in TEST() local 264 auto removed = list_map.extract(key); in TEST() 266 EXPECT_EQ(*removed, std::make_pair(key, key * 100)); in TEST() 268 for (int key = 0; key <= 30; key++) { in TEST() local 269 EXPECT_FALSE(list_map.contains(key)); in TEST() 275 for (int key = 0; key < 10; key++) { in TEST() local [all …]
|
D | list_map.h | 101 const_iterator find(const Key& key) const { in find() argument 102 return const_cast<ListMap*>(this)->find(key); in find() 106 iterator find(const Key& key) { in find() argument 107 auto map_iterator = key_map_.find(key); in find() 115 bool contains(const Key& key) const { in contains() argument 116 return find(key) != end(); in contains() 123 std::pair<iterator, bool> try_emplace(const_iterator pos, const Key& key, Args&&... args) { in try_emplace() argument 124 auto map_iterator = key_map_.find(key); in try_emplace() 128 auto list_iterator = node_list_.emplace(pos, key, std::forward<Args>(args)...); in try_emplace() 129 key_map_.emplace(key, list_iterator); in try_emplace() [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/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/bt/btif/src/ |
D | btif_config_cache.cc | 30 bool is_link_key(const std::string& key) { in is_link_key() argument 31 return kLinkKeyTypes.find(key) != kLinkKeyTypes.end(); in is_link_key() 36 if (is_link_key(entry.key)) { in has_link_key_in_section() 91 const std::string& key) { in HasKey() argument 94 return section_iter->Has(key); in HasKey() 100 return section->Has(key); in HasKey() 104 void BtifConfigCache::RemovePersistentSectionsWithKey(const std::string& key) { in RemovePersistentSectionsWithKey() argument 107 if (it->Has(key)) { in RemovePersistentSectionsWithKey() 117 const std::string& key) { in RemoveKey() argument 120 auto entry_iter = section->Find(key); in RemoveKey() [all …]
|
/system/bpf/libbpf_android/ |
D | BpfMapTest.cpp | 83 void writeToMapAndCheck(BpfMap<uint32_t, uint32_t>& map, uint32_t key, uint32_t value) { in writeToMapAndCheck() argument 84 ASSERT_RESULT_OK(map.writeValue(key, value, BPF_ANY)); in writeToMapAndCheck() 86 ASSERT_EQ(0, findMapEntry(map.getMap(), &key, &value_read)); in writeToMapAndCheck() 96 for (uint32_t key = 0; key < total; key++) { in populateMap() local 97 uint32_t value = key * 10; in populateMap() 98 EXPECT_RESULT_OK(map.writeValue(key, value, BPF_ANY)); in populateMap() 123 uint32_t key = TEST_KEY1; in TEST_F() local 125 writeToMapAndCheck(testMap, key, value_write); in TEST_F() 126 Result<uint32_t> value_read = testMap.readValue(key); in TEST_F() 129 checkValueAndStatus(key, key_read); in TEST_F() [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/core/libkeyutils/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/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_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,
|
/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,
|
/system/apex/shim/build/ |
D | Android.bp | 28 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 32 name: "com.android.apex.cts.shim.key", 56 key: "com.android.apex.cts.shim.key", 68 key: "com.android.apex.cts.shim.key", 80 key: "com.android.apex.cts.shim.key", 108 key: "com.android.apex.cts.shim.key", 125 key: "com.android.apex.cts.shim.key", 143 key: "com.android.apex.cts.shim.key", 153 key: "com.android.apex.cts.shim.key", 163 key: "com.android.apex.cts.shim.key", [all …]
|
/system/bt/main/shim/ |
D | config.h | 33 static bool GetInt(const std::string& section, const std::string& key, 35 static bool SetInt(const std::string& section, const std::string& key, 37 static bool GetUint64(const std::string& section, const std::string& key, 39 static bool SetUint64(const std::string& section, const std::string& key, 41 static bool GetStr(const std::string& section, const std::string& key, 44 const std::string& key); 45 static bool SetStr(const std::string& section, const std::string& key, 47 static bool GetBin(const std::string& section, const std::string& key, 50 const std::string& key); 51 static bool SetBin(const std::string& section, const std::string& key, [all …]
|