CrackMe.apk
Download file
package com.google.android.exoplayer2.upstream;
import android.text.TextUtils;
import com.google.android.exoplayer2.PlaybackException;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.Util;
import com.google.common.base.Ascii;
import com.google.common.base.Predicate;
import java.io.IOException;
import java.io.InterruptedIOException;
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.net.SocketTimeoutException;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface HttpDataSource extends DataSource {
public static final Predicate<String> REJECT_PAYWALL_TYPES = HttpDataSource$$ExternalSyntheticLambda0.INSTANCE;
public interface Factory extends DataSource.Factory {
/* renamed from: com.google.android.exoplayer2.upstream.HttpDataSource$Factory$-CC reason: invalid class name */
public final /* synthetic */ class CC {
}
HttpDataSource createDataSource();
Factory setDefaultRequestProperties(Map<String, String> map);
}
void clearAllRequestProperties();
void clearRequestProperty(String str);
void close() throws HttpDataSourceException;
int getResponseCode();
Map<String, List<String>> getResponseHeaders();
long open(DataSpec dataSpec) throws HttpDataSourceException;
int read(byte[] bArr, int i, int i2) throws HttpDataSourceException;
void setRequestProperty(String str, String str2);
public static final class RequestProperties {
private final Map<String, String> requestProperties = new HashMap();
private Map<String, String> requestPropertiesSnapshot;
public synchronized void set(String str, String str2) {
this.requestPropertiesSnapshot = null;
this.requestProperties.put(str, str2);
}
public synchronized void set(Map<String, String> map) {
this.requestPropertiesSnapshot = null;
this.requestProperties.putAll(map);
}
public synchronized void clearAndSet(Map<String, String> map) {
this.requestPropertiesSnapshot = null;
this.requestProperties.clear();
this.requestProperties.putAll(map);
}
public synchronized void remove(String str) {
this.requestPropertiesSnapshot = null;
this.requestProperties.remove(str);
}
public synchronized void clear() {
this.requestPropertiesSnapshot = null;
this.requestProperties.clear();
}
public synchronized Map<String, String> getSnapshot() {
if (this.requestPropertiesSnapshot == null) {
this.requestPropertiesSnapshot = Collections.unmodifiableMap(new HashMap(this.requestProperties));
}
return this.requestPropertiesSnapshot;
}
}
public static abstract class BaseFactory implements Factory {
private final RequestProperties defaultRequestProperties = new RequestProperties();
/* access modifiers changed from: protected */
public abstract HttpDataSource createDataSourceInternal(RequestProperties requestProperties);
public final HttpDataSource createDataSource() {
return createDataSourceInternal(this.defaultRequestProperties);
}
public final Factory setDefaultRequestProperties(Map<String, String> map) {
this.defaultRequestProperties.clearAndSet(map);
return this;
}
}
/* renamed from: com.google.android.exoplayer2.upstream.HttpDataSource$-CC reason: invalid class name */
public final /* synthetic */ class CC {
static {
Predicate<String> predicate = HttpDataSource.REJECT_PAYWALL_TYPES;
}
public static /* synthetic */ boolean lambda$static$0(String str) {
if (str == null) {
return false;
}
String lowerCase = Ascii.toLowerCase(str);
if (TextUtils.isEmpty(lowerCase)) {
return false;
}
if ((!lowerCase.contains("text") || lowerCase.contains(MimeTypes.TEXT_VTT)) && !lowerCase.contains("html") && !lowerCase.contains("xml")) {
return true;
}
return false;
}
}
public static class HttpDataSourceException extends DataSourceException {
public static final int TYPE_CLOSE = 3;
public static final int TYPE_OPEN = 1;
public static final int TYPE_READ = 2;
public final DataSpec dataSpec;
public final int type;
@Documented
@Target({ElementType.TYPE_USE})
@Retention(RetentionPolicy.SOURCE)
public @interface Type {
}
private static int assignErrorCode(int i, int i2) {
return (i == 2000 && i2 == 1) ? PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED : i;
}
public static HttpDataSourceException createForIOException(IOException iOException, DataSpec dataSpec2, int i) {
int i2;
String message = iOException.getMessage();
if (iOException instanceof SocketTimeoutException) {
i2 = PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT;
} else if (iOException instanceof InterruptedIOException) {
i2 = 1004;
} else {
i2 = (message == null || !Ascii.toLowerCase(message).matches("cleartext.*not permitted.*")) ? PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED : PlaybackException.ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED;
}
if (i2 == 2007) {
return new CleartextNotPermittedException(iOException, dataSpec2);
}
return new HttpDataSourceException(iOException, dataSpec2, i2, i);
}
@Deprecated
public HttpDataSourceException(DataSpec dataSpec2, int i) {
this(dataSpec2, 2000, i);
}
public HttpDataSourceException(DataSpec dataSpec2, int i, int i2) {
super(assignErrorCode(i, i2));
this.dataSpec = dataSpec2;
this.type = i2;
}
@Deprecated
public HttpDataSourceException(String str, DataSpec dataSpec2, int i) {
this(str, dataSpec2, 2000, i);
}
public HttpDataSourceException(String str, DataSpec dataSpec2, int i, int i2) {
super(str, assignErrorCode(i, i2));
this.dataSpec = dataSpec2;
this.type = i2;
}
@Deprecated
public HttpDataSourceException(IOException iOException, DataSpec dataSpec2, int i) {
this(iOException, dataSpec2, 2000, i);
}
public HttpDataSourceException(IOException iOException, DataSpec dataSpec2, int i, int i2) {
super((Throwable) iOException, assignErrorCode(i, i2));
this.dataSpec = dataSpec2;
this.type = i2;
}
@Deprecated
public HttpDataSourceException(String str, IOException iOException, DataSpec dataSpec2, int i) {
this(str, iOException, dataSpec2, 2000, i);
}
public HttpDataSourceException(String str, IOException iOException, DataSpec dataSpec2, int i, int i2) {
super(str, iOException, assignErrorCode(i, i2));
this.dataSpec = dataSpec2;
this.type = i2;
}
}
public static final class CleartextNotPermittedException extends HttpDataSourceException {
public CleartextNotPermittedException(IOException iOException, DataSpec dataSpec) {
super("Cleartext HTTP traffic not permitted. See https://exoplayer.dev/issues/cleartext-not-permitted", iOException, dataSpec, PlaybackException.ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED, 1);
}
}
public static final class InvalidContentTypeException extends HttpDataSourceException {
public final String contentType;
public InvalidContentTypeException(String str, DataSpec dataSpec) {
super("Invalid content type: " + str, dataSpec, (int) PlaybackException.ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE, 1);
this.contentType = str;
}
}
public static final class InvalidResponseCodeException extends HttpDataSourceException {
public final Map<String, List<String>> headerFields;
public final byte[] responseBody;
public final int responseCode;
public final String responseMessage;
@Deprecated
public InvalidResponseCodeException(int i, Map<String, List<String>> map, DataSpec dataSpec) {
this(i, (String) null, (IOException) null, map, dataSpec, Util.EMPTY_BYTE_ARRAY);
}
@Deprecated
public InvalidResponseCodeException(int i, String str, Map<String, List<String>> map, DataSpec dataSpec) {
this(i, str, (IOException) null, map, dataSpec, Util.EMPTY_BYTE_ARRAY);
}
public InvalidResponseCodeException(int i, String str, IOException iOException, Map<String, List<String>> map, DataSpec dataSpec, byte[] bArr) {
super("Response code: " + i, iOException, dataSpec, PlaybackException.ERROR_CODE_IO_BAD_HTTP_STATUS, 1);
this.responseCode = i;
this.responseMessage = str;
this.headerFields = map;
this.responseBody = bArr;
}
}
}
Download file