正在查看: RummyCircle v11000.89 应用的 PokerLauncherActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: RummyCircle v11000.89 应用的 PokerLauncherActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.g24x7.pokerlibrary.activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import androidx.appcompat.app.AppCompatActivity;
import androidx.browser.customtabs.CustomTabsIntent;
import com.g24x7.pokerlibrary.model.c;
import com.g24x7.pokerlibrary.service.EventListenerService;
import com.g24x7.pokerlibrary.util.d;
import com.games24x7.coregame.common.utility.Constants;
import java.util.HashSet;
import java.util.Iterator;
import kotlin.Metadata;
import kotlin.f;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.k;
@Metadata
public final class PokerLauncherActivity extends AppCompatActivity {
public final k a;
public final k b;
public static final class a extends kotlin.jvm.internal.k implements Function0<String> {
public a() {
super(0);
}
public final Object invoke() {
Intent intent = PokerLauncherActivity.this.getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "intent");
Bundle extras = intent.getExtras();
Intrinsics.c(extras);
Object obj = extras.get("PACKAGE_NAME");
if (obj != null) {
return (String) obj;
}
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
}
public static final class b extends kotlin.jvm.internal.k implements Function0<c> {
public b() {
super(0);
}
public final Object invoke() {
Intent intent = PokerLauncherActivity.this.getIntent();
Intrinsics.checkNotNullExpressionValue(intent, "intent");
Bundle extras = intent.getExtras();
Intrinsics.c(extras);
Object obj = extras.get("PAYLOAD");
if (obj != null) {
return (c) obj;
}
throw new NullPointerException("null cannot be cast to non-null type com.g24x7.pokerlibrary.model.UserAuthData");
}
}
public PokerLauncherActivity() {
Intrinsics.checkNotNullExpressionValue("PokerLauncherActivity", "PokerLauncherActivity::class.java.simpleName");
this.a = f.b(new b());
this.b = f.b(new a());
}
public final void A() {
String str;
Intent intent = new Intent();
Log.d("DeepLink", "launching poker");
intent.setAction("com.baazigames.poker.playcircle.LAUNCH_POKER");
Bundle bundle = new Bundle();
k kVar = this.a;
bundle.putString(Constants.RunTimeVars.SHARED_PREF_USER_ID, String.valueOf(((c) kVar.getValue()).a.e));
bundle.putString("JAVA_SESSION_ID", ((c) kVar.getValue()).a.d);
bundle.putString("APP_PACKAGE_NAME", (String) this.b.getValue());
bundle.putString("EVENT_LISTENER_SERVICE_NAME", EventListenerService.class.getCanonicalName());
bundle.putString("COMMUNICATION_KEY", String.valueOf(d.a()));
bundle.putString("DEEP_LINK_URL", "https://www.my11circle.com/lobby/gotopoker/invite");
bundle.putString("PARTNER_API_KEY", com.g24x7.pokerlibrary.c.k ? "ZjVlqTR5S16WPlLkIJ7wY7hCbK9lTODcaZ9H6OZZ" : "4dv417xaSx5fe91wbO8fU2NMO5KpnW8T4hj3jwcs");
Log.d("DeepLink", "Added bundle data");
String str2 = com.g24x7.pokerlibrary.c.e;
switch (str2.hashCode()) {
case -1405517509:
if (str2.equals("practice")) {
str = "PRACTICE_GAMES_LIST";
break;
}
str = "";
break;
case -1183699191:
if (str2.equals("invite")) {
str = "HomePrivateGamesJoinTableModal";
break;
}
str = "";
break;
case 117588:
if (str2.equals("web")) {
str = "WEB_LINK";
break;
}
str = "";
break;
case 3046195:
if (str2.equals("cash")) {
str = "CASH_GAME_LIST";
break;
}
str = "";
break;
default:
str = "";
break;
}
if (str.length() > 0) {
if ((!Intrinsics.a(str, "HomePrivateGamesJoinTableModal") || com.g24x7.pokerlibrary.c.f.length() != 0) && (!Intrinsics.a(str, "WEB_LINK") || com.g24x7.pokerlibrary.c.g.length() != 0)) {
Bundle bundle2 = new Bundle();
bundle2.putString("SCREEN_NAME", str);
if (com.g24x7.pokerlibrary.c.f.length() > 0) {
bundle2.putString("INVITE_CODE", com.g24x7.pokerlibrary.c.f);
}
if (com.g24x7.pokerlibrary.c.g.length() > 0) {
bundle2.putString("WEB_URL", com.g24x7.pokerlibrary.util.c.a.get(com.g24x7.pokerlibrary.c.g));
}
bundle.putBundle("DEFAULT_SCREEN_CONFIG", bundle2);
}
intent.putExtra("data", bundle);
startActivityForResult(intent, 3);
com.g24x7.pokerlibrary.c.f = "";
com.g24x7.pokerlibrary.c.e = "";
finish();
com.g24x7.pokerlibrary.c.e();
}
Log.d("DeepLink", "Added deeplink data to bundle");
intent.putExtra("data", bundle);
startActivityForResult(intent, 3);
com.g24x7.pokerlibrary.c.f = "";
com.g24x7.pokerlibrary.c.e = "";
finish();
com.g24x7.pokerlibrary.c.e();
}
public final void onCreate(Bundle bundle) {
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
setContentView(com.g24x7.pokerlibrary.d.empty_activity);
Log.d("Launch", "onCreate");
String b2 = d.b();
Intrinsics.checkNotNullParameter(this, "context");
Intrinsics.checkNotNullParameter(b2, "packageName");
try {
if (getPackageManager().getApplicationInfo(b2, 0).enabled) {
Log.d("Launch", "launching Poker");
A();
return;
}
} catch (PackageManager.NameNotFoundException unused) {
}
Log.d("Launch", "launching chrome");
try {
z();
} catch (Exception unused2) {
com.g24x7.pokerlibrary.util.b bVar = com.g24x7.pokerlibrary.c.a;
if (bVar != null) {
bVar.onAuthError(0);
}
com.g24x7.pokerlibrary.c.e();
finish();
}
}
public final void onNewIntent(Intent intent) {
super/*androidx.fragment.app.FragmentActivity*/.onNewIntent(intent);
String b2 = d.b();
Intrinsics.checkNotNullParameter(this, "context");
Intrinsics.checkNotNullParameter(b2, "packageName");
try {
if (getPackageManager().getApplicationInfo(b2, 0).enabled) {
Log.d("Launch", "launching Poker");
A();
}
} catch (PackageManager.NameNotFoundException unused) {
}
}
public final void onRestart() {
super/*android.app.Activity*/.onRestart();
Log.d("Launch", "onRestart");
finish();
}
public final void onResume() {
super/*androidx.fragment.app.FragmentActivity*/.onResume();
Log.d("Launch", "onResume");
}
public final void z() {
HashSet hashSet = com.g24x7.pokerlibrary.util.a.a;
Intrinsics.checkNotNullParameter(this, "context");
CustomTabsIntent a2 = new CustomTabsIntent.Builder(null).a();
Intrinsics.checkNotNullExpressionValue(a2, "CustomTabsIntent.Builder().build()");
Intent intent = a2.a;
Intrinsics.checkNotNullExpressionValue(intent, "customTabsIntent.intent");
String str = com.g24x7.pokerlibrary.c.j + "?userId=" + com.g24x7.pokerlibrary.c.h + "&appVersion=" + com.g24x7.pokerlibrary.c.i;
Log.d("URL", str);
Uri parse = Uri.parse(str);
Intrinsics.checkNotNullExpressionValue(parse, "Uri.parse(uri)");
intent.setData(parse);
Iterator<ResolveInfo> it = getPackageManager().queryIntentActivities(intent, 0).iterator();
while (true) {
if (!it.hasNext()) {
break;
}
ResolveInfo next = it.next();
String str2 = next.activityInfo.packageName;
Intrinsics.checkNotNullExpressionValue(str2, "packageName");
if ((!com.g24x7.pokerlibrary.util.a.a.contains(str2)) && next.activityInfo.enabled) {
Log.d("Package", "Opening custom tab in " + str2);
intent.setPackage(str2);
break;
}
}
Intrinsics.checkNotNullExpressionValue(intent, "customTabsIntent.intent");
Uri data = intent.getData();
Intrinsics.c(data);
intent.setData(data);
Object obj = androidx.core.content.b.a;
startActivity(intent, a2.b);
com.g24x7.pokerlibrary.c.e();
}
}