正在查看: Cashalo v2.25.0.0 应用的 FacebookActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cashalo v2.25.0.0 应用的 FacebookActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.facebook;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Parcelable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import com.facebook.common.R;
import com.facebook.common.util.UriUtil;
import com.facebook.internal.FacebookDialogFragment;
import com.facebook.internal.NativeProtocol;
import com.facebook.internal.Utility;
import com.facebook.internal.instrument.crashshield.CrashShieldHandler;
import com.facebook.internal.logging.dumpsys.EndToEndDumpsysHelper;
import com.facebook.login.LoginFragment;
import com.facebook.referrals.ReferralFragment;
import com.facebook.share.internal.DeviceShareDialogFragment;
import com.facebook.share.model.ShareContent;
import com.fullstory.FS;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0016\u0018\u0000 \u001b2\u00020\u0001:\u0001\u001bB\u0005¢\u0006\u0002\u0010\u0002J7\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000b2\b\u0010\f\u001a\u0004\u0018\u00010\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u000e\u0010\u0010\u001a\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\u0011H\u0017¢\u0006\u0002\u0010\u0012J\b\u0010\u0013\u001a\u00020\u0004H\u0014J\b\u0010\u0014\u001a\u00020\tH\u0002J\u0010\u0010\u0015\u001a\u00020\t2\u0006\u0010\u0016\u001a\u00020\u0017H\u0016J\u0012\u0010\u0018\u001a\u00020\t2\b\u0010\u0019\u001a\u0004\u0018\u00010\u001aH\u0016R\"\u0010\u0005\u001a\u0004\u0018\u00010\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004@BX\u0086\u000e¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007¨\u0006\u001c"}, d2 = {"Lcom/facebook/FacebookActivity;", "Landroidx/fragment/app/FragmentActivity;", "()V", "<set-?>", "Landroidx/fragment/app/Fragment;", "currentFragment", "getCurrentFragment", "()Landroidx/fragment/app/Fragment;", "dump", "", "prefix", "", "fd", "Ljava/io/FileDescriptor;", "writer", "Ljava/io/PrintWriter;", "args", "", "(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V", "getFragment", "handlePassThroughError", "onConfigurationChanged", "newConfig", "Landroid/content/res/Configuration;", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "Companion", "facebook-common_release"}, k = 1, mv = {1, 5, 1})
public class FacebookActivity extends FragmentActivity {
private static final String FRAGMENT_TAG = "SingleFragment";
public static final String PASS_THROUGH_CANCEL_ACTION = "PassThrough";
private static final String TAG;
private Fragment currentFragment;
public final Fragment getCurrentFragment() {
return this.currentFragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
if (!FacebookSdk.isInitialized()) {
Utility.logd(TAG, "Facebook SDK not initialized. Make sure you call sdkInitialize inside your Application's onCreate method.");
Context applicationContext = getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "applicationContext");
FacebookSdk.sdkInitialize(applicationContext);
}
setContentView(R.layout.com_facebook_activity_layout);
Intrinsics.checkNotNullExpressionValue(intent, "intent");
if (Intrinsics.areEqual(PASS_THROUGH_CANCEL_ACTION, intent.getAction())) {
handlePassThroughError();
} else {
this.currentFragment = getFragment();
}
}
protected Fragment getFragment() {
Intent intent = getIntent();
FragmentManager supportFragmentManager = getSupportFragmentManager();
Intrinsics.checkNotNullExpressionValue(supportFragmentManager, "supportFragmentManager");
Fragment findFragmentByTag = supportFragmentManager.findFragmentByTag(FRAGMENT_TAG);
if (findFragmentByTag != null) {
return findFragmentByTag;
}
Intrinsics.checkNotNullExpressionValue(intent, "intent");
if (Intrinsics.areEqual(FacebookDialogFragment.TAG, intent.getAction())) {
FacebookDialogFragment facebookDialogFragment = new FacebookDialogFragment();
facebookDialogFragment.setRetainInstance(true);
facebookDialogFragment.show(supportFragmentManager, FRAGMENT_TAG);
return facebookDialogFragment;
}
if (Intrinsics.areEqual(DeviceShareDialogFragment.TAG, intent.getAction())) {
FS.log_w(TAG, "Please stop use Device Share Dialog, this feature has been disabled and all related classes in Facebook Android SDK will be removed from v13.0.0 release.");
DeviceShareDialogFragment deviceShareDialogFragment = new DeviceShareDialogFragment();
deviceShareDialogFragment.setRetainInstance(true);
Parcelable parcelableExtra = intent.getParcelableExtra(UriUtil.LOCAL_CONTENT_SCHEME);
if (parcelableExtra != null) {
deviceShareDialogFragment.setShareContent((ShareContent) parcelableExtra);
deviceShareDialogFragment.show(supportFragmentManager, FRAGMENT_TAG);
return deviceShareDialogFragment;
}
throw new NullPointerException("null cannot be cast to non-null type com.facebook.share.model.ShareContent<*, *>");
}
if (Intrinsics.areEqual(ReferralFragment.TAG, intent.getAction())) {
ReferralFragment referralFragment = new ReferralFragment();
referralFragment.setRetainInstance(true);
supportFragmentManager.beginTransaction().add(R.id.com_facebook_fragment_container, referralFragment, FRAGMENT_TAG).commit();
return referralFragment;
}
LoginFragment loginFragment = new LoginFragment();
loginFragment.setRetainInstance(true);
supportFragmentManager.beginTransaction().add(R.id.com_facebook_fragment_container, loginFragment, FRAGMENT_TAG).commit();
return loginFragment;
}
public void onConfigurationChanged(Configuration newConfig) {
Intrinsics.checkNotNullParameter(newConfig, "newConfig");
super.onConfigurationChanged(newConfig);
Fragment fragment = this.currentFragment;
if (fragment != null) {
fragment.onConfigurationChanged(newConfig);
}
}
private final void handlePassThroughError() {
Intent intent = getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "requestIntent");
FacebookException exceptionFromErrorData = NativeProtocol.getExceptionFromErrorData(NativeProtocol.getMethodArgumentsFromIntent(intent));
Intent intent2 = getIntent();
Intrinsics.checkNotNullExpressionValue(intent2, "intent");
setResult(0, NativeProtocol.createProtocolResultIntent(intent2, null, exceptionFromErrorData));
finish();
}
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
if (CrashShieldHandler.isObjectCrashing(this)) {
return;
}
try {
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(writer, "writer");
if (EndToEndDumpsysHelper.INSTANCE.maybeDump(prefix, writer, args)) {
return;
}
super.dump(prefix, fd, writer, args);
} catch (Throwable th) {
CrashShieldHandler.handleThrowable(th, this);
}
}
static {
String name = FacebookActivity.class.getName();
Intrinsics.checkNotNullExpressionValue(name, "FacebookActivity::class.java.name");
TAG = name;
}
}