- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
69 lines
2.9 KiB
Java
69 lines
2.9 KiB
Java
package com.facebook;
|
|
|
|
import android.app.Activity;
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
import android.os.Bundle;
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class CustomTabActivity extends Activity {
|
|
private static final int CUSTOM_TAB_REDIRECT_REQUEST_CODE = 2;
|
|
private BroadcastReceiver closeReceiver;
|
|
public static final Companion Companion = new Companion(null);
|
|
public static final String CUSTOM_TAB_REDIRECT_ACTION = Intrinsics.stringPlus(CustomTabActivity.class.getSimpleName(), ".action_customTabRedirect");
|
|
public static final String DESTROY_ACTION = Intrinsics.stringPlus(CustomTabActivity.class.getSimpleName(), ".action_destroy");
|
|
|
|
@Override // android.app.Activity
|
|
public void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
Intent intent = new Intent(this, (Class<?>) CustomTabMainActivity.class);
|
|
intent.setAction(CUSTOM_TAB_REDIRECT_ACTION);
|
|
intent.putExtra(CustomTabMainActivity.EXTRA_URL, getIntent().getDataString());
|
|
intent.addFlags(603979776);
|
|
startActivityForResult(intent, 2);
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onActivityResult(int i, int i2, Intent intent) {
|
|
super.onActivityResult(i, i2, intent);
|
|
if (i2 == 0) {
|
|
Intent intent2 = new Intent(CUSTOM_TAB_REDIRECT_ACTION);
|
|
intent2.putExtra(CustomTabMainActivity.EXTRA_URL, getIntent().getDataString());
|
|
LocalBroadcastManager.getInstance(this).sendBroadcast(intent2);
|
|
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() { // from class: com.facebook.CustomTabActivity$onActivityResult$closeReceiver$1
|
|
@Override // android.content.BroadcastReceiver
|
|
public void onReceive(Context context, Intent intent3) {
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
Intrinsics.checkNotNullParameter(intent3, "intent");
|
|
CustomTabActivity.this.finish();
|
|
}
|
|
};
|
|
LocalBroadcastManager.getInstance(this).registerReceiver(broadcastReceiver, new IntentFilter(DESTROY_ACTION));
|
|
this.closeReceiver = broadcastReceiver;
|
|
}
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onDestroy() {
|
|
BroadcastReceiver broadcastReceiver = this.closeReceiver;
|
|
if (broadcastReceiver != null) {
|
|
LocalBroadcastManager.getInstance(this).unregisterReceiver(broadcastReceiver);
|
|
}
|
|
super.onDestroy();
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
}
|
|
}
|