正在查看: Kaspi.kz v5.85.1 应用的 setItfMinCodeLength.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kaspi.kz v5.85.1 应用的 setItfMinCodeLength.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package o;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.pm.ProviderInfo;
import android.content.res.XmlResourceParser;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.text.TextUtils;
import android.webkit.MimeTypeMap;
import androidx.annotation.Nullable;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.xmlpull.v1.XmlPullParserException;
public class setItfMinCodeLength extends ContentProvider {
private static final String AudioAttributesCompatParcelizer = "files-path";
private static final String AudioAttributesImplApi26Parcelizer = "external-media-path";
private static final String IconCompatParcelizer = "android.support.FILE_PROVIDER_PATHS";
private static final String MediaBrowserCompatCustomActionResultReceiver = "root-path";
private static final String RemoteActionCompatParcelizer = "external-files-path";
private static final String read = "external-path";
private static final String setElement = "external-cache-path";
private static final String setError = "displayName";
private static final String setFieldValue = "name";
private static final String setOptions = "path";
private static final String write = "cache-path";
private String AudioAttributesImplApi21Parcelizer;
private setLabel MediaBrowserCompatMediaItem;
private final int MediaBrowserCompatSearchResultReceiver;
private final Object MediaDescriptionCompat;
private static final String[] setLabel = {"_display_name", "_size"};
private static final File setBackground = new File("/");
private static final HashMap<String, setLabel> AudioAttributesImplBaseParcelizer = new HashMap<>();
interface setLabel {
Uri setLabel(File file);
File setLabel(Uri uri);
}
@Override
public boolean onCreate() {
return true;
}
public setItfMinCodeLength() {
this(0);
}
protected setItfMinCodeLength(@setPrompt int i) {
this.MediaDescriptionCompat = new Object();
this.MediaBrowserCompatSearchResultReceiver = i;
}
@Override
public void attachInfo(@androidx.annotation.NonNull Context context, @androidx.annotation.NonNull ProviderInfo providerInfo) {
super.attachInfo(context, providerInfo);
if (providerInfo.exported) {
throw new SecurityException("Provider must not be exported");
}
if (!providerInfo.grantUriPermissions) {
throw new SecurityException("Provider must grant uri permissions");
}
String str = providerInfo.authority.split(";")[0];
synchronized (this.MediaDescriptionCompat) {
this.AudioAttributesImplApi21Parcelizer = str;
}
HashMap<String, setLabel> hashMap = AudioAttributesImplBaseParcelizer;
synchronized (hashMap) {
hashMap.remove(str);
}
}
public static Uri setError(@androidx.annotation.NonNull Context context, @androidx.annotation.NonNull String str, @androidx.annotation.NonNull File file) {
return setLabel(context, str, 0).setLabel(file);
}
public static Uri setLabel(@androidx.annotation.NonNull Context context, @androidx.annotation.NonNull String str, @androidx.annotation.NonNull File file, @androidx.annotation.NonNull String str2) {
return setError(context, str, file).buildUpon().appendQueryParameter(setError, str2).build();
}
@Override
public Cursor query(@androidx.annotation.NonNull Uri uri, @Nullable String[] strArr, @Nullable String str, @Nullable String[] strArr2, @Nullable String str2) {
int i;
File label = setError().setLabel(uri);
String queryParameter = uri.getQueryParameter(setError);
if (strArr == null) {
strArr = setLabel;
}
String[] strArr3 = new String[strArr.length];
Object[] objArr = new Object[strArr.length];
int i2 = 0;
for (String str3 : strArr) {
if ("_display_name".equals(str3)) {
strArr3[i2] = "_display_name";
i = i2 + 1;
objArr[i2] = queryParameter == null ? label.getName() : queryParameter;
} else if ("_size".equals(str3)) {
strArr3[i2] = "_size";
i = i2 + 1;
objArr[i2] = Long.valueOf(label.length());
}
i2 = i;
}
String[] error = setError(strArr3, i2);
Object[] label2 = setLabel(objArr, i2);
MatrixCursor matrixCursor = new MatrixCursor(error, 1);
matrixCursor.addRow(label2);
return matrixCursor;
}
@Override
public String getType(@androidx.annotation.NonNull Uri uri) {
File label = setError().setLabel(uri);
int lastIndexOf = label.getName().lastIndexOf(46);
if (lastIndexOf >= 0) {
String mimeTypeFromExtension = MimeTypeMap.getSingleton().getMimeTypeFromExtension(label.getName().substring(lastIndexOf + 1));
return mimeTypeFromExtension != null ? mimeTypeFromExtension : "application/octet-stream";
}
return "application/octet-stream";
}
@Override
public String getTypeAnonymous(@androidx.annotation.NonNull Uri uri) {
return "application/octet-stream";
}
@Override
public Uri insert(@androidx.annotation.NonNull Uri uri, @androidx.annotation.NonNull ContentValues contentValues) {
throw new UnsupportedOperationException("No external inserts");
}
@Override
public int update(@androidx.annotation.NonNull Uri uri, @androidx.annotation.NonNull ContentValues contentValues, @Nullable String str, @Nullable String[] strArr) {
throw new UnsupportedOperationException("No external updates");
}
@Override
public int delete(@androidx.annotation.NonNull Uri uri, @Nullable String str, @Nullable String[] strArr) {
return setError().setLabel(uri).delete() ? 1 : 0;
}
@Override
public ParcelFileDescriptor openFile(@androidx.annotation.NonNull Uri uri, @androidx.annotation.NonNull String str) throws FileNotFoundException {
return ParcelFileDescriptor.open(setError().setLabel(uri), setError(str));
}
private setLabel setError() {
setLabel setlabel;
synchronized (this.MediaDescriptionCompat) {
setChipEndPaddingResource.setBackground(this.AudioAttributesImplApi21Parcelizer, "mAuthority is null. Did you override attachInfo and did not call super.attachInfo()?");
if (this.MediaBrowserCompatMediaItem == null) {
this.MediaBrowserCompatMediaItem = setLabel(getContext(), this.AudioAttributesImplApi21Parcelizer, this.MediaBrowserCompatSearchResultReceiver);
}
setlabel = this.MediaBrowserCompatMediaItem;
}
return setlabel;
}
private static setLabel setLabel(Context context, String str, int i) {
setLabel setlabel;
HashMap<String, setLabel> hashMap = AudioAttributesImplBaseParcelizer;
synchronized (hashMap) {
setlabel = hashMap.get(str);
if (setlabel == null) {
try {
try {
setlabel = setFieldValue(context, str, i);
hashMap.put(str, setlabel);
} catch (XmlPullParserException e) {
throw new IllegalArgumentException("Failed to parse android.support.FILE_PROVIDER_PATHS meta-data", e);
}
} catch (IOException e2) {
throw new IllegalArgumentException("Failed to parse android.support.FILE_PROVIDER_PATHS meta-data", e2);
}
}
}
return setlabel;
}
static XmlResourceParser setFieldValue(Context context, String str, @Nullable ProviderInfo providerInfo, int i) {
if (providerInfo == null) {
throw new IllegalArgumentException("Couldn't find meta-data for provider with authority " + str);
}
if (providerInfo.metaData == null && i != 0) {
Bundle bundle = new Bundle(1);
providerInfo.metaData = bundle;
bundle.putInt(IconCompatParcelizer, i);
}
XmlResourceParser loadXmlMetaData = providerInfo.loadXmlMetaData(context.getPackageManager(), IconCompatParcelizer);
if (loadXmlMetaData != null) {
return loadXmlMetaData;
}
throw new IllegalArgumentException("Missing android.support.FILE_PROVIDER_PATHS meta-data");
}
private static setLabel setFieldValue(Context context, String str, int i) throws IOException, XmlPullParserException {
setError seterror = new setError(str);
XmlResourceParser fieldValue = setFieldValue(context, str, context.getPackageManager().resolveContentProvider(str, 128), i);
while (true) {
int next = fieldValue.next();
if (next == 1) {
return seterror;
}
if (next == 2) {
String name = fieldValue.getName();
File file = null;
String attributeValue = fieldValue.getAttributeValue(null, setFieldValue);
String attributeValue2 = fieldValue.getAttributeValue(null, setOptions);
if (MediaBrowserCompatCustomActionResultReceiver.equals(name)) {
file = setBackground;
} else if (AudioAttributesCompatParcelizer.equals(name)) {
file = context.getFilesDir();
} else if (write.equals(name)) {
file = context.getCacheDir();
} else if (read.equals(name)) {
file = Environment.getExternalStorageDirectory();
} else if (RemoteActionCompatParcelizer.equals(name)) {
File[] externalFilesDirs = setCode39UseCheckDigit.getExternalFilesDirs(context, null);
if (externalFilesDirs.length > 0) {
file = externalFilesDirs[0];
}
} else if (setElement.equals(name)) {
File[] externalCacheDirs = setCode39UseCheckDigit.getExternalCacheDirs(context);
if (externalCacheDirs.length > 0) {
file = externalCacheDirs[0];
}
} else if (AudioAttributesImplApi26Parcelizer.equals(name)) {
File[] error = setBackground.setError(context);
if (error.length > 0) {
file = error[0];
}
}
if (file != null) {
seterror.setBackground(attributeValue, setError(file, attributeValue2));
}
}
}
}
static class setError implements setLabel {
private final HashMap<String, File> setBackground = new HashMap<>();
private final String setLabel;
setError(String str) {
this.setLabel = str;
}
void setBackground(String str, File file) {
if (TextUtils.isEmpty(str)) {
throw new IllegalArgumentException("Name must not be empty");
}
try {
this.setBackground.put(str, file.getCanonicalFile());
} catch (IOException e) {
throw new IllegalArgumentException("Failed to resolve canonical path for " + file, e);
}
}
@Override
public Uri setLabel(File file) {
String substring;
try {
String canonicalPath = file.getCanonicalPath();
Map.Entry<String, File> entry = null;
for (Map.Entry<String, File> entry2 : this.setBackground.entrySet()) {
String path = entry2.getValue().getPath();
if (setOptions(canonicalPath, path) && (entry == null || path.length() > entry.getValue().getPath().length())) {
entry = entry2;
}
}
if (entry == null) {
throw new IllegalArgumentException("Failed to find configured root that contains " + canonicalPath);
}
String path2 = entry.getValue().getPath();
if (path2.endsWith("/")) {
substring = canonicalPath.substring(path2.length());
} else {
substring = canonicalPath.substring(path2.length() + 1);
}
return new Uri.Builder().scheme("content").authority(this.setLabel).encodedPath(Uri.encode(entry.getKey()) + '/' + Uri.encode(substring, "/")).build();
} catch (IOException unused) {
throw new IllegalArgumentException("Failed to resolve canonical path for " + file);
}
}
@Override
public File setLabel(Uri uri) {
String encodedPath = uri.getEncodedPath();
int indexOf = encodedPath.indexOf(47, 1);
String decode = Uri.decode(encodedPath.substring(1, indexOf));
String decode2 = Uri.decode(encodedPath.substring(indexOf + 1));
File file = this.setBackground.get(decode);
if (file == null) {
throw new IllegalArgumentException("Unable to find configured root for " + uri);
}
File file2 = new File(file, decode2);
try {
File canonicalFile = file2.getCanonicalFile();
if (setOptions(canonicalFile.getPath(), file.getPath())) {
return canonicalFile;
}
throw new SecurityException("Resolved path jumped beyond configured root");
} catch (IOException unused) {
throw new IllegalArgumentException("Failed to resolve canonical path for " + file2);
}
}
private boolean setOptions(@androidx.annotation.NonNull String str, @androidx.annotation.NonNull String str2) {
String label = setItfMinCodeLength.setLabel(str);
String label2 = setItfMinCodeLength.setLabel(str2);
if (!label.equals(label2)) {
if (!label.startsWith(label2 + '/')) {
return false;
}
}
return true;
}
}
private static int setError(String str) {
if ("r".equals(str)) {
return 268435456;
}
if ("w".equals(str) || "wt".equals(str)) {
return 738197504;
}
if ("wa".equals(str)) {
return 704643072;
}
if ("rw".equals(str)) {
return 939524096;
}
if ("rwt".equals(str)) {
return 1006632960;
}
throw new IllegalArgumentException("Invalid mode: " + str);
}
private static File setError(File file, String... strArr) {
for (String str : strArr) {
if (str != null) {
file = new File(file, str);
}
}
return file;
}
private static String[] setError(String[] strArr, int i) {
String[] strArr2 = new String[i];
System.arraycopy(strArr, 0, strArr2, 0, i);
return strArr2;
}
private static Object[] setLabel(Object[] objArr, int i) {
Object[] objArr2 = new Object[i];
System.arraycopy(objArr, 0, objArr2, 0, i);
return objArr2;
}
public static String setLabel(@androidx.annotation.NonNull String str) {
return (str.length() <= 0 || str.charAt(str.length() + (-1)) != '/') ? str : str.substring(0, str.length() - 1);
}
static class setBackground {
private setBackground() {
}
static File[] setError(Context context) {
return context.getExternalMediaDirs();
}
}
}