Searched refs:pool (Results 1 - 25 of 34) sorted by relevance

12

/frameworks/volley/src/test/java/com/android/volley/toolbox/
H A DPoolingByteArrayOutputStreamTest.java28 ByteArrayPool pool = new ByteArrayPool(32768);
29 writeOneBuffer(pool);
30 writeOneBuffer(pool);
31 writeOneBuffer(pool);
35 ByteArrayPool pool = new ByteArrayPool(32768);
36 writeBytesIndividually(pool);
37 writeBytesIndividually(pool);
38 writeBytesIndividually(pool);
42 ByteArrayPool pool = new ByteArrayPool(0);
43 writeOneBuffer(pool);
55 writeOneBuffer(ByteArrayPool pool) argument
66 writeBytesIndividually(ByteArrayPool pool) argument
[all...]
H A DByteArrayPoolTest.java28 ByteArrayPool pool = new ByteArrayPool(32);
30 byte[] buf1 = pool.getBuf(16);
31 byte[] buf2 = pool.getBuf(16);
33 pool.returnBuf(buf1);
34 pool.returnBuf(buf2);
36 byte[] buf3 = pool.getBuf(16);
37 byte[] buf4 = pool.getBuf(16);
44 ByteArrayPool pool = new ByteArrayPool(32);
46 byte[] buf1 = pool.getBuf(16);
47 byte[] buf2 = pool
[all...]
/frameworks/base/tools/aapt2/
H A DStringPool_test.cpp28 StringPool pool; local
30 StringPool::Ref ref = pool.makeRef(u"wut");
35 StringPool pool; local
37 StringPool::Ref ref = pool.makeRef(u"wut");
38 StringPool::Ref ref2 = pool.makeRef(u"hey");
45 StringPool pool; local
47 StringPool::Ref ref = pool.makeRef(u"wut");
48 StringPool::Ref ref2 = pool.makeRef(u"wut");
52 EXPECT_EQ(1u, pool.size());
56 StringPool pool; local
68 StringPool pool; local
82 StringPool pool; local
113 StringPool pool; local
133 StringPool pool; local
155 StringPool pool; local
166 StringPool pool; local
178 StringPool pool; local
[all...]
H A DStringPool.h129 static bool flattenUtf8(BigBuffer* out, const StringPool& pool);
130 static bool flattenUtf16(BigBuffer* out, const StringPool& pool);
136 * Adds a string to the pool, unless it already exists. Returns
137 * a reference to the string in the pool.
142 * Adds a string to the pool, unless it already exists, with a context
143 * object that can be used when sorting the string pool. Returns
144 * a reference to the string in the pool.
149 * Adds a style to the string pool and returns a reference to it.
154 * Adds a style to the string pool with a context object that
155 * can be used when sorting the string pool
213 begin(const StringPool& pool) argument
217 end(const StringPool& pool) argument
[all...]
H A DStringPool.cpp197 void StringPool::merge(StringPool&& pool) { argument
198 mIndexedStrings.insert(pool.mIndexedStrings.begin(), pool.mIndexedStrings.end());
199 pool.mIndexedStrings.clear();
200 std::move(pool.mStrings.begin(), pool.mStrings.end(), std::back_inserter(mStrings));
201 pool.mStrings.clear();
202 std::move(pool.mStyles.begin(), pool.mStyles.end(), std::back_inserter(mStyles));
203 pool
291 flatten(BigBuffer* out, const StringPool& pool, bool utf8) argument
386 flattenUtf8(BigBuffer* out, const StringPool& pool) argument
390 flattenUtf16(BigBuffer* out, const StringPool& pool) argument
[all...]
H A DXmlFlattener.cpp45 XmlFlattener(BigBuffer* outBuffer, StringPool* pool, FlatStringRefList* stringRefs, argument
47 mOut(outBuffer), mPool(pool), mStringRefs(stringRefs),
201 CompileXmlFlattener(BigBuffer* outBuffer, StringPool* pool, FlatStringRefList* stringRefs, argument
203 XmlFlattener(outBuffer, pool, stringRefs, defaultPackage) {
239 LinkedXmlFlattener(BigBuffer* outBuffer, StringPool* pool, argument
246 XmlFlattener(outBuffer, pool, stringRefs, defaultPackage), mResolver(resolver),
466 static void flattenXml(StringPool* pool, FlatStringRefList* stringRefs, BigBuffer* outBuffer, argument
468 // Sort the string pool so that attribute resource IDs show up first.
469 pool->sort([](const StringPool::Entry& a, const StringPool::Entry& b) -> bool {
473 // Now we flatten the string pool reference
510 StringPool pool; local
537 StringPool pool; local
[all...]
H A DManifestValidator.cpp71 const android::ResStringPool* pool = &parser->getStrings(); local
77 pool = mTable.getTableStringBlock(strIdx);
80 if (value.dataType != android::Res_value::TYPE_STRING || !pool) {
83 return util::getString(*pool, value.data);
H A DUtil.h145 inline StringPiece16 getString(const android::ResStringPool& pool, size_t idx) { argument
147 const char16_t* str = pool.stringAt(idx, &len);
H A DResourceParser.cpp756 StringPool& pool = mTable->getValueStringPool(); local
761 pool.makeRef(styleString, StringPool::Context{ 1, mConfig }));
791 pool.makeRef(styleString.str, StringPool::Context{ 1, mConfig }));
797 pool.makeRef(rawValue, StringPool::Context{ 1, mConfig }));
/frameworks/base/libs/androidfw/tests/
H A DTestHelpers.cpp36 const ResStringPool* pool = table.getTableStringBlock(block); local
37 if (pool == NULL) {
38 return ::testing::AssertionFailure() << "table has no string pool for block " << block;
41 const String8 actual = pool->string8ObjectAt(val.data);
H A DIdmap_test.cpp76 const ResStringPool* pool = mTargetTable.getTableStringBlock(block); local
77 ASSERT_TRUE(pool != NULL);
78 ASSERT_LT(val.data, pool->size());
81 const char16_t* targetStr16 = pool->stringAt(val.data, &strLen);
91 pool = mTargetTable.getTableStringBlock(newBlock);
92 ASSERT_TRUE(pool != NULL);
93 ASSERT_LT(val.data, pool->size());
95 targetStr16 = pool->stringAt(val.data, &strLen);
/frameworks/volley/src/main/java/com/android/volley/toolbox/
H A DPoolingByteArrayOutputStream.java23 * A variation of {@link java.io.ByteArrayOutputStream} that uses a pool of byte[] buffers instead
39 public PoolingByteArrayOutputStream(ByteArrayPool pool) { argument
40 this(pool, DEFAULT_SIZE);
51 public PoolingByteArrayOutputStream(ByteArrayPool pool, int size) { argument
52 mPool = pool;
H A DBasicNetwork.java71 // If a pool isn't passed in, then build a small default pool that will give us a lot of
78 * @param pool a buffer pool that improves GC performance in copy operations
80 public BasicNetwork(HttpStack httpStack, ByteArrayPool pool) { argument
82 mPool = pool;
/frameworks/base/media/mca/filterfw/jni/
H A Djni_util.h101 // Return the shared instance to this type's pool.
106 // Delete this type's pool.
111 // Register a new C++ object with the pool. This does not affect the Java
113 // assignments. Pass true to owns if the object pool owns the object.
122 // Return the object in the pool with the specified ID.
140 // object. Pass true to owns if the object pool owns the object.
150 // Remove the object with the given ID from this pool, and delete it. This
213 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
214 return pool ? pool
222 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
236 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
246 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
[all...]
/frameworks/base/tools/aapt/
H A DStringPool.cpp51 void printStringPool(const ResStringPool* pool) argument
53 if (pool->getError() == NO_INIT) {
54 printf("String pool is unitialized.\n");
56 } else if (pool->getError() != NO_ERROR) {
57 printf("String pool is corrupt/invalid.\n");
62 const size_t N = pool->size();
65 if (pool->isUTF8()) {
66 uniqueStrings.add(pool->string8At(i, &len));
68 uniqueStrings.add(pool->stringAt(i, &len));
72 printf("String pool o
[all...]
H A DStringPool.h34 void printStringPool(const ResStringPool* pool);
38 * generating the string pool resource data structure that can be parsed with
91 * Add a new string to the pool. If mergeDuplicates is true, thenif
123 status_t writeStringBlock(const sp<AaptFile>& pool);
126 * Find out an offset in the pool for a particular string. If the string
127 * pool is sorted, this can not be called until after createStringBlock()
130 * multiple times in the pool, the first offset will be returned. Returns
136 * Find all of the offsets in the pool for a particular string. If the
137 * string pool is sorted, this can not be called until after
150 const StringPool& pool; member in class:StringPool::ConfigSorter
[all...]
/frameworks/base/core/java/android/net/
H A DNetworkStats.java841 Entry pool = tunGetPool(tunIfaceTotal, underlyingIfaceTotal);
842 if (pool.isEmpty()) {
845 Entry moved = addTrafficToApplications(tunIface, underlyingIface, tunIfaceTotal, pool);
890 Entry pool = new Entry();
891 pool.rxBytes = Math.min(tunIfaceTotal.rxBytes, underlyingIfaceTotal.rxBytes);
892 pool.rxPackets = Math.min(tunIfaceTotal.rxPackets, underlyingIfaceTotal.rxPackets);
893 pool.txBytes = Math.min(tunIfaceTotal.txBytes, underlyingIfaceTotal.txBytes);
894 pool.txPackets = Math.min(tunIfaceTotal.txPackets, underlyingIfaceTotal.txPackets);
895 pool.operations = Math.min(tunIfaceTotal.operations, underlyingIfaceTotal.operations);
896 return pool;
899 addTrafficToApplications(String tunIface, String underlyingIface, Entry tunIfaceTotal, Entry pool) argument
[all...]
/frameworks/base/tests/CoreTests/android/core/
H A DTestWebServer.java407 Vector pool = threads;
408 synchronized (pool) {
409 if (pool.size() >= workers) {
414 pool.addElement(this);
/frameworks/base/tools/layoutlib/rename_font/
H A Dbuild_font.py93 pool = Pool(processes=None)
94 pool.map(convert_font, input_fonts)
/frameworks/base/core/java/android/os/
H A DParcel.java300 * Retrieve a new Parcel object from the pool.
303 final Parcel[] pool = sOwnedPool;
304 synchronized (pool) {
307 p = pool[i];
309 pool[i] = null;
321 * Put a Parcel object back into the pool. You must not touch
328 final Parcel[] pool;
330 pool = sOwnedPool;
333 pool = sHolderPool;
336 synchronized (pool) {
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteDatabase.java104 // It is ok to hold the lock while reconfiguring the connection pool or dumping
120 // The connection pool for the database, null when closed.
121 // The pool itself is thread-safe, but the reference to it can only be acquired
276 final SQLiteConnectionPool pool;
285 pool = mConnectionPoolLocked;
294 if (pool != null) {
295 pool.close();
363 final SQLiteConnectionPool pool;
366 pool = mConnectionPoolLocked;
368 return new SQLiteSession(pool);
[all...]
H A DSQLiteConnectionPool.java37 * Maintains a pool of active SQLite database connections.
39 * At any given time, a connection is either owned by the pool, or it has been
42 * back to the pool.
44 * The pool holds strong references to the connections it owns. However,
47 * that the connection pool can detect when connections have been improperly
50 * The connection pool is thread-safe (but the connections themselves are not).
76 // and logging a message about the connection pool being busy.
96 // Describes what should happen to an acquired connection when it is returned to the pool.
98 // The connection should be returned to the pool as usual.
142 * The connection pool ca
[all...]
H A DSQLiteConnection.java55 * perform a database operation and are then returned to the pool. At any
158 private SQLiteConnection(SQLiteConnectionPool pool, argument
161 mPool = pool;
185 static SQLiteConnection open(SQLiteConnectionPool pool, argument
188 SQLiteConnection connection = new SQLiteConnection(pool, configuration,
480 * To take advantage of this behavior as an optimization, the connection pool
1222 // Next item in pool.
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
H A DBaseRecyclerViewInstrumentationTest.java243 RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool() {
263 mRecyclerView.setRecycledViewPool(pool);
H A DLinearLayoutManagerTest.java659 final RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool() {
681 pool.setMaxRecycledViews(mTestAdapter.getItemViewType(0), 500);
682 mRecyclerView.setRecycledViewPool(pool);

Completed in 6185 milliseconds

12