正在查看: RummyCircle v11000.89 应用的 PGGoogleApiActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: RummyCircle v11000.89 应用的 PGGoogleApiActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.games24x7.pggoogleapi;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import androidx.activity.C0101t;
import androidx.activity.result.j;
import androidx.appcompat.app.AppCompatActivity;
import androidx.camera.core.impl.utils.f;
import androidx.core.view.G0;
import androidx.core.view.X;
import androidx.core.view.j0;
import androidx.core.view.q0;
import com.games24x7.pggoogleapi.communication.events.InternalGoogleApiResponse;
import com.games24x7.pggoogleapi.utils.LoginPickerUtils;
import com.google.android.gms.auth.api.credentials.Credential;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.t;
import org.jetbrains.annotations.NotNull;
@Metadata
public final class PGGoogleApiActivity extends AppCompatActivity {
private androidx.activity.result.c<Intent> emailResultLauncher;
private boolean isOldPhonePickerRequested;
private androidx.activity.result.c<j> phoneResultLauncher;
@NotNull
private final String TAG = "PGGoogleApiActivity";
@NotNull
private String requestID = "404";
public static InternalGoogleApiResponse emit$pggoogleapi_release$default(PGGoogleApiActivity pGGoogleApiActivity, InternalGoogleApiResponse internalGoogleApiResponse, Integer num, String str, String str2, int i, Object obj) {
if ((i & 2) != 0) {
num = null;
}
if ((i & 4) != 0) {
str = null;
}
return pGGoogleApiActivity.emit$pggoogleapi_release(internalGoogleApiResponse, num, str, str2);
}
public static String extractPhoneNumber$pggoogleapi_release$default(PGGoogleApiActivity pGGoogleApiActivity, Intent intent, boolean z, int i, Object obj) {
if ((i & 2) != 0) {
z = false;
}
return pGGoogleApiActivity.extractPhoneNumber$pggoogleapi_release(intent, z);
}
private final void handleRequest(Bundle bundle) {
String string = bundle.getString("callbackID");
if (string == null) {
string = "404";
}
this.requestID = string;
String string2 = bundle.getString("actionName");
int i = bundle.getInt("requestCode");
try {
if (Intrinsics.a(string2, "email")) {
if (i == 121) {
LoginPickerUtils.INSTANCE.showEmailPicker$pggoogleapi_release(this, i, string);
return;
}
LoginPickerUtils loginPickerUtils = LoginPickerUtils.INSTANCE;
androidx.activity.result.c<Intent> cVar = this.emailResultLauncher;
if (cVar != null) {
loginPickerUtils.showEmailPicker$pggoogleapi_release(cVar, string);
return;
} else {
Intrinsics.q("emailResultLauncher");
throw null;
}
}
if (!Intrinsics.a(string2, "phone")) {
emit$pggoogleapi_release$default(this, LoginPickerUtils.INSTANCE.getResponseObject(false, null, "GAPI_INVALIDACTION_ERROR", "Invalid Action", this.requestID), null, null, this.requestID, 6, null);
return;
}
boolean z = bundle.getBoolean("useOldPhonePicker");
this.isOldPhonePickerRequested = z;
Log.e(this.TAG, "Phone Picker type from intent: " + this.isOldPhonePickerRequested + ' ');
if (i == 122) {
LoginPickerUtils.INSTANCE.showPhonePicker$pggoogleapi_release(this, i, string, z);
return;
}
LoginPickerUtils loginPickerUtils2 = LoginPickerUtils.INSTANCE;
androidx.activity.result.c<j> cVar2 = this.phoneResultLauncher;
if (cVar2 != null) {
loginPickerUtils2.showPhonePicker$pggoogleapi_release(this, cVar2, string, z);
} else {
Intrinsics.q("phoneResultLauncher");
throw null;
}
} catch (Exception e) {
e.printStackTrace();
emit$pggoogleapi_release$default(this, LoginPickerUtils.INSTANCE.getResponseObject(false, null, "UNKNOWN_ERROR", e.getMessage(), this.requestID), null, null, this.requestID, 6, null);
}
}
public static final void onCreate$lambda$0(PGGoogleApiActivity this$0, androidx.activity.result.a it) {
InternalGoogleApiResponse responseObject;
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(it, "it");
int i = it.a;
Intent intent = it.b;
if (i == -1) {
Log.d(this$0.TAG, "resOK - " + intent);
Bundle extras = intent != null ? intent.getExtras() : null;
Log.d(this$0.TAG, "extras - " + extras);
String string = extras != null ? extras.getString("authAccount") : null;
Log.d(this$0.TAG, "extraName " + string);
LoginPickerUtils loginPickerUtils = LoginPickerUtils.INSTANCE;
loginPickerUtils.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "email_picker_click", false, true);
responseObject = LoginPickerUtils.getResponseObject$default(loginPickerUtils, true, string, null, null, this$0.requestID, 12, null);
} else {
Log.d(this$0.TAG, "resFail - " + intent);
LoginPickerUtils loginPickerUtils2 = LoginPickerUtils.INSTANCE;
loginPickerUtils2.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "email_picker_closed", false, false);
responseObject = loginPickerUtils2.getResponseObject(false, null, "GAPI_RESULTCANCELED_ERROR", "Result Canceled", this$0.requestID);
}
emit$pggoogleapi_release$default(this$0, responseObject, null, null, this$0.requestID, 6, null);
this$0.finish();
this$0.overridePendingTransition(0, 0);
}
public static final void onCreate$lambda$1(PGGoogleApiActivity this$0, androidx.activity.result.a it) {
InternalGoogleApiResponse responseObject$default;
LoginPickerUtils loginPickerUtils;
String str;
boolean z;
Object obj;
String str2;
String str3;
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(it, "it");
int i = it.a;
Intent intent = it.b;
if (i != -1) {
if (i == 1001) {
Log.d(this$0.TAG, "resFail - " + intent);
loginPickerUtils = LoginPickerUtils.INSTANCE;
loginPickerUtils.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_click", true, false);
str = this$0.requestID;
z = false;
obj = null;
str2 = "GAPI_OTHERACCOUNT_ERROR";
str3 = "None of the above";
} else if (i != 1002) {
Log.d(this$0.TAG, "resFail - " + intent);
loginPickerUtils = LoginPickerUtils.INSTANCE;
loginPickerUtils.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_closed", false, false);
str = this$0.requestID;
z = false;
obj = null;
str2 = "GAPI_RESULTCANCELED_ERROR";
str3 = "Result Canceled";
} else {
Log.d(this$0.TAG, "resFail - " + intent);
loginPickerUtils = LoginPickerUtils.INSTANCE;
loginPickerUtils.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_closed", true, false);
str = this$0.requestID;
z = false;
obj = null;
str2 = "GAPI_NOHINTSAVAILABLE_ERROR";
str3 = "No Hints available";
}
responseObject$default = loginPickerUtils.getResponseObject(z, obj, str2, str3, str);
} else {
Log.d(this$0.TAG, "resOK - " + intent);
Bundle extras = intent != null ? intent.getExtras() : null;
Log.d(this$0.TAG, "extras - " + extras);
String extractPhoneNumber$pggoogleapi_release = this$0.extractPhoneNumber$pggoogleapi_release(intent, this$0.isOldPhonePickerRequested);
Log.d(this$0.TAG, "phone: " + extractPhoneNumber$pggoogleapi_release);
LoginPickerUtils loginPickerUtils2 = LoginPickerUtils.INSTANCE;
loginPickerUtils2.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_click", false, true);
responseObject$default = LoginPickerUtils.getResponseObject$default(loginPickerUtils2, true, t.D(extractPhoneNumber$pggoogleapi_release), null, null, this$0.requestID, 12, null);
}
emit$pggoogleapi_release$default(this$0, responseObject$default, null, null, this$0.requestID, 6, null);
this$0.finish();
this$0.overridePendingTransition(0, 0);
}
private final void showFullScreen() {
X.C(findViewById(R.id.rootView), new f());
j0.a(getWindow(), true);
G0 g0 = new G0(getWindow(), getWindow().getDecorView());
g0.a(2);
g0.d();
g0.c(false);
g0.b(false);
}
public static final q0 showFullScreen$lambda$2(View view, q0 insets) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(insets, "insets");
androidx.core.graphics.b f = insets.a.f(7);
Intrinsics.checkNotNullExpressionValue(f, "insets.getInsets(WindowI…Compat.Type.systemBars())");
view.setPadding(f.a, f.b, f.c, f.d);
return insets;
}
@NotNull
public final InternalGoogleApiResponse emit$pggoogleapi_release(@NotNull InternalGoogleApiResponse result, Integer num, String str, @NotNull String callbackID) {
Intrinsics.checkNotNullParameter(result, "result");
Intrinsics.checkNotNullParameter(callbackID, "callbackID");
Log.d(this.TAG, "finish");
try {
try {
org.greenrobot.eventbus.b.c().i(result);
} catch (Exception e) {
e.printStackTrace();
Log.d(this.TAG, String.valueOf(e.getMessage()));
InternalGoogleApiResponse internalGoogleApiResponse = new InternalGoogleApiResponse(false, null, "UNKNOWN_ERROR", e.getMessage(), callbackID);
finish();
overridePendingTransition(0, 0);
result = internalGoogleApiResponse;
}
return result;
} finally {
finish();
overridePendingTransition(0, 0);
}
}
@NotNull
public final String extractPhoneNumber$pggoogleapi_release(Intent intent, boolean z) {
String a;
if (z) {
Credential credential = intent != null ? (Credential) intent.getParcelableExtra("com.google.android.gms.credentials.Credential") : null;
return (credential == null || (a = credential.a()) == null) ? "" : a;
}
try {
String a2 = com.google.android.gms.auth.api.identity.b.a(this).a(intent);
Intrinsics.checkNotNullExpressionValue(a2, "{\n try {\n …\n }\n\n }");
return a2;
} catch (Exception e) {
Log.e(this.TAG, "extractPhoneNumber :: Exception while getting the phone number :: " + e.getMessage());
e.printStackTrace();
return "";
}
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
InternalGoogleApiResponse responseObject;
InternalGoogleApiResponse responseObject$default;
LoginPickerUtils loginPickerUtils;
String str;
boolean z;
Object obj;
String str2;
String str3;
super.onActivityResult(i, i2, intent);
if (i != 121) {
if (i == 122) {
if (i2 != -1) {
if (i2 == 1001) {
Log.d(this.TAG, "resFail - " + intent);
loginPickerUtils = LoginPickerUtils.INSTANCE;
loginPickerUtils.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_click", true, false);
str = this.requestID;
z = false;
obj = null;
str2 = "GAPI_OTHERACCOUNT_ERROR";
str3 = "None of the above";
} else if (i2 != 1002) {
Log.d(this.TAG, "resFail - " + intent);
loginPickerUtils = LoginPickerUtils.INSTANCE;
loginPickerUtils.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_closed", false, false);
str = this.requestID;
z = false;
obj = null;
str2 = "GAPI_RESULTCANCELED_ERROR";
str3 = "Result Canceled";
} else {
Log.d(this.TAG, "resFail - " + intent);
loginPickerUtils = LoginPickerUtils.INSTANCE;
loginPickerUtils.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_closed", true, false);
str = this.requestID;
z = false;
obj = null;
str2 = "GAPI_NOHINTSAVAILABLE_ERROR";
str3 = "No Hints available";
}
responseObject$default = loginPickerUtils.getResponseObject(z, obj, str2, str3, str);
} else {
Log.d(this.TAG, "resOK - " + intent);
Bundle extras = intent != null ? intent.getExtras() : null;
Log.d(this.TAG, "extras - " + extras);
String extractPhoneNumber$pggoogleapi_release$default = extractPhoneNumber$pggoogleapi_release$default(this, intent, false, 2, null);
Log.d(this.TAG, "phone: " + extractPhoneNumber$pggoogleapi_release$default);
LoginPickerUtils loginPickerUtils2 = LoginPickerUtils.INSTANCE;
loginPickerUtils2.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "phone_picker_click", false, true);
responseObject$default = LoginPickerUtils.getResponseObject$default(loginPickerUtils2, true, t.D(extractPhoneNumber$pggoogleapi_release$default), null, null, this.requestID, 12, null);
}
responseObject = responseObject$default;
}
finish();
overridePendingTransition(0, 0);
}
String str4 = this.TAG;
if (i2 == -1) {
Log.d(str4, "resOK - " + intent);
Bundle extras2 = intent != null ? intent.getExtras() : null;
Log.d(this.TAG, "extras - " + extras2);
String string = extras2 != null ? extras2.getString("authAccount") : null;
Log.d(this.TAG, "extraName " + string);
LoginPickerUtils loginPickerUtils3 = LoginPickerUtils.INSTANCE;
loginPickerUtils3.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "email_picker_click", false, true);
responseObject = LoginPickerUtils.getResponseObject$default(loginPickerUtils3, true, string, null, null, this.requestID, 12, null);
} else {
Log.d(str4, "resFail - " + intent);
LoginPickerUtils loginPickerUtils4 = LoginPickerUtils.INSTANCE;
loginPickerUtils4.sendAnalyticsEvent(LoginPickerUtils.EVENT_NAME_CLICK, "email_picker_closed", false, false);
responseObject = loginPickerUtils4.getResponseObject(false, null, "GAPI_RESULTCANCELED_ERROR", "Result Canceled", this.requestID);
}
emit$pggoogleapi_release$default(this, responseObject, null, null, this.requestID, 6, null);
finish();
overridePendingTransition(0, 0);
}
@Override
public void onCreate(Bundle bundle) {
C0101t.a(this);
super.onCreate(bundle);
overridePendingTransition(0, 0);
try {
Window window = getWindow();
window.addFlags(Integer.MIN_VALUE);
window.setStatusBarColor(Color.parseColor(LoginPickerUtils.INSTANCE.getCOLOR_STATUSBAR()));
} catch (Exception e) {
e.printStackTrace();
Log.e(this.TAG, "error in setting status bar color:: " + e.getMessage());
}
setContentView(R.layout.activity_google_api);
showFullScreen();
Log.d(this.TAG, "onCreate");
this.emailResultLauncher = registerForActivityResult(new androidx.activity.result.contract.c(), new androidx.activity.result.b() {
@Override
public final void a(Object obj) {
PGGoogleApiActivity.onCreate$lambda$0(PGGoogleApiActivity.this, (androidx.activity.result.a) obj);
}
});
this.phoneResultLauncher = registerForActivityResult(new androidx.activity.result.contract.d(), new androidx.activity.result.b() {
@Override
public final void a(Object obj) {
PGGoogleApiActivity.onCreate$lambda$1(PGGoogleApiActivity.this, (androidx.activity.result.a) obj);
}
});
Bundle extras = getIntent().getExtras();
if (extras != null) {
handleRequest(extras);
return;
}
Log.e(this.TAG, "Null Bundle");
finish();
overridePendingTransition(0, 0);
}
@Override
public void onPause() {
super.onPause();
overridePendingTransition(0, 0);
}
}