正在查看: Clash Legends v0.0.1 应用的 FacebookActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 FacebookActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.facebook;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import com.facebook.common.R;
import com.facebook.core.internal.logging.dumpsys.EndToEndDumpsysHelper;
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.login.LoginFragment;
import com.facebook.referrals.ReferralFragment;
import com.facebook.share.internal.DeviceShareDialogFragment;
import com.facebook.share.model.ShareContent;
import java.io.FileDescriptor;
import java.io.PrintWriter;
public class FacebookActivity extends FragmentActivity {
private Fragment singleFragment;
public static String PASS_THROUGH_CANCEL_ACTION = "PassThrough";
private static String FRAGMENT_TAG = "SingleFragment";
private static final String TAG = FacebookActivity.class.getName();
@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.");
FacebookSdk.sdkInitialize(getApplicationContext());
}
setContentView(R.layout.com_facebook_activity_layout);
if (PASS_THROUGH_CANCEL_ACTION.equals(intent.getAction())) {
handlePassThroughError();
} else {
this.singleFragment = getFragment();
}
}
protected Fragment getFragment() {
Intent intent = getIntent();
FragmentManager manager = getSupportFragmentManager();
Fragment fragment = manager.findFragmentByTag(FRAGMENT_TAG);
if (fragment == null) {
if (FacebookDialogFragment.TAG.equals(intent.getAction())) {
FacebookDialogFragment dialogFragment = new FacebookDialogFragment();
dialogFragment.setRetainInstance(true);
dialogFragment.show(manager, FRAGMENT_TAG);
return dialogFragment;
}
if (DeviceShareDialogFragment.TAG.equals(intent.getAction())) {
DeviceShareDialogFragment dialogFragment2 = new DeviceShareDialogFragment();
dialogFragment2.setRetainInstance(true);
dialogFragment2.setShareContent((ShareContent) intent.getParcelableExtra("content"));
dialogFragment2.show(manager, FRAGMENT_TAG);
return dialogFragment2;
}
if (ReferralFragment.TAG.equals(intent.getAction())) {
Fragment fragment2 = new ReferralFragment();
fragment2.setRetainInstance(true);
manager.beginTransaction().add(R.id.com_facebook_fragment_container, fragment2, FRAGMENT_TAG).commit();
return fragment2;
}
Fragment fragment3 = new LoginFragment();
fragment3.setRetainInstance(true);
manager.beginTransaction().add(R.id.com_facebook_fragment_container, fragment3, FRAGMENT_TAG).commit();
return fragment3;
}
return fragment;
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Fragment fragment = this.singleFragment;
if (fragment != null) {
fragment.onConfigurationChanged(newConfig);
}
}
public Fragment getCurrentFragment() {
return this.singleFragment;
}
private void handlePassThroughError() {
Intent requestIntent = getIntent();
Bundle errorResults = NativeProtocol.getMethodArgumentsFromIntent(requestIntent);
FacebookException exception = NativeProtocol.getExceptionFromErrorData(errorResults);
Intent resultIntent = NativeProtocol.createProtocolResultIntent(getIntent(), null, exception);
setResult(0, resultIntent);
finish();
}
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
if (CrashShieldHandler.isObjectCrashing(this)) {
return;
}
try {
if (EndToEndDumpsysHelper.maybeDump(prefix, writer, args)) {
return;
}
super.dump(prefix, fd, writer, args);
} catch (Throwable th) {
CrashShieldHandler.handleThrowable(th, this);
}
}
}