Lines Matching defs:key
27 // This file contains code to serialize Metadata triples (key, type,
91 bool Metadata::appendBool(int key, bool val)
93 if (!checkKey(key)) {
100 // 4 int32s: size, key, type, value.
102 ok = ok && mData->writeInt32(key) == OK;
111 bool Metadata::appendInt32(int key, int32_t val)
113 if (!checkKey(key)) {
120 // 4 int32s: size, key, type, value.
122 ok = ok && mData->writeInt32(key) == OK;
131 // Check the key (i.e metadata id) is valid if it is a system one.
134 bool Metadata::checkKey(int key)
136 if (key < FIRST_SYSTEM_ID ||
137 (LAST_SYSTEM_ID < key && key < FIRST_CUSTOM_ID)) {
138 ALOGE("Bad key %d", key);
154 if (mData->readInt32() == key) {
155 ALOGE("Key exists already %d", key);