Add getters for atomic formula components

Bug: 143697198
Test: N/A
Change-Id: Ic09dc2ab906f8b879d4f4d3fab50107272257230
This commit is contained in:
Khaled Abdelmohsen
2019-11-12 12:24:38 +00:00
parent e4a34f68eb
commit 0a181cd839

View File

@@ -177,6 +177,14 @@ public abstract class AtomicFormula implements Formula {
dest.writeInt(mOperator);
}
public int getValue() {
return mValue;
}
public int getOperator() {
return mOperator;
}
private int getMetadataValueByKey(AppInstallMetadata appInstallMetadata) {
switch (getKey()) {
case VERSION_CODE:
@@ -271,6 +279,10 @@ public abstract class AtomicFormula implements Formula {
dest.writeStringNoHelper(mValue);
}
public String getValue() {
return mValue;
}
private String getMetadataValueByKey(AppInstallMetadata appInstallMetadata) {
switch (getKey()) {
case PACKAGE_NAME:
@@ -367,6 +379,10 @@ public abstract class AtomicFormula implements Formula {
dest.writeByte((byte) (mValue ? 1 : 0));
}
public boolean getValue() {
return mValue;
}
private boolean getMetadataValueByKey(AppInstallMetadata appInstallMetadata) {
switch (getKey()) {
case PRE_INSTALLED: