/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/ |
D | ResourceTableFactory.java | 15 PackageResourceTable resourceTable = new PackageResourceTable("android"); in newFrameworkResourceTable() 18 addRClassValues(resourceTable, resourcePath.getRClass()); in newFrameworkResourceTable() 19 addMissingStyleableAttributes(resourceTable, resourcePath.getRClass()); in newFrameworkResourceTable() 22 addRClassValues(resourceTable, resourcePath.getInternalRClass()); in newFrameworkResourceTable() 23 addMissingStyleableAttributes(resourceTable, resourcePath.getInternalRClass()); in newFrameworkResourceTable() 26 parseResourceFiles(resourcePath, resourceTable); in newFrameworkResourceTable() 28 return resourceTable; in newFrameworkResourceTable() 41 PackageResourceTable resourceTable = new PackageResourceTable(packageName); in newResourceTable() 45 addRClassValues(resourceTable, resourcePath.getRClass()); in newResourceTable() 50 parseResourceFiles(resourcePath, resourceTable); in newResourceTable() [all …]
|
D | RoutingResourceTable.java | 18 for (PackageResourceTable resourceTable : resourceTables) { in RoutingResourceTable() 19 this.resourceTables.put(resourceTable.getPackageName(), resourceTable); in RoutingResourceTable() local 57 for (PackageResourceTable resourceTable : resourceTables.values()) { in receive() 58 resourceTable.receive(visitor); in receive() 68 for (PackageResourceTable resourceTable : resourceTables.values()) { in pickFor() 69 if (resourceTable.getPackageIdentifier() == ResourceIds.getPackageIdentifier(resId)) { in pickFor() 70 return resourceTable; in pickFor() 85 PackageResourceTable resourceTable = resourceTables.get(namespace); in pickFor() local 86 if (resourceTable == null) { in pickFor() 87 resourceTable = whichProvidesFor(namespace); in pickFor() [all …]
|
D | RawResourceLoader.java | 12 public void loadTo(PackageResourceTable resourceTable) { in loadTo() argument 13 load(resourceTable, "raw"); in loadTo() 14 load(resourceTable, "drawable"); in loadTo() 17 public void load(PackageResourceTable resourceTable, String folderBaseName) { in load() argument 24 loadRawFiles(resourceTable, folderBaseName, dir); in load() 28 …private void loadRawFiles(PackageResourceTable resourceTable, String resourceType, FsFile rawDir) { in loadRawFiles() argument 41 resourceTable.addResource(resourceType, fileBaseName, in loadRawFiles() 43 new XmlContext(resourceTable.getPackageName(), file, qualifiers))); in loadRawFiles()
|
D | DrawableResourceLoader.java | 9 private final PackageResourceTable resourceTable; field in DrawableResourceLoader 11 DrawableResourceLoader(PackageResourceTable resourceTable) { in DrawableResourceLoader() argument 12 this.resourceTable = resourceTable; in DrawableResourceLoader() 62 XmlContext fakeXmlContext = new XmlContext(resourceTable.getPackageName(), f, qualifiers); in listDrawableResources() 63 …resourceTable.addResource(type, shortName, new FileTypedResource.Image(f, isNinePatch, fakeXmlCont… in listDrawableResources()
|
D | PackageResourceTable.java | 17 private final BiMap<Integer, ResName> resourceTable = HashBiMap.create(); field in PackageResourceTable 39 Integer id = resourceTable.inverse().get(resName); in getResourceId() 44 resourceTable in getResourceId() 53 return resourceTable.get(resourceId); in getResName() 120 ResName existingEntry = resourceTable.put(resId, resName); in addResource() 132 Integer oldId = resourceTable.inverse().get(resNameWithUnderscores); in addResource() 134 resourceTable.forcePut(oldId, resName); in addResource() 137 Integer id = resourceTable.inverse().get(resName); in addResource() 140 ResName existing = resourceTable.put(id, resName); in addResource()
|
D | StaxLoader.java | 8 protected final PackageResourceTable resourceTable; field in StaxLoader 12 public StaxLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxLoader() argument 13 this.resourceTable = resourceTable; in StaxLoader()
|
D | StaxValueLoader.java | 10 public StaxValueLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxValueLoader() argument 11 super(resourceTable, attrType, resType); in StaxValueLoader() 37 resourceTable.addResource(attrType, name, new TypedResource<>(s, resType, xmlContext)); in onEnd()
|
D | StaxArrayLoader.java | 13 …public StaxArrayLoader(PackageResourceTable resourceTable, String attrType, ResType arrayResType, … in StaxArrayLoader() argument 14 super(resourceTable, attrType, arrayResType); in StaxArrayLoader() 48 resourceTable.addResource(attrType, name, new TypedResource<>(items, resType, xmlContext)); in onEnd()
|
D | StaxPluralsLoader.java | 13 …public StaxPluralsLoader(PackageResourceTable resourceTable, String attrType, ResType charSequence… in StaxPluralsLoader() argument 14 super(resourceTable, attrType, charSequence); in StaxPluralsLoader() 49 …resourceTable.addResource(attrType, name, new PluralRules(new ArrayList<>(plurals), resType, xmlCo… in onEnd()
|
D | StaxAttrLoader.java | 13 public StaxAttrLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxAttrLoader() argument 14 super(resourceTable, attrType, resType); in StaxAttrLoader() 58 resourceTable.addResource(attrType, name, new TypedResource<>(attrData, resType, xmlContext)); in onEnd()
|
D | StaxStyleLoader.java | 13 public StaxStyleLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxStyleLoader() argument 14 super(resourceTable, attrType, resType); in StaxStyleLoader() 59 …resourceTable.addResource("style", styleData.getName(), new TypedResource<>(styleData, resType, xm… in onEnd()
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/ |
D | ResourceTableTest.java | 13 private PackageResourceTable resourceTable; field in ResourceTableTest 17 resourceTable = new ResourceTableFactory().newResourceTable("myPackage"); in setUp() 22 resourceTable.addResource(0x02999999, "type", "name"); in getPackageName_shouldReturnPackageNameOfItsResources() 24 assertThat(resourceTable.getPackageName()).isEqualTo("myPackage"); in getPackageName_shouldReturnPackageNameOfItsResources() 29 resourceTable.addResource(0x02999999, "type", "name"); in getPackageIdentifier_shouldReturnPackageIdentiferOfItsResources() 31 assertThat(resourceTable.getPackageIdentifier()).isEqualTo(0x02); in getPackageIdentifier_shouldReturnPackageIdentiferOfItsResources() 36 resourceTable.addResource(0x02999999, "type", "name"); in addResource_shouldPreventMixedPackageIdentifiers() 37 resourceTable.addResource(0x03999999, "type", "name"); in addResource_shouldPreventMixedPackageIdentifiers() 42 resourceTable.addResource(0x02888888, "type", "name"); in shouldForbidIdClashes() 43 resourceTable.addResource(0x02999999, "type", "name"); in shouldForbidIdClashes() [all …]
|
D | ResourceParserTest.java | 15 private ResourceTable resourceTable; field in ResourceParserTest 21 resourceTable = resourceTableFactory.newResourceTable("org.robolectric", testResources()); in setUp() 27 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "rainbow")… in shouldLoadDrawableXmlResources() 36 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "an_image"… in shouldLoadDrawableBitmapResources() 45 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "example_i… in shouldLoadDrawableBitmapResourcesDefinedByItemTag() 54 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "id", "id_declared_in_… in shouldLoadIdResourcesDefinedByItemTag() 65 resourceTable.getValue( in whenIdItemsHaveStringContent_shouldLoadIdResourcesDefinedByItemTag()
|
D | DrawableResourceLoaderNoRunnerTest.java | 38 private PackageResourceTable resourceTable; field in DrawableResourceLoaderNoRunnerTest 42 resourceTable = new ResourceTableFactory().newResourceTable("org.robolectric"); in setUp() 71 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithUnixJarFilePath() 74 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithUnixJarFilePath() 94 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithUnixFilePath() 97 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithUnixFilePath() 117 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithWindowsJarFilePath() 120 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithWindowsJarFilePath() 140 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithWindowsFilePath() 143 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithWindowsFilePath()
|
D | RawResourceLoaderTest.java | 17 private PackageResourceTable resourceTable; field in RawResourceLoaderTest 21 resourceTable = new ResourceTableFactory().newResourceTable("packageName", testResources()); in setUp() 23 rawResourceLoader.loadTo(resourceTable); in setUp() 28 String f = (String) resourceTable.getValue(R.raw.raw_resource, new ResTable_config()).getData(); in shouldReturnRawResourcesWithExtensions() 34 String f = (String) resourceTable.getValue(R.raw.raw_no_ext, new ResTable_config()).getData(); in shouldReturnRawResourcesWithoutExtensions()
|
D | StyleResourceLoaderTest.java | 17 private PackageResourceTable resourceTable; field in StyleResourceLoaderTest 23 resourceTable = new ResourceTableFactory().newResourceTable("android", resourcePath); in setUp() 28 …TypedResource typedResource = resourceTable.getValue(new ResName("android", "style", "Theme_Holo")… in testStyleDataIsLoadedCorrectly()
|
D | ResourceTestUtil.java | 20 static String stringify(ResourceTable resourceTable) { in stringify() argument 22 resourceTable.receive(new ResourceTable.Visitor() { in stringify()
|
/external/robolectric-shadows/resources/src/test/java/org/robolectric/res/ |
D | StaxValueLoaderTest.java | 18 private PackageResourceTable resourceTable; field in StaxValueLoaderTest 24 resourceTable = new PackageResourceTable("pkg"); in setUp() 33 .addHandler("string", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQUENCE)) in ignoresXliffTags() 40 …assertThat(resourceTable.getValue(new ResName("pkg:string/preposition_for_date"), new ResTable_con… in ignoresXliffTags() 47 ….addHandler("item[@type='string']", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQU… in ignoresBTags() 54 …assertThat(resourceTable.getValue(new ResName("pkg:string/sms_short_code_details"), new ResTable_c… in ignoresBTags()
|
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/ |
D | ApkLoader.java | 36 PackageResourceTable resourceTable = appResourceTableCache.get(appManifest); in getAppResourceTable() local 37 if (resourceTable == null) { in getAppResourceTable() 38 resourceTable = new ResourceMerger().buildResourceTable(appManifest); in getAppResourceTable() 40 appResourceTableCache.put(appManifest, resourceTable); in getAppResourceTable() 42 return resourceTable; in getAppResourceTable()
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/ |
D | ShadowLegacyAssetManager.java | 122 private ResourceTable resourceTable; field in ShadowLegacyAssetManager 165 resourceId = resourceTable.getResourceId(resName); in convertAndFill() 180 TypedResource dereferencedRef = resourceTable.getValue(resName, config); in convertAndFill() 241 return resourceTable.getValue(resName, config); in getAttrTypeData() 246 resourceTable = RuntimeEnvironment.getAppResourceTable(); in __constructor__() 257 …resourceTable = isSystem ? RuntimeEnvironment.getSystemResourceTable() : RuntimeEnvironment.getApp… in __constructor__() 283 return resourceTable; in getResourceTable() 316 …Integer resourceId = resourceTable.getResourceId(ResName.qualifyResName(name, defPackage, defType)… in getResourceIdentifier() 358 ResName resName = resourceTable.getResName(ident); in getThemeValue() 486 (FileTypedResource) resourceTable.getValue(resName, config); in openNonAsset() [all …]
|
D | ShadowArscResourcesImpl.java | 112 ResourceTable resourceTable = shadowAssetManager.getResourceTable(); in openRawResource() local 113 InputStream inputStream = resourceTable.getRawValue(id, shadowAssetManager.config); in openRawResource() 147 ResourceTable resourceTable = legacyShadowOf(realResourcesImpl.getAssets()).getResourceTable(); in newNotFoundException() local 148 ResName resName = resourceTable.getResName(id); in newNotFoundException()
|
D | ShadowLegacyResourcesImpl.java | 86 ResourceTable resourceTable = shadowAssetManager.getResourceTable(); in openRawResource() local 87 InputStream inputStream = resourceTable.getRawValue(id, shadowAssetManager.config); in openRawResource() 117 ResourceTable resourceTable = legacyShadowOf(realResourcesImpl.getAssets()).getResourceTable(); in newNotFoundException() local 118 ResName resName = resourceTable.getResName(id); in newNotFoundException()
|
/external/robolectric-shadows/resources/src/main/java/org/robolectric/manifest/ |
D | MetaData.java | 35 public void init(ResourceTable resourceTable, String packageName) throws RoboNotFoundException { in init() argument 45 valueMap.put(entry.getKey(), resourceTable.getResourceId(resName)); in init() 49 TypedResource<?> typedRes = resourceTable.getValue(resName, new ResTable_config()); in init()
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/android/ |
D | XmlResourceParserImpl.java | 56 private final ResourceTable resourceTable; field in XmlResourceParserImpl 67 String applicationPackageName, ResourceTable resourceTable) { in XmlResourceParserImpl() argument 71 this.resourceTable = resourceTable; in XmlResourceParserImpl() 782 Integer resourceId = resourceTable.getResourceId(styleReference); in getResourceId() 791 Integer resourceId = resourceTable.getResourceId(resourceReference); in getResourceId() 799 Integer resourceId = resourceTable.getResourceId(resName); in getResourceId()
|
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/android/ |
D | AttributeSetBuilderImpl.java | 168 private final ResourceTable resourceTable; field in AttributeSetBuilderImpl.LegacyResourceResolver 172 resourceTable = compileTimeResourceTable; in LegacyResourceResolver() 182 return resourceTable.getResName(attrId).getFullyQualifiedName(); in getResourceName() 187 Integer resourceId = resourceTable.getResourceId(new ResName(packageName, type, name)); in getIdentifier() 189 resourceId = resourceTable.getResourceId( in getIdentifier()
|