blob: ee5c172b154f4785563cfb3e192922969988a97c [file] [log] [blame]
package test.pkg;
import android.graphics.drawable.Drawable;
import android.view.View;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES;
import static android.os.Build.VERSION_CODES.GINGERBREAD;
import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1;
import static android.os.Build.VERSION_CODES.JELLY_BEAN;
@SuppressWarnings({"ConstantConditions", "StatementWithEmptyBody"})
public class VersionConditional2b {
private void gt5(View root, Drawable background) {
if (SDK_INT > GINGERBREAD) {
root.setBackground(background); // Flagged
}
}
private void gt4(View root, Drawable background) {
if (SDK_INT > ICE_CREAM_SANDWICH) {
root.setBackground(background); // Flagged
}
}
private void gt3(View root, Drawable background) {
if (SDK_INT > ICE_CREAM_SANDWICH_MR1) { // => SDK_INT >= JELLY_BEAN
root.setBackground(background); // Not flagged
}
}
private void gt2(View root, Drawable background) {
if (SDK_INT > JELLY_BEAN) {
root.setBackground(background); // Not flagged
}
}
private void gt1(View root, Drawable background) {
if (SDK_INT > VERSION_CODES.JELLY_BEAN_MR1) {
root.setBackground(background); // Not flagged
}
}
private void gte5(View root, Drawable background) {
if (SDK_INT >= GINGERBREAD) {
root.setBackground(background); // Flagged
}
}
private void gte4(View root, Drawable background) {
if (SDK_INT >= ICE_CREAM_SANDWICH) {
root.setBackground(background); // Flagged
}
}
private void gte3(View root, Drawable background) {
if (SDK_INT >= ICE_CREAM_SANDWICH_MR1) {
root.setBackground(background); // Flagged
}
}
private void gte2(View root, Drawable background) {
if (SDK_INT >= JELLY_BEAN) {
root.setBackground(background); // Not flagged
}
}
private void gte1(View root, Drawable background) {
if (SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {
root.setBackground(background); // Not flagged
}
}
private void lt5(View root, Drawable background) {
if (SDK_INT < GINGERBREAD) {
// Other
} else {
root.setBackground(background); // Flagged
}
}
private void lt4(View root, Drawable background) {
if (SDK_INT < ICE_CREAM_SANDWICH) {
// Other
} else {
root.setBackground(background); // Flagged
}
}
private void lt3(View root, Drawable background) {
if (SDK_INT < ICE_CREAM_SANDWICH_MR1) {
// Other
} else {
root.setBackground(background); // Flagged
}
}
private void lt2(View root, Drawable background) {
if (SDK_INT < JELLY_BEAN) {
// Other
} else {
root.setBackground(background); // Not flagged
}
}
private void lt1(View root, Drawable background) {
if (SDK_INT < VERSION_CODES.JELLY_BEAN_MR1) {
// Other
} else {
root.setBackground(background); // Not flagged
}
}
private void lte5(View root, Drawable background) {
if (SDK_INT <= GINGERBREAD) {
// Other
} else {
root.setBackground(background); // Flagged
}
}
private void lte4(View root, Drawable background) {
if (SDK_INT <= ICE_CREAM_SANDWICH) {
// Other
} else {
root.setBackground(background); // Flagged
}
}
private void lte3(View root, Drawable background) {
if (SDK_INT <= ICE_CREAM_SANDWICH_MR1) {
// Other
} else { // => SDK_INT >= JELLY_BEAN
root.setBackground(background); // Not flagged
}
}
private void lte2(View root, Drawable background) {
if (SDK_INT <= JELLY_BEAN) {
// Other
} else {
root.setBackground(background); // Not flagged
}
}
private void lte1(View root, Drawable background) {
if (SDK_INT <= VERSION_CODES.JELLY_BEAN_MR1) {
// Other
} else {
root.setBackground(background); // Not flagged
}
}
private void eq5(View root, Drawable background) {
if (SDK_INT == GINGERBREAD) {
root.setBackground(background); // Flagged
}
}
private void eq4(View root, Drawable background) {
if (SDK_INT == ICE_CREAM_SANDWICH) {
root.setBackground(background); // Flagged
}
}
private void eq3(View root, Drawable background) {
if (SDK_INT == ICE_CREAM_SANDWICH_MR1) {
root.setBackground(background); // Flagged
}
}
private void eq2(View root, Drawable background) {
if (SDK_INT == JELLY_BEAN) {
root.setBackground(background); // Not flagged
}
}
private void eq1(View root, Drawable background) {
if (SDK_INT == VERSION_CODES.JELLY_BEAN_MR1) {
root.setBackground(background); // Not flagged
}
}
}