net.dongliu.apk.parser.bean.ApkMeta Maven / Gradle / Ivy
package net.dongliu.apk.parser.bean;
import java.util.ArrayList;
import java.util.List;
/**
* @author dongliu
*/
public class ApkMeta {
private String packageName;
private String label;
private String icon;
private String versionName;
private Long versionCode;
private String installLocation;
private String minSdkVersion;
private String targetSdkVersion;
private String maxSdkVersion;
private GlEsVersion glEsVersion;
private boolean anyDensity;
private boolean smallScreens;
private boolean normalScreens;
private boolean largeScreens;
private List usesPermissions = new ArrayList<>();
private List usesFeatures = new ArrayList<>();
private List permissions = new ArrayList<>();
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getVersionName() {
return versionName;
}
public void setVersionName(String versionName) {
this.versionName = versionName;
}
public Long getVersionCode() {
return versionCode;
}
public void setVersionCode(Long versionCode) {
this.versionCode = versionCode;
}
public String getMinSdkVersion() {
return minSdkVersion;
}
public void setMinSdkVersion(String minSdkVersion) {
this.minSdkVersion = minSdkVersion;
}
public String getTargetSdkVersion() {
return targetSdkVersion;
}
public void setTargetSdkVersion(String targetSdkVersion) {
this.targetSdkVersion = targetSdkVersion;
}
public String getMaxSdkVersion() {
return maxSdkVersion;
}
public void setMaxSdkVersion(String maxSdkVersion) {
this.maxSdkVersion = maxSdkVersion;
}
public List getUsesPermissions() {
return usesPermissions;
}
public void addUsesPermission(String permission) {
this.usesPermissions.add(permission);
}
/**
* the icon file path in apk
*
* @return null if not found
*/
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
/**
* alias for getLabel
*/
public String getName() {
return label;
}
/**
* get the apk's title(name)
*/
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public boolean isAnyDensity() {
return anyDensity;
}
public void setAnyDensity(boolean anyDensity) {
this.anyDensity = anyDensity;
}
public boolean isSmallScreens() {
return smallScreens;
}
public void setSmallScreens(boolean smallScreens) {
this.smallScreens = smallScreens;
}
public boolean isNormalScreens() {
return normalScreens;
}
public void setNormalScreens(boolean normalScreens) {
this.normalScreens = normalScreens;
}
public boolean isLargeScreens() {
return largeScreens;
}
public void setLargeScreens(boolean largeScreens) {
this.largeScreens = largeScreens;
}
public GlEsVersion getGlEsVersion() {
return glEsVersion;
}
public void setGlEsVersion(GlEsVersion glEsVersion) {
this.glEsVersion = glEsVersion;
}
public List getUsesFeatures() {
return usesFeatures;
}
public void addUseFeatures(UseFeature useFeature) {
this.usesFeatures.add(useFeature);
}
public String getInstallLocation() {
return installLocation;
}
public void setInstallLocation(String installLocation) {
this.installLocation = installLocation;
}
public void addPermission(Permission permission) {
this.permissions.add(permission);
}
public List getPermissions() {
return this.permissions;
}
@Override
public String toString() {
return "packageName: \t" + packageName + "\n"
+ "label: \t" + label + "\n"
+ "icon: \t" + icon + "\n"
+ "versionName: \t" + versionName + "\n"
+ "versionCode: \t" + versionCode + "\n"
+ "minSdkVersion: \t" + minSdkVersion + "\n"
+ "targetSdkVersion: \t" + targetSdkVersion + "\n"
+ "maxSdkVersion: \t" + maxSdkVersion;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy