org.robolectric.manifest.ContentProviderData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources Show documentation
Show all versions of resources Show documentation
An alternative Android testing framework.
package org.robolectric.manifest;
import java.util.List;
import java.util.Map;
public class ContentProviderData extends PackageItemData {
private static final String READ_PERMISSION = "android:readPermission";
private static final String WRITE_PERMISSION = "android:writePermission";
private static final String GRANT_URI_PERMISSION = "android:grantUriPermissions";
private static final String ENABLED = "android:enabled";
private final String authority;
private final Map attributes;
private final List pathPermissionDatas;
public ContentProviderData(
String className,
MetaData metaData,
String authority,
Map attributes,
List pathPermissionDatas) {
super(className, metaData);
this.authority = authority;
this.attributes = attributes;
this.pathPermissionDatas = pathPermissionDatas;
}
public String getAuthorities() {
return authority;
}
public String getReadPermission() {
return attributes.get(READ_PERMISSION);
}
public String getWritePermission() {
return attributes.get(WRITE_PERMISSION);
}
public List getPathPermissionDatas() {
return pathPermissionDatas;
}
public boolean getGrantUriPermissions() {
return Boolean.parseBoolean(attributes.get(GRANT_URI_PERMISSION));
}
public boolean isEnabled() {
return attributes.containsKey(ENABLED) ? Boolean.parseBoolean(attributes.get(ENABLED)) : true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy