CrackMe.apk
Download file
package com.google.android.exoplayer2.text.webvtt;
import android.text.TextUtils;
import com.google.common.base.Ascii;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public final class WebvttCssStyle {
public static final int FONT_SIZE_UNIT_EM = 2;
public static final int FONT_SIZE_UNIT_PERCENT = 3;
public static final int FONT_SIZE_UNIT_PIXEL = 1;
private static final int OFF = 0;
private static final int ON = 1;
public static final int STYLE_BOLD = 1;
public static final int STYLE_BOLD_ITALIC = 3;
public static final int STYLE_ITALIC = 2;
public static final int STYLE_NORMAL = 0;
public static final int UNSPECIFIED = -1;
private int backgroundColor;
private int bold = -1;
private boolean combineUpright = false;
private int fontColor;
private String fontFamily = null;
private float fontSize;
private int fontSizeUnit = -1;
private boolean hasBackgroundColor = false;
private boolean hasFontColor = false;
private int italic = -1;
private int linethrough = -1;
private int rubyPosition = -1;
private Set<String> targetClasses = Collections.emptySet();
private String targetId = "";
private String targetTag = "";
private String targetVoice = "";
private int underline = -1;
@Documented
@Target({ElementType.TYPE_USE})
@Retention(RetentionPolicy.SOURCE)
public @interface FontSizeUnit {
}
@Documented
@Target({ElementType.TYPE_USE})
@Retention(RetentionPolicy.SOURCE)
public @interface StyleFlags {
}
public void setTargetId(String str) {
this.targetId = str;
}
public void setTargetTagName(String str) {
this.targetTag = str;
}
public void setTargetClasses(String[] strArr) {
this.targetClasses = new HashSet(Arrays.asList(strArr));
}
public void setTargetVoice(String str) {
this.targetVoice = str;
}
public int getSpecificityScore(String str, String str2, Set<String> set, String str3) {
if (this.targetId.isEmpty() && this.targetTag.isEmpty() && this.targetClasses.isEmpty() && this.targetVoice.isEmpty()) {
return TextUtils.isEmpty(str2) ? 1 : 0;
}
int updateScoreForMatch = updateScoreForMatch(updateScoreForMatch(updateScoreForMatch(0, this.targetId, str, 1073741824), this.targetTag, str2, 2), this.targetVoice, str3, 4);
if (updateScoreForMatch == -1 || !set.containsAll(this.targetClasses)) {
return 0;
}
return updateScoreForMatch + (this.targetClasses.size() * 4);
}
public int getStyle() {
int i = this.bold;
if (i == -1 && this.italic == -1) {
return -1;
}
int i2 = 0;
int i3 = i == 1 ? 1 : 0;
if (this.italic == 1) {
i2 = 2;
}
return i3 | i2;
}
public boolean isLinethrough() {
return this.linethrough == 1;
}
public WebvttCssStyle setLinethrough(boolean z) {
this.linethrough = z ? 1 : 0;
return this;
}
public boolean isUnderline() {
return this.underline == 1;
}
public WebvttCssStyle setUnderline(boolean z) {
this.underline = z ? 1 : 0;
return this;
}
public WebvttCssStyle setBold(boolean z) {
this.bold = z ? 1 : 0;
return this;
}
public WebvttCssStyle setItalic(boolean z) {
this.italic = z ? 1 : 0;
return this;
}
public String getFontFamily() {
return this.fontFamily;
}
public WebvttCssStyle setFontFamily(String str) {
this.fontFamily = str == null ? null : Ascii.toLowerCase(str);
return this;
}
public int getFontColor() {
if (this.hasFontColor) {
return this.fontColor;
}
throw new IllegalStateException("Font color not defined");
}
public WebvttCssStyle setFontColor(int i) {
this.fontColor = i;
this.hasFontColor = true;
return this;
}
public boolean hasFontColor() {
return this.hasFontColor;
}
public int getBackgroundColor() {
if (this.hasBackgroundColor) {
return this.backgroundColor;
}
throw new IllegalStateException("Background color not defined.");
}
public WebvttCssStyle setBackgroundColor(int i) {
this.backgroundColor = i;
this.hasBackgroundColor = true;
return this;
}
public boolean hasBackgroundColor() {
return this.hasBackgroundColor;
}
public WebvttCssStyle setFontSize(float f) {
this.fontSize = f;
return this;
}
public WebvttCssStyle setFontSizeUnit(int i) {
this.fontSizeUnit = i;
return this;
}
public int getFontSizeUnit() {
return this.fontSizeUnit;
}
public float getFontSize() {
return this.fontSize;
}
public WebvttCssStyle setRubyPosition(int i) {
this.rubyPosition = i;
return this;
}
public int getRubyPosition() {
return this.rubyPosition;
}
public WebvttCssStyle setCombineUpright(boolean z) {
this.combineUpright = z;
return this;
}
public boolean getCombineUpright() {
return this.combineUpright;
}
private static int updateScoreForMatch(int i, String str, String str2, int i2) {
if (str.isEmpty() || i == -1) {
return i;
}
if (str.equals(str2)) {
return i + i2;
}
return -1;
}
}
Download file