/frameworks/base/libs/androidfw/tests/ |
D | Split_test.cpp | 67 ResTable table; in TEST_F() local 69 table.add(basic_contents_.data(), basic_contents_.size())); in TEST_F() 76 ResTable table; in TEST_F() local 77 table.setParameters(&frenchConfig); in TEST_F() 80 table.add(basic_contents_.data(), basic_contents_.size())); in TEST_F() 87 ssize_t block = table.getResource(R::string::test1, &val, MAY_NOT_BE_BAG, 0, in TEST_F() 105 ResTable table; in TEST_F() local 106 table.setParameters(&expectedConfig); in TEST_F() 109 table.add(basic_contents_.data(), basic_contents_.size())); in TEST_F() 110 ASSERT_EQ(NO_ERROR, table.add(basic_de_fr_contents_.data(), in TEST_F() [all …]
|
D | ResTable_test.cpp | 40 ResTable table; in TEST() local 41 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 49 ResTable table; in TEST() local 50 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 55 table.setParameters(&config); in TEST() 60 table.identifierForName(name.string(), name.size(), nullptr, 0, nullptr, 0, &flags); in TEST() 66 table.getResource(resid, &val, false /*mayBeBag*/, 0u /*density*/, &flags, &selected_config), in TEST() 77 ResTable table; in TEST() local 78 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 80 EXPECT_TRUE(IsStringEqual(table, basic::R::string::test1, "test1")); in TEST() [all …]
|
D | AppAsLib_test.cpp | 34 ResTable table; in TEST() local 35 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 38 ssize_t block = table.getResource(app::R::integer::number1, &val); in TEST() 51 ResTable table; in TEST() local 53 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size(), NULL, 0, -1, in TEST() 57 ssize_t block = table.getResource(lib::R::integer::number1, &val); in TEST() 70 ResTable table; in TEST() local 72 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size(), NULL, 0, -1, in TEST() 76 ssize_t block = table.getResource(lib::R::integer::number1, &val); in TEST()
|
/frameworks/base/tools/aapt2/link/ |
D | ResourceExcluder_test.cpp | 49 std::unique_ptr<ResourceTable> table = in TEST() local 57 ASSERT_TRUE(ResourceExcluder(args).Consume(context.get(), table.get())); in TEST() 58 EXPECT_THAT(table, HasValue("android:string/test", default_config)); in TEST() 59 EXPECT_THAT(table, HasValue("android:string/test", fr_config)); in TEST() 67 std::unique_ptr<ResourceTable> table = in TEST() local 75 ASSERT_TRUE(ResourceExcluder(args).Consume(context.get(), table.get())); in TEST() 76 EXPECT_THAT(table, HasValue("android:string/test", default_config)); in TEST() 77 EXPECT_THAT(table, Not(HasValue("android:string/test", fr_config))); in TEST() 85 std::unique_ptr<ResourceTable> table = in TEST() local 93 ASSERT_TRUE(ResourceExcluder(args).Consume(context.get(), table.get())); in TEST() [all …]
|
D | ProductFilter_test.cpp | 31 ResourceTable table; in TEST() local 32 ASSERT_TRUE(table.AddResource( in TEST() 36 ASSERT_TRUE(table.AddResource( in TEST() 41 ASSERT_TRUE(table.AddResource( in TEST() 45 ASSERT_TRUE(table.AddResource( in TEST() 51 ASSERT_TRUE(filter.Consume(context.get(), &table)); in TEST() 54 &table, "android:string/one", land, "")); in TEST() 56 &table, "android:string/one", land, "tablet")); in TEST() 58 &table, "android:string/one", port, "")); in TEST() 60 &table, "android:string/one", port, "tablet")); in TEST() [all …]
|
D | ReferenceLinker_test.cpp | 29 std::unique_ptr<ResourceTable> table = in TEST() local 49 util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 57 ASSERT_TRUE(linker.Consume(context.get(), table.get())); in TEST() 59 Reference* ref = test::GetValue<Reference>(table.get(), "com.app.test:string/foo"); in TEST() 64 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/bar"); in TEST() 69 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/baz"); in TEST() 76 std::unique_ptr<ResourceTable> table = in TEST() local 91 Style* style = test::GetValue<Style>(table.get(), "com.app.test:style/Theme"); in TEST() 94 util::make_unique<RawString>(table->string_pool.MakeRef("one|two")); in TEST() 120 ASSERT_TRUE(linker.Consume(context.get(), table.get())); in TEST() [all …]
|
D | NoDefaultResourceRemover_test.cpp | 25 std::unique_ptr<ResourceTable> table = in TEST() local 41 ASSERT_TRUE(remover.Consume(context.get(), table.get())); in TEST() 43 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:string/foo"))); in TEST() 44 EXPECT_FALSE(table->FindResource(test::ParseNameOrDie("android:string/bar"))); in TEST() 45 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:string/bat"))); in TEST() 46 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:string/baz"))); in TEST() 51 std::unique_ptr<ResourceTable> table = in TEST() local 66 ASSERT_TRUE(remover.Consume(context.get(), table.get())); in TEST() 68 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:drawable/keep1"))); in TEST() 69 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:drawable/keep2"))); in TEST() [all …]
|
D | PrivateAttributeMover_test.cpp | 26 std::unique_ptr<ResourceTable> table = in TEST() local 39 ASSERT_TRUE(mover.Consume(context.get(), table.get())); in TEST() 41 ResourceTablePackage* package = table->FindPackage("android"); in TEST() 60 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() local 66 ASSERT_TRUE(mover.Consume(context.get(), table.get())); in TEST() 68 ResourceTablePackage* package = table->FindPackage("android"); in TEST() 81 std::unique_ptr<ResourceTable> table = in TEST() local 87 ResourceTablePackage* package = table->FindPackage("android"); in TEST() 93 ASSERT_TRUE(mover.Consume(context.get(), table.get())); in TEST()
|
/frameworks/base/tools/aapt2/ |
D | ResourceTable_test.cpp | 36 ResourceTable table; in TEST() local 38 EXPECT_FALSE(table.AddResource( in TEST() 43 EXPECT_FALSE(table.AddResource( in TEST() 50 ResourceTable table; in TEST() local 52 EXPECT_TRUE(table.AddResourceMangled( in TEST() 58 ResourceTable table; in TEST() local 60 EXPECT_TRUE(table.AddResource( in TEST() 65 EXPECT_THAT(test::GetValue<Id>(&table, "android:attr/id"), NotNull()); in TEST() 69 ResourceTable table; in TEST() local 75 EXPECT_TRUE(table.AddResource( in TEST() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/app/procstats/ |
D | SparseMappingTableTest.java | 45 final SparseMappingTable.Table table = new SparseMappingTable.Table(data); in testParcelingEmpty() local 51 table.writeToParcel(tableParcel); in testParcelingEmpty() 73 final SparseMappingTable.Table table = new SparseMappingTable.Table(data); in testParceling() local 75 key = table.getOrAddKey(ID1, 1); in testParceling() 76 table.setValue(key, VALUE1); in testParceling() 78 key = table.getOrAddKey(ID2, 1); in testParceling() 79 table.setValue(key, VALUE2); in testParceling() 85 table.writeToParcel(tableParcel); in testParceling() 114 final SparseMappingTable.Table table = new SparseMappingTable.Table(data); in testParcelingWithReset() local 116 key = table.getOrAddKey(ID1, 1); in testParcelingWithReset() [all …]
|
/frameworks/base/tools/aapt2/optimize/ |
D | ResourceDeduper_test.cpp | 38 std::unique_ptr<ResourceTable> table = in TEST() local 54 ASSERT_TRUE(ResourceDeduper().Consume(context.get(), table.get())); in TEST() 55 EXPECT_THAT(table, Not(HasValue("android:string/dedupe", ldrtl_config))); in TEST() 56 EXPECT_THAT(table, Not(HasValue("android:string/dedupe", land_config))); in TEST() 58 EXPECT_THAT(table, HasValue("android:string/dedupe2", ldrtl_v21_config)); in TEST() 59 EXPECT_THAT(table, Not(HasValue("android:string/dedupe2", ldrtl_config))); in TEST() 61 EXPECT_THAT(table, HasValue("android:string/dedupe3", default_config)); in TEST() 62 EXPECT_THAT(table, HasValue("android:string/dedupe3", en_config)); in TEST() 63 EXPECT_THAT(table, Not(HasValue("android:string/dedupe3", en_v21_config))); in TEST() 74 std::unique_ptr<ResourceTable> table = in TEST() local [all …]
|
D | VersionCollapser_test.cpp | 40 std::unique_ptr<ResourceTable> table = BuildTableWithConfigs( in TEST() local 45 ASSERT_TRUE(collapser.Consume(context.get(), table.get())); in TEST() 49 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 52 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 57 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 62 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 67 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 70 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 73 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 83 std::unique_ptr<ResourceTable> table = BuildTableWithConfigs( in TEST() local [all …]
|
D | ResourceFilter_test.cpp | 32 std::unique_ptr<ResourceTable> table = in TEST() local 45 ASSERT_TRUE(ResourceFilter(blacklist).Consume(context.get(), table.get())); in TEST() 46 EXPECT_THAT(table, HasValue("android:string/notblacklisted", default_config)); in TEST() 47 EXPECT_THAT(table, HasValue("android:string/notblacklisted2", default_config)); in TEST() 48 EXPECT_THAT(table, Not(HasValue("android:string/blacklisted", default_config))); in TEST() 49 EXPECT_THAT(table, Not(HasValue("android:string/blacklisted2", default_config))); in TEST() 56 std::unique_ptr<ResourceTable> table = in TEST() local 68 ASSERT_TRUE(ResourceFilter(blacklist).Consume(context.get(), table.get())); in TEST() 69 EXPECT_THAT(table, HasValue("android:string/notblacklisted", default_config)); in TEST() 70 EXPECT_THAT(table, HasValue("android:drawable/blacklisted", default_config)); in TEST() [all …]
|
/frameworks/base/tools/aapt2/split/ |
D | TableSplitter_test.cpp | 26 std::unique_ptr<ResourceTable> table = in TEST() local 46 splitter.SplitTable(table.get()); in TEST() 49 table.get(), "android:drawable/icon", in TEST() 52 table.get(), "android:drawable/icon", in TEST() 55 table.get(), "android:drawable/icon", in TEST() 58 table.get(), "android:drawable/icon", in TEST() 60 EXPECT_NE(nullptr, test::GetValue<Id>(table.get(), "android:string/one")); in TEST() 64 std::unique_ptr<ResourceTable> table = in TEST() local 85 splitter.SplitTable(table.get()); in TEST() 90 table.get(), "android:drawable/icon", in TEST() [all …]
|
/frameworks/base/tools/aapt2/compile/ |
D | IdAssigner_test.cpp | 23 ::testing::AssertionResult VerifyIds(ResourceTable* table); 26 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() local 36 ASSERT_TRUE(assigner.Consume(context.get(), table.get())); in TEST() 37 ASSERT_TRUE(VerifyIds(table.get())); in TEST() 41 std::unique_ptr<ResourceTable> table = in TEST() local 59 ASSERT_TRUE(assigner.Consume(context.get(), table.get())); in TEST() 60 ASSERT_TRUE(VerifyIds(table.get())); in TEST() 66 maybe_result = table->FindResource(test::ParseNameOrDie("android:dimen/two")); in TEST() 71 table->FindResource(test::ParseNameOrDie("android:integer/three")); in TEST() 79 table->FindResource(test::ParseNameOrDie("android:string/five")); in TEST() [all …]
|
D | PseudolocaleGenerator_test.cpp | 183 std::unique_ptr<ResourceTable> table = in TEST() local 194 String* val = test::GetValue<String>(table.get(), "android:string/four"); in TEST() 200 ASSERT_TRUE(generator.Consume(context.get(), table.get())); in TEST() 204 test::GetValueForConfig<String>(table.get(), "android:string/one", in TEST() 207 test::GetValueForConfig<String>(table.get(), "android:string/one", in TEST() 212 test::GetValueForConfig<String>(table.get(), "android:string/two", in TEST() 215 test::GetValueForConfig<String>(table.get(), "android:string/two", in TEST() 219 val = test::GetValueForConfig<String>(table.get(), "android:string/three", in TEST() 225 test::GetValueForConfig<String>(table.get(), "android:string/three", in TEST() 230 test::GetValueForConfig<String>(table.get(), "android:string/four", in TEST() [all …]
|
/frameworks/base/tools/aapt2/java/ |
D | JavaClassGenerator_test.cpp | 35 std::unique_ptr<ResourceTable> table = in TEST() local 44 util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 47 JavaClassGenerator generator(context.get(), table.get(), {}); in TEST() 55 std::unique_ptr<ResourceTable> table = in TEST() local 69 .AddSymbolSource(util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 72 JavaClassGenerator generator(context.get(), table.get(), {}); in TEST() 85 std::unique_ptr<ResourceTable> table = in TEST() local 94 .AddSymbolSource(util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 97 JavaClassGenerator generator(context.get(), table.get(), {}); in TEST() 111 std::unique_ptr<ResourceTable> table = in TEST() local [all …]
|
/frameworks/base/tests/utils/testutils/java/com/android/internal/util/test/ |
D | FakeSettingsProvider.java | 81 private Uri getUriFor(String table, String key) { in getUriFor() argument 82 switch (table) { in getUriFor() 90 throw new UnsupportedOperationException("Unknown settings table " + table); in getUriFor() 107 String table = commands[1]; in call() local 113 value = mTables.get(table).get(arg); in call() 117 table, arg, value)); in call() 126 table, arg, value)); in call() 129 mTables.get(table).put(arg, value); in call() 131 mTables.get(table).remove(arg); in call()
|
/frameworks/base/tools/preload/ |
D | sorttable.js | 34 forEach(document.getElementsByTagName('table'), function(table) { argument 35 if (table.className.search(/\bsortable\b/) != -1) { 36 sorttable.makeSortable(table); 42 makeSortable: function(table) { argument 43 if (table.getElementsByTagName('thead').length == 0) { 47 the.appendChild(table.rows[0]); 48 table.insertBefore(the,table.firstChild); 51 if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; 53 if (table.tHead.rows.length != 1) return; // can't cope with two header rows 60 for (var i=0; i<table.rows.length; i++) { [all …]
|
/frameworks/wilhelm/tests/examples/ |
D | xaVideoDecoderCapabilities.cpp | 64 const char *id_to_string(XAuint32 id, const id_to_string_t *table, size_t numEntries) in id_to_string() argument 68 if (id == table[i].id) { in id_to_string() 69 return table[i].string; in id_to_string() 83 const char *id_pair_to_string(XAuint32 id1, XAuint32 id2, const id_pair_to_string_t *table, in id_pair_to_string() argument 88 if (id1 == table[i].id1) { in id_pair_to_string() 89 return id_to_string(id2, table[i].id2_table, table[i].id2_numEntries); in id_pair_to_string() 148 static const id_pair_to_string_t table[] = { in videoProfileToString() local 155 return id_pair_to_string(codec, profile, table, sizeof(table) / sizeof(table[0])); in videoProfileToString() 212 static const id_pair_to_string_t table[] = { in videoLevelToString() local 219 return id_pair_to_string(codec, level, table, sizeof(table) / sizeof(table[0])); in videoLevelToString()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | SelectionBuilder.java | 99 public Cursor query(SQLiteDatabase db, String table, String[] columns, String orderBy) { in query() argument 100 return query(db, table, columns, null, null, orderBy, null); in query() 106 public Cursor query(SQLiteDatabase db, String table, String[] columns, String groupBy, in query() argument 108 return db.query(table, columns, getSelection(), getSelectionArgs(), groupBy, having, in query() 115 public int update(SQLiteDatabase db, String table, ContentValues values) { in update() argument 116 return db.update(table, values, getSelection(), getSelectionArgs()); in update() 122 public int delete(SQLiteDatabase db, String table) { in delete() argument 123 return db.delete(table, getSelection(), getSelectionArgs()); in delete()
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsService.java | 299 List<String> listForUser(IContentProvider provider, int userHandle, String table) { in listForUser() argument 301 if ("system".equals(table)) callListCommand = Settings.CALL_METHOD_LIST_SYSTEM; in listForUser() 302 else if ("secure".equals(table)) callListCommand = Settings.CALL_METHOD_LIST_SECURE; in listForUser() 303 else if ("global".equals(table)) callListCommand = Settings.CALL_METHOD_LIST_GLOBAL; in listForUser() 306 throw new IllegalArgumentException("Invalid table " + table); in listForUser() 323 final String table, final String key) { in getForUser() argument 325 if ("system".equals(table)) callGetCommand = Settings.CALL_METHOD_GET_SYSTEM; in getForUser() 326 else if ("secure".equals(table)) callGetCommand = Settings.CALL_METHOD_GET_SECURE; in getForUser() 327 else if ("global".equals(table)) callGetCommand = Settings.CALL_METHOD_GET_GLOBAL; in getForUser() 330 throw new IllegalArgumentException("Invalid table " + table); in getForUser() [all …]
|
/frameworks/base/tools/aapt2/cmd/ |
D | Dump.cpp | 173 ResourceTable table; in Action() local 175 if (!DeserializeTableFromPb(pb_table, nullptr /*files*/, &table, &error)) { in Action() 183 Debug::PrintTable(table, print_options, printer_); in Action() 223 ResourceTable* table = apk->GetResourceTable(); in Dump() local 224 if (!table) { in Dump() 236 for (auto& package : table->packages) { in Dump() 264 ResourceTable* table = apk->GetResourceTable(); in Dump() local 265 if (!table) { in Dump() 272 StringPool::FlattenUtf8(&buffer, table->string_pool, GetDiagnostics()); in Dump() 286 const auto table = apk->GetResourceTable(); in Dump() local [all …]
|
/frameworks/base/tests/JankBench/scripts/external/ |
D | statistics.py | 296 table = collections.Counter(iter(data)).most_common() 297 if not table: 298 return table 300 maxfreq = table[0][1] 301 for i in range(1, len(table)): 302 if table[i][1] != maxfreq: 303 table = table[:i] 305 return table 469 table = _counts(data) 470 if len(table) == 1: [all …]
|
/frameworks/base/tools/aapt2/format/binary/ |
D | TableFlattener_test.cpp | 45 ResourceTable* table, std::string* out_content) { in Flatten() argument 48 if (!flattener.Consume(context, table)) { in Flatten() 56 ResourceTable* table, ResTable* out_table) { in Flatten() argument 58 auto result = Flatten(context, options, table, &content); in Flatten() 70 ResourceTable* table, ResourceTable* out_table) { in Flatten() argument 72 auto result = Flatten(context, options, table, &content); in Flatten() 85 ::testing::AssertionResult Exists(ResTable* table, const StringPiece& expected_name, in Exists() argument 92 table->setParameters(&expected_config); in Exists() 97 if (table->getResource(expected_id.id, &val, false, 0, &spec_flags, &config) < 0) { in Exists() 120 if (!table->getResourceName(expected_id.id, false, &actual_name)) { in Exists() [all …]
|