正在查看: FinLeap Cash v1.0.5 应用的 FacebookContentProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FinLeap Cash v1.0.5 应用的 FacebookContentProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.facebook;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import android.util.Pair;
import com.facebook.internal.NativeAppCallAttachmentStore;
import com.facebook.share.internal.ShareConstants;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.UUID;
import kotlin.Metadata;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import kotlin.text.StringsKt;
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u0000 \u001f2\u00020\u0001:\u0001\u001fB\u0005¢\u0006\u0002\u0010\u0002J/\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\b2\u000e\u0010\t\u001a\n\u0012\u0004\u0012\u00020\b\u0018\u00010\nH\u0016¢\u0006\u0002\u0010\u000bJ\u0012\u0010\f\u001a\u0004\u0018\u00010\b2\u0006\u0010\u0005\u001a\u00020\u0006H\u0016J\u001c\u0010\r\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0016J\b\u0010\u0010\u001a\u00020\u0011H\u0016J\u001a\u0010\u0012\u001a\u0004\u0018\u00010\u00132\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\bH\u0016J\u001e\u0010\u0015\u001a\u0010\u0012\u0004\u0012\u00020\u0017\u0012\u0004\u0012\u00020\b\u0018\u00010\u00162\u0006\u0010\u0005\u001a\u00020\u0006H\u0002JK\u0010\u0018\u001a\u0004\u0018\u00010\u00192\u0006\u0010\u0005\u001a\u00020\u00062\u000e\u0010\t\u001a\n\u0012\u0004\u0012\u00020\b\u0018\u00010\n2\b\u0010\u0007\u001a\u0004\u0018\u00010\b2\u000e\u0010\u001a\u001a\n\u0012\u0004\u0012\u00020\b\u0018\u00010\n2\b\u0010\u001b\u001a\u0004\u0018\u00010\bH\u0016¢\u0006\u0002\u0010\u001cJ9\u0010\u001d\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\b\u0010\u0007\u001a\u0004\u0018\u00010\b2\u000e\u0010\t\u001a\n\u0012\u0004\u0012\u00020\b\u0018\u00010\nH\u0016¢\u0006\u0002\u0010\u001e¨\u0006 "}, d2 = {"Lcom/facebook/FacebookContentProvider;", "Landroid/content/ContentProvider;", "()V", "delete", "", ShareConstants.MEDIA_URI, "Landroid/net/Uri;", "s", "", "strings", "", "(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I", "getType", "insert", "contentValues", "Landroid/content/ContentValues;", "onCreate", "", "openFile", "Landroid/os/ParcelFileDescriptor;", "mode", "parseCallIdAndAttachmentName", "Landroid/util/Pair;", "Ljava/util/UUID;", "query", "Landroid/database/Cursor;", "strings2", "s2", "(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;", "update", "(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "Companion", "facebook-core_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class FacebookContentProvider extends ContentProvider {
private static final String ATTACHMENT_URL_BASE = "content://com.facebook.app.FacebookContentProvider";
private static final String INVALID_FILE_NAME = "..";
public static final Companion INSTANCE = new Companion(null);
private static final String TAG = FacebookContentProvider.class.getName();
@JvmStatic
public static final String getAttachmentUrl(String str, UUID uuid, String str2) {
return INSTANCE.getAttachmentUrl(str, uuid, str2);
}
@Override
public int delete(Uri uri, String s, String[] strings) {
Intrinsics.checkNotNullParameter(uri, ShareConstants.MEDIA_URI);
return 0;
}
@Override
public String getType(Uri uri) {
Intrinsics.checkNotNullParameter(uri, ShareConstants.MEDIA_URI);
return null;
}
@Override
public Uri insert(Uri uri, ContentValues contentValues) {
Intrinsics.checkNotNullParameter(uri, ShareConstants.MEDIA_URI);
return null;
}
@Override
public boolean onCreate() {
return true;
}
@Override
public Cursor query(Uri uri, String[] strings, String s, String[] strings2, String s2) {
Intrinsics.checkNotNullParameter(uri, ShareConstants.MEDIA_URI);
return null;
}
@Override
public int update(Uri uri, ContentValues contentValues, String s, String[] strings) {
Intrinsics.checkNotNullParameter(uri, ShareConstants.MEDIA_URI);
return 0;
}
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
Intrinsics.checkNotNullParameter(uri, ShareConstants.MEDIA_URI);
Intrinsics.checkNotNullParameter(mode, "mode");
Pair<UUID, String> parseCallIdAndAttachmentName = parseCallIdAndAttachmentName(uri);
if (parseCallIdAndAttachmentName == null) {
throw new FileNotFoundException();
}
try {
NativeAppCallAttachmentStore nativeAppCallAttachmentStore = NativeAppCallAttachmentStore.INSTANCE;
File openAttachment = NativeAppCallAttachmentStore.openAttachment((UUID) parseCallIdAndAttachmentName.first, (String) parseCallIdAndAttachmentName.second);
if (openAttachment == null) {
throw new FileNotFoundException();
}
return ParcelFileDescriptor.open(openAttachment, 268435456);
} catch (FileNotFoundException e) {
Log.e(TAG, Intrinsics.stringPlus("Got unexpected exception:", e));
throw e;
}
}
private final Pair<UUID, String> parseCallIdAndAttachmentName(Uri uri) {
try {
String path = uri.getPath();
if (path == null) {
throw new IllegalStateException("Required value was null.".toString());
}
String substring = path.substring(1);
Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.String).substring(startIndex)");
Object[] array = StringsKt.split$default(substring, new String[]{"/"}, false, 0, 6, (Object) null).toArray(new String[0]);
if (array != null) {
String[] strArr = (String[]) array;
String str = strArr[0];
String str2 = strArr[1];
if (INVALID_FILE_NAME.contentEquals(str) || INVALID_FILE_NAME.contentEquals(str2)) {
throw new Exception();
}
return new Pair<>(UUID.fromString(str), str2);
}
throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
} catch (Exception unused) {
return null;
}
}
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J$\u0010\b\u001a\u00020\u00042\b\u0010\t\u001a\u0004\u0018\u00010\u00042\u0006\u0010\n\u001a\u00020\u000b2\b\u0010\f\u001a\u0004\u0018\u00010\u0004H\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u0016\u0010\u0006\u001a\n \u0007*\u0004\u0018\u00010\u00040\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lcom/facebook/FacebookContentProvider$Companion;", "", "()V", "ATTACHMENT_URL_BASE", "", "INVALID_FILE_NAME", "TAG", "kotlin.jvm.PlatformType", "getAttachmentUrl", "applicationId", "callId", "Ljava/util/UUID;", "attachmentName", "facebook-core_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
@JvmStatic
public final String getAttachmentUrl(String applicationId, UUID callId, String attachmentName) {
Intrinsics.checkNotNullParameter(callId, "callId");
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
String format = String.format("%s%s/%s/%s", Arrays.copyOf(new Object[]{FacebookContentProvider.ATTACHMENT_URL_BASE, applicationId, callId.toString(), attachmentName}, 4));
Intrinsics.checkNotNullExpressionValue(format, "java.lang.String.format(format, *args)");
return format;
}
}
}