Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 1 | /* |
| 2 | ** Copyright 2011, The Android Open Source Project |
| 3 | ** |
| 4 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | ** you may not use this file except in compliance with the License. |
| 6 | ** You may obtain a copy of the License at |
| 7 | ** |
| 8 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | ** |
| 10 | ** Unless required by applicable law or agreed to in writing, software |
| 11 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | ** See the License for the specific language governing permissions and |
| 14 | ** limitations under the License. |
| 15 | */ |
| 16 | |
Mathias Agopian | 311b479 | 2017-02-28 15:00:49 -0800 | [diff] [blame] | 17 | #include "egl_cache.h" |
| 18 | |
Mathias Agopian | 39c24a2 | 2013-04-04 23:17:56 -0700 | [diff] [blame] | 19 | #include "../egl_impl.h" |
| 20 | |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 21 | #include "egl_display.h" |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 22 | |
Dan Albert | eacd31f | 2016-02-02 15:08:34 -0800 | [diff] [blame] | 23 | #include <inttypes.h> |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 24 | #include <sys/mman.h> |
| 25 | #include <sys/stat.h> |
Mathias Agopian | 311b479 | 2017-02-28 15:00:49 -0800 | [diff] [blame] | 26 | |
| 27 | #include <utils/Thread.h> |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 28 | |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 29 | // Cache size limits. |
Dan Willemsen | bace39e | 2016-10-11 15:42:59 -0700 | [diff] [blame] | 30 | static const size_t maxKeySize = 12 * 1024; |
| 31 | static const size_t maxValueSize = 64 * 1024; |
| 32 | static const size_t maxTotalSize = 2 * 1024 * 1024; |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 33 | |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 34 | // Cache file header |
| 35 | static const char* cacheFileMagic = "EGL$"; |
| 36 | static const size_t cacheFileHeaderSize = 8; |
| 37 | |
Jamie Gennis | 99c3d70 | 2011-11-08 17:59:36 -0800 | [diff] [blame] | 38 | // The time in seconds to wait before saving newly inserted cache entries. |
| 39 | static const unsigned int deferredSaveDelay = 4; |
| 40 | |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 41 | // ---------------------------------------------------------------------------- |
| 42 | namespace android { |
| 43 | // ---------------------------------------------------------------------------- |
| 44 | |
| 45 | #define BC_EXT_STR "EGL_ANDROID_blob_cache" |
| 46 | |
| 47 | // |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 48 | // Callback functions passed to EGL. |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 49 | // |
Jamie Gennis | c42fcf0 | 2011-11-09 15:35:34 -0800 | [diff] [blame] | 50 | static void setBlob(const void* key, EGLsizeiANDROID keySize, |
| 51 | const void* value, EGLsizeiANDROID valueSize) { |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 52 | egl_cache_t::get()->setBlob(key, keySize, value, valueSize); |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 53 | } |
| 54 | |
Jamie Gennis | c42fcf0 | 2011-11-09 15:35:34 -0800 | [diff] [blame] | 55 | static EGLsizeiANDROID getBlob(const void* key, EGLsizeiANDROID keySize, |
| 56 | void* value, EGLsizeiANDROID valueSize) { |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 57 | return egl_cache_t::get()->getBlob(key, keySize, value, valueSize); |
| 58 | } |
| 59 | |
| 60 | // |
| 61 | // egl_cache_t definition |
| 62 | // |
| 63 | egl_cache_t::egl_cache_t() : |
| 64 | mInitialized(false), |
| 65 | mBlobCache(NULL) { |
| 66 | } |
| 67 | |
| 68 | egl_cache_t::~egl_cache_t() { |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 69 | } |
| 70 | |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 71 | egl_cache_t egl_cache_t::sCache; |
| 72 | |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 73 | egl_cache_t* egl_cache_t::get() { |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 74 | return &sCache; |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | void egl_cache_t::initialize(egl_display_t *display) { |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 78 | Mutex::Autolock lock(mMutex); |
Mathias Agopian | ada798b | 2012-02-13 17:09:30 -0800 | [diff] [blame] | 79 | |
| 80 | egl_connection_t* const cnx = &gEGLImpl; |
| 81 | if (cnx->dso && cnx->major >= 0 && cnx->minor >= 0) { |
| 82 | const char* exts = display->disp.queryString.extensions; |
| 83 | size_t bcExtLen = strlen(BC_EXT_STR); |
| 84 | size_t extsLen = strlen(exts); |
| 85 | bool equal = !strcmp(BC_EXT_STR, exts); |
| 86 | bool atStart = !strncmp(BC_EXT_STR " ", exts, bcExtLen+1); |
| 87 | bool atEnd = (bcExtLen+1) < extsLen && |
| 88 | !strcmp(" " BC_EXT_STR, exts + extsLen - (bcExtLen+1)); |
Mathias Agopian | 311b479 | 2017-02-28 15:00:49 -0800 | [diff] [blame] | 89 | bool inMiddle = strstr(exts, " " BC_EXT_STR " ") != nullptr; |
Mathias Agopian | ada798b | 2012-02-13 17:09:30 -0800 | [diff] [blame] | 90 | if (equal || atStart || atEnd || inMiddle) { |
| 91 | PFNEGLSETBLOBCACHEFUNCSANDROIDPROC eglSetBlobCacheFuncsANDROID; |
| 92 | eglSetBlobCacheFuncsANDROID = |
| 93 | reinterpret_cast<PFNEGLSETBLOBCACHEFUNCSANDROIDPROC>( |
Jamie Gennis | c42fcf0 | 2011-11-09 15:35:34 -0800 | [diff] [blame] | 94 | cnx->egl.eglGetProcAddress( |
| 95 | "eglSetBlobCacheFuncsANDROID")); |
Mathias Agopian | ada798b | 2012-02-13 17:09:30 -0800 | [diff] [blame] | 96 | if (eglSetBlobCacheFuncsANDROID == NULL) { |
| 97 | ALOGE("EGL_ANDROID_blob_cache advertised, " |
| 98 | "but unable to get eglSetBlobCacheFuncsANDROID"); |
| 99 | return; |
| 100 | } |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 101 | |
Mathias Agopian | ada798b | 2012-02-13 17:09:30 -0800 | [diff] [blame] | 102 | eglSetBlobCacheFuncsANDROID(display->disp.dpy, |
| 103 | android::setBlob, android::getBlob); |
| 104 | EGLint err = cnx->egl.eglGetError(); |
| 105 | if (err != EGL_SUCCESS) { |
| 106 | ALOGE("eglSetBlobCacheFuncsANDROID resulted in an error: " |
| 107 | "%#x", err); |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 108 | } |
| 109 | } |
| 110 | } |
Mathias Agopian | ada798b | 2012-02-13 17:09:30 -0800 | [diff] [blame] | 111 | |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 112 | mInitialized = true; |
| 113 | } |
| 114 | |
| 115 | void egl_cache_t::terminate() { |
| 116 | Mutex::Autolock lock(mMutex); |
Jamie Gennis | 5539e21 | 2013-07-30 15:10:02 -0700 | [diff] [blame] | 117 | saveBlobCacheLocked(); |
| 118 | mBlobCache = NULL; |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 119 | } |
| 120 | |
Jamie Gennis | c42fcf0 | 2011-11-09 15:35:34 -0800 | [diff] [blame] | 121 | void egl_cache_t::setBlob(const void* key, EGLsizeiANDROID keySize, |
| 122 | const void* value, EGLsizeiANDROID valueSize) { |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 123 | Mutex::Autolock lock(mMutex); |
| 124 | |
| 125 | if (keySize < 0 || valueSize < 0) { |
Steve Block | 32397c1 | 2012-01-05 23:22:43 +0000 | [diff] [blame] | 126 | ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed"); |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 127 | return; |
| 128 | } |
| 129 | |
| 130 | if (mInitialized) { |
| 131 | sp<BlobCache> bc = getBlobCacheLocked(); |
| 132 | bc->set(key, keySize, value, valueSize); |
Jamie Gennis | 99c3d70 | 2011-11-08 17:59:36 -0800 | [diff] [blame] | 133 | |
| 134 | if (!mSavePending) { |
| 135 | class DeferredSaveThread : public Thread { |
| 136 | public: |
| 137 | DeferredSaveThread() : Thread(false) {} |
| 138 | |
| 139 | virtual bool threadLoop() { |
| 140 | sleep(deferredSaveDelay); |
| 141 | egl_cache_t* c = egl_cache_t::get(); |
| 142 | Mutex::Autolock lock(c->mMutex); |
| 143 | if (c->mInitialized) { |
| 144 | c->saveBlobCacheLocked(); |
| 145 | } |
| 146 | c->mSavePending = false; |
| 147 | return false; |
| 148 | } |
| 149 | }; |
| 150 | |
| 151 | // The thread will hold a strong ref to itself until it has finished |
| 152 | // running, so there's no need to keep a ref around. |
| 153 | sp<Thread> deferredSaveThread(new DeferredSaveThread()); |
| 154 | mSavePending = true; |
Brian Carlstrom | 83b1e68 | 2016-03-12 16:07:59 -0800 | [diff] [blame] | 155 | deferredSaveThread->run("DeferredSaveThread"); |
Jamie Gennis | 99c3d70 | 2011-11-08 17:59:36 -0800 | [diff] [blame] | 156 | } |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 157 | } |
| 158 | } |
| 159 | |
Jamie Gennis | c42fcf0 | 2011-11-09 15:35:34 -0800 | [diff] [blame] | 160 | EGLsizeiANDROID egl_cache_t::getBlob(const void* key, EGLsizeiANDROID keySize, |
| 161 | void* value, EGLsizeiANDROID valueSize) { |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 162 | Mutex::Autolock lock(mMutex); |
| 163 | |
| 164 | if (keySize < 0 || valueSize < 0) { |
Steve Block | 32397c1 | 2012-01-05 23:22:43 +0000 | [diff] [blame] | 165 | ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed"); |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 166 | return 0; |
| 167 | } |
| 168 | |
| 169 | if (mInitialized) { |
| 170 | sp<BlobCache> bc = getBlobCacheLocked(); |
| 171 | return bc->get(key, keySize, value, valueSize); |
| 172 | } |
| 173 | return 0; |
| 174 | } |
| 175 | |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 176 | void egl_cache_t::setCacheFilename(const char* filename) { |
| 177 | Mutex::Autolock lock(mMutex); |
| 178 | mFilename = filename; |
| 179 | } |
| 180 | |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 181 | sp<BlobCache> egl_cache_t::getBlobCacheLocked() { |
| 182 | if (mBlobCache == NULL) { |
| 183 | mBlobCache = new BlobCache(maxKeySize, maxValueSize, maxTotalSize); |
| 184 | loadBlobCacheLocked(); |
| 185 | } |
| 186 | return mBlobCache; |
| 187 | } |
| 188 | |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 189 | static uint32_t crc32c(const uint8_t* buf, size_t len) { |
| 190 | const uint32_t polyBits = 0x82F63B78; |
| 191 | uint32_t r = 0; |
| 192 | for (size_t i = 0; i < len; i++) { |
| 193 | r ^= buf[i]; |
| 194 | for (int j = 0; j < 8; j++) { |
| 195 | if (r & 1) { |
| 196 | r = (r >> 1) ^ polyBits; |
| 197 | } else { |
| 198 | r >>= 1; |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | return r; |
| 203 | } |
| 204 | |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 205 | void egl_cache_t::saveBlobCacheLocked() { |
Jamie Gennis | 5539e21 | 2013-07-30 15:10:02 -0700 | [diff] [blame] | 206 | if (mFilename.length() > 0 && mBlobCache != NULL) { |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 207 | size_t cacheSize = mBlobCache->getFlattenedSize(); |
| 208 | size_t headerSize = cacheFileHeaderSize; |
| 209 | const char* fname = mFilename.string(); |
| 210 | |
| 211 | // Try to create the file with no permissions so we can write it |
| 212 | // without anyone trying to read it. |
| 213 | int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); |
| 214 | if (fd == -1) { |
| 215 | if (errno == EEXIST) { |
| 216 | // The file exists, delete it and try again. |
| 217 | if (unlink(fname) == -1) { |
| 218 | // No point in retrying if the unlink failed. |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 219 | ALOGE("error unlinking cache file %s: %s (%d)", fname, |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 220 | strerror(errno), errno); |
| 221 | return; |
| 222 | } |
| 223 | // Retry now that we've unlinked the file. |
| 224 | fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); |
| 225 | } |
| 226 | if (fd == -1) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 227 | ALOGE("error creating cache file %s: %s (%d)", fname, |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 228 | strerror(errno), errno); |
| 229 | return; |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | size_t fileSize = headerSize + cacheSize; |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 234 | |
vijay gupta | a30cc7d | 2012-06-27 16:14:42 -0700 | [diff] [blame] | 235 | uint8_t* buf = new uint8_t [fileSize]; |
| 236 | if (!buf) { |
| 237 | ALOGE("error allocating buffer for cache contents: %s (%d)", |
| 238 | strerror(errno), errno); |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 239 | close(fd); |
| 240 | unlink(fname); |
| 241 | return; |
| 242 | } |
| 243 | |
Mathias Agopian | e142428 | 2013-07-29 21:24:40 -0700 | [diff] [blame] | 244 | status_t err = mBlobCache->flatten(buf + headerSize, cacheSize); |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 245 | if (err != OK) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 246 | ALOGE("error writing cache contents: %s (%d)", strerror(-err), |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 247 | -err); |
vijay gupta | a30cc7d | 2012-06-27 16:14:42 -0700 | [diff] [blame] | 248 | delete [] buf; |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 249 | close(fd); |
| 250 | unlink(fname); |
| 251 | return; |
| 252 | } |
| 253 | |
| 254 | // Write the file magic and CRC |
| 255 | memcpy(buf, cacheFileMagic, 4); |
| 256 | uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4); |
| 257 | *crc = crc32c(buf + headerSize, cacheSize); |
| 258 | |
vijay gupta | a30cc7d | 2012-06-27 16:14:42 -0700 | [diff] [blame] | 259 | if (write(fd, buf, fileSize) == -1) { |
| 260 | ALOGE("error writing cache file: %s (%d)", strerror(errno), |
| 261 | errno); |
| 262 | delete [] buf; |
| 263 | close(fd); |
| 264 | unlink(fname); |
| 265 | return; |
| 266 | } |
| 267 | |
| 268 | delete [] buf; |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 269 | fchmod(fd, S_IRUSR); |
| 270 | close(fd); |
| 271 | } |
Jamie Gennis | 7660108 | 2011-11-06 14:14:33 -0800 | [diff] [blame] | 272 | } |
| 273 | |
| 274 | void egl_cache_t::loadBlobCacheLocked() { |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 275 | if (mFilename.length() > 0) { |
| 276 | size_t headerSize = cacheFileHeaderSize; |
| 277 | |
| 278 | int fd = open(mFilename.string(), O_RDONLY, 0); |
| 279 | if (fd == -1) { |
| 280 | if (errno != ENOENT) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 281 | ALOGE("error opening cache file %s: %s (%d)", mFilename.string(), |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 282 | strerror(errno), errno); |
| 283 | } |
| 284 | return; |
| 285 | } |
| 286 | |
| 287 | struct stat statBuf; |
| 288 | if (fstat(fd, &statBuf) == -1) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 289 | ALOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno); |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 290 | close(fd); |
| 291 | return; |
| 292 | } |
| 293 | |
| 294 | // Sanity check the size before trying to mmap it. |
| 295 | size_t fileSize = statBuf.st_size; |
| 296 | if (fileSize > maxTotalSize * 2) { |
Dan Albert | eacd31f | 2016-02-02 15:08:34 -0800 | [diff] [blame] | 297 | ALOGE("cache file is too large: %#" PRIx64, |
| 298 | static_cast<off64_t>(statBuf.st_size)); |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 299 | close(fd); |
| 300 | return; |
| 301 | } |
| 302 | |
| 303 | uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize, |
| 304 | PROT_READ, MAP_PRIVATE, fd, 0)); |
| 305 | if (buf == MAP_FAILED) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 306 | ALOGE("error mmaping cache file: %s (%d)", strerror(errno), |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 307 | errno); |
| 308 | close(fd); |
| 309 | return; |
| 310 | } |
| 311 | |
| 312 | // Check the file magic and CRC |
| 313 | size_t cacheSize = fileSize - headerSize; |
| 314 | if (memcmp(buf, cacheFileMagic, 4) != 0) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 315 | ALOGE("cache file has bad mojo"); |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 316 | close(fd); |
| 317 | return; |
| 318 | } |
| 319 | uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4); |
| 320 | if (crc32c(buf + headerSize, cacheSize) != *crc) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 321 | ALOGE("cache file failed CRC check"); |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 322 | close(fd); |
| 323 | return; |
| 324 | } |
| 325 | |
Mathias Agopian | e142428 | 2013-07-29 21:24:40 -0700 | [diff] [blame] | 326 | status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize); |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 327 | if (err != OK) { |
Steve Block | e6f43dd | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 328 | ALOGE("error reading cache contents: %s (%d)", strerror(-err), |
Jamie Gennis | 98c6383 | 2011-11-07 17:03:54 -0800 | [diff] [blame] | 329 | -err); |
| 330 | munmap(buf, fileSize); |
| 331 | close(fd); |
| 332 | return; |
| 333 | } |
| 334 | |
| 335 | munmap(buf, fileSize); |
| 336 | close(fd); |
| 337 | } |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 338 | } |
| 339 | |
| 340 | // ---------------------------------------------------------------------------- |
| 341 | }; // namespace android |
| 342 | // ---------------------------------------------------------------------------- |