Lines Matching refs:key

49 bool getValue(const android::String16& key, T* out, const map<android::String16, T>& map) {  in getValue()  argument
50 const auto& it = map.find(key); in getValue()
80 #define RETURN_IF_ENTRY_ERASED(map, key) \ argument
82 size_t num_erased = (map).erase(key); \
153 size_t PersistableBundle::erase(const String16& key) { in erase() argument
154 RETURN_IF_ENTRY_ERASED(mBoolMap, key); in erase()
155 RETURN_IF_ENTRY_ERASED(mIntMap, key); in erase()
156 RETURN_IF_ENTRY_ERASED(mLongMap, key); in erase()
157 RETURN_IF_ENTRY_ERASED(mDoubleMap, key); in erase()
158 RETURN_IF_ENTRY_ERASED(mStringMap, key); in erase()
159 RETURN_IF_ENTRY_ERASED(mBoolVectorMap, key); in erase()
160 RETURN_IF_ENTRY_ERASED(mIntVectorMap, key); in erase()
161 RETURN_IF_ENTRY_ERASED(mLongVectorMap, key); in erase()
162 RETURN_IF_ENTRY_ERASED(mDoubleVectorMap, key); in erase()
163 RETURN_IF_ENTRY_ERASED(mStringVectorMap, key); in erase()
164 return mPersistableBundleMap.erase(key); in erase()
167 void PersistableBundle::putBoolean(const String16& key, bool value) { in putBoolean() argument
168 erase(key); in putBoolean()
169 mBoolMap[key] = value; in putBoolean()
172 void PersistableBundle::putInt(const String16& key, int32_t value) { in putInt() argument
173 erase(key); in putInt()
174 mIntMap[key] = value; in putInt()
177 void PersistableBundle::putLong(const String16& key, int64_t value) { in putLong() argument
178 erase(key); in putLong()
179 mLongMap[key] = value; in putLong()
182 void PersistableBundle::putDouble(const String16& key, double value) { in putDouble() argument
183 erase(key); in putDouble()
184 mDoubleMap[key] = value; in putDouble()
187 void PersistableBundle::putString(const String16& key, const String16& value) { in putString() argument
188 erase(key); in putString()
189 mStringMap[key] = value; in putString()
192 void PersistableBundle::putBooleanVector(const String16& key, const vector<bool>& value) { in putBooleanVector() argument
193 erase(key); in putBooleanVector()
194 mBoolVectorMap[key] = value; in putBooleanVector()
197 void PersistableBundle::putIntVector(const String16& key, const vector<int32_t>& value) { in putIntVector() argument
198 erase(key); in putIntVector()
199 mIntVectorMap[key] = value; in putIntVector()
202 void PersistableBundle::putLongVector(const String16& key, const vector<int64_t>& value) { in putLongVector() argument
203 erase(key); in putLongVector()
204 mLongVectorMap[key] = value; in putLongVector()
207 void PersistableBundle::putDoubleVector(const String16& key, const vector<double>& value) { in putDoubleVector() argument
208 erase(key); in putDoubleVector()
209 mDoubleVectorMap[key] = value; in putDoubleVector()
212 void PersistableBundle::putStringVector(const String16& key, const vector<String16>& value) { in putStringVector() argument
213 erase(key); in putStringVector()
214 mStringVectorMap[key] = value; in putStringVector()
217 void PersistableBundle::putPersistableBundle(const String16& key, const PersistableBundle& value) { in putPersistableBundle() argument
218 erase(key); in putPersistableBundle()
219 mPersistableBundleMap[key] = value; in putPersistableBundle()
222 bool PersistableBundle::getBoolean(const String16& key, bool* out) const { in getBoolean() argument
223 return getValue(key, out, mBoolMap); in getBoolean()
226 bool PersistableBundle::getInt(const String16& key, int32_t* out) const { in getInt() argument
227 return getValue(key, out, mIntMap); in getInt()
230 bool PersistableBundle::getLong(const String16& key, int64_t* out) const { in getLong() argument
231 return getValue(key, out, mLongMap); in getLong()
234 bool PersistableBundle::getDouble(const String16& key, double* out) const { in getDouble() argument
235 return getValue(key, out, mDoubleMap); in getDouble()
238 bool PersistableBundle::getString(const String16& key, String16* out) const { in getString() argument
239 return getValue(key, out, mStringMap); in getString()
242 bool PersistableBundle::getBooleanVector(const String16& key, vector<bool>* out) const { in getBooleanVector() argument
243 return getValue(key, out, mBoolVectorMap); in getBooleanVector()
246 bool PersistableBundle::getIntVector(const String16& key, vector<int32_t>* out) const { in getIntVector() argument
247 return getValue(key, out, mIntVectorMap); in getIntVector()
250 bool PersistableBundle::getLongVector(const String16& key, vector<int64_t>* out) const { in getLongVector() argument
251 return getValue(key, out, mLongVectorMap); in getLongVector()
254 bool PersistableBundle::getDoubleVector(const String16& key, vector<double>* out) const { in getDoubleVector() argument
255 return getValue(key, out, mDoubleVectorMap); in getDoubleVector()
258 bool PersistableBundle::getStringVector(const String16& key, vector<String16>* out) const { in getStringVector() argument
259 return getValue(key, out, mStringVectorMap); in getStringVector()
262 bool PersistableBundle::getPersistableBundle(const String16& key, PersistableBundle* out) const { in getPersistableBundle() argument
263 return getValue(key, out, mPersistableBundleMap); in getPersistableBundle()
411 String16 key; in readFromParcelInner() local
413 RETURN_IF_FAILED(parcel->readString16(&key)); in readFromParcelInner()
422 RETURN_IF_FAILED(parcel->readString16(&mStringMap[key])); in readFromParcelInner()
426 RETURN_IF_FAILED(parcel->readInt32(&mIntMap[key])); in readFromParcelInner()
430 RETURN_IF_FAILED(parcel->readInt64(&mLongMap[key])); in readFromParcelInner()
434 RETURN_IF_FAILED(parcel->readDouble(&mDoubleMap[key])); in readFromParcelInner()
438 RETURN_IF_FAILED(parcel->readBool(&mBoolMap[key])); in readFromParcelInner()
442 RETURN_IF_FAILED(parcel->readString16Vector(&mStringVectorMap[key])); in readFromParcelInner()
446 RETURN_IF_FAILED(parcel->readInt32Vector(&mIntVectorMap[key])); in readFromParcelInner()
450 RETURN_IF_FAILED(parcel->readInt64Vector(&mLongVectorMap[key])); in readFromParcelInner()
454 RETURN_IF_FAILED(parcel->readBoolVector(&mBoolVectorMap[key])); in readFromParcelInner()
458 RETURN_IF_FAILED(mPersistableBundleMap[key].readFromParcel(parcel)); in readFromParcelInner()
462 RETURN_IF_FAILED(parcel->readDoubleVector(&mDoubleVectorMap[key])); in readFromParcelInner()