正在查看: Mabilis Cash v1.19.4 应用的 GrantActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mabilis Cash v1.19.4 应用的 GrantActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.face.csg.lv5.sdk.detect.guide;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.StateListDrawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Base64;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.core.view.PointerIconCompat;
import androidx.recyclerview.widget.ItemTouchHelper;
import com.face.csg.lv5.lib.jni.FaceDelta;
import com.face.csg.lv5.sdk.R;
import com.face.csg.lv5.sdk.detect.action.ActionLivenessActivity;
import com.face.csg.lv5.sdk.detect.actionflash.ActionFlashLivenessActivity;
import com.face.csg.lv5.sdk.detect.color.FlashLivenessActivity;
import com.face.csg.lv5.sdk.detect.distance.DistanceFlashFaceLivenessDetectActivity;
import com.megvii.lv5.a;
import com.megvii.lv5.a1;
import com.megvii.lv5.a5;
import com.megvii.lv5.b;
import com.megvii.lv5.b5;
import com.megvii.lv5.c;
import com.megvii.lv5.d;
import com.megvii.lv5.d5;
import com.megvii.lv5.e1;
import com.megvii.lv5.h0;
import com.megvii.lv5.i0;
import com.megvii.lv5.i7;
import com.megvii.lv5.j0;
import com.megvii.lv5.j2;
import com.megvii.lv5.k0;
import com.megvii.lv5.l0;
import com.megvii.lv5.m0;
import com.megvii.lv5.m4;
import com.megvii.lv5.n2;
import com.megvii.lv5.t0;
import com.megvii.lv5.u4;
import com.megvii.lv5.v0;
import com.megvii.lv5.v4;
import com.megvii.lv5.y4;
import com.sensorsdata.analytics.android.autotrack.aop.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import com.sensorsdata.analytics.android.sdk.aop.push.PushAutoTrackHelper;
import java.util.HashMap;
import java.util.List;
public class GrantActivity extends Activity implements View.OnClickListener {
public static final int z = 0;
public Button f1956a;
public CheckBox f1957b;
public CheckBox f1958c;
public LinearLayout f1959d;
public LinearLayout f1960e;
public TextView f1961f;
public TextView f1962g;
public LinearLayout f1963h;
public TextView f1964i;
public LinearLayout f1965j;
public LinearLayout f1966k;
public TextView f1967l;
public TextView f1968m;
public RelativeLayout f1969n;
public RelativeLayout f1970o;
public ImageView f1971p;
public ImageView f1972q;
public ImageView f1973r;
public d5 f1974s;
public int t;
public String u;
public String v;
public v0 w;
public String x;
public boolean y;
public final void a() {
c.a = "FinAuthZFAC";
c cVar = c.a.a;
b5.a(cVar.a("exit_guide_page", this.u, this.t));
c.a = "FinAuthZFAC";
b5.a(cVar.a("fail_detect:user_cancel", this.u, this.t));
if (!b.a) {
l0 f2 = m4.f(getApplicationContext());
int i2 = this.w.a.a;
if (f2.J2 != 0 && i2 != 3) {
String a2 = v4.a(4, 3003, (int[]) null, (List) null, 0, 0.0f, (String[]) null, 0, (List) null);
byte[] deltaWithoutVideo = FaceDelta.getDeltaWithoutVideo(b.a, b5.a(), a2, "");
if (i2 == 5) {
String encodeToString = Base64.encodeToString(deltaWithoutVideo, 0);
a1 a1Var = j2.b;
i7 i7Var = j2.a.a.a;
if (i7Var != null) {
i7Var.a(this.u, 2, encodeToString, new k0(this));
}
} else {
t0.a().a(getApplicationContext(), this.v, this.u, 2, deltaWithoutVideo, (m0) null);
}
}
}
if (b.a) {
e1 e1Var = e1.a.a;
byte[] bytes = "".getBytes();
e1Var.getClass();
e1Var.a(PointerIconCompat.TYPE_COPY, "USER_CANCEL", "", (a) null, bytes, (HashMap) null);
} else {
a1 a1Var2 = a1.a.a;
byte[] bytes2 = "".getBytes();
a1Var2.getClass();
a1Var2.a(PointerIconCompat.TYPE_COPY, "USER_CANCEL", "", (a) null, bytes2, (HashMap) null);
}
finish();
}
@Override
public void attachBaseContext(Context context) {
if (context.getResources().getConfiguration().fontScale != 1.0f) {
Configuration configuration = new Configuration(context.getResources().getConfiguration());
configuration.fontScale = 1.0f;
applyOverrideConfiguration(configuration);
}
super.attachBaseContext(context);
}
@Override
@SensorsDataInstrumented
public void onClick(View view) {
int id = view.getId();
boolean z2 = false;
if (id == R.id.bt_face_liveness_begin_detect) {
if (this.f1957b.isChecked() || this.f1965j.getVisibility() == 8) {
u4.b(getApplicationContext(), "credit_is_check", Boolean.valueOf(this.f1958c.isChecked()));
synchronized (u4.class) {
try {
long currentTimeMillis = System.currentTimeMillis();
if (currentTimeMillis - u4.a <= 1500) {
z2 = true;
}
u4.a = currentTimeMillis;
} catch (Throwable th) {
SensorsDataAutoTrackHelper.trackViewOnClick(view);
throw th;
}
}
if (!z2) {
c.a = "FinAuthZFAC";
b5.a(c.a.a.a("pass_guide_page", this.u, this.t));
Class cls = FlashLivenessActivity.class;
int i2 = this.t;
if (i2 == 1 || i2 == 3) {
cls = FlashLivenessActivity.class;
} else if (i2 == 2) {
cls = ActionLivenessActivity.class;
} else if (i2 == 5) {
cls = ActionFlashLivenessActivity.class;
} else if (i2 == 7) {
cls = DistanceFlashFaceLivenessDetectActivity.class;
}
Intent intent = new Intent(this, (Class<?>) cls);
intent.addFlags(268435456);
startActivity(intent);
finish();
}
} else {
Context applicationContext = getApplicationContext();
int i3 = R.layout.face_liveness_agreement_toast;
if (d5.a == null) {
Toast toast = new Toast(applicationContext);
toast.setView(((LayoutInflater) applicationContext.getSystemService("layout_inflater")).inflate(i3, (ViewGroup) null));
toast.setGravity(17, 0, ItemTouchHelper.Callback.DEFAULT_SWIPE_ANIMATION_DURATION);
toast.setDuration(0);
d5.a = toast;
}
d5.a.show();
}
} else if (id == R.id.linearlayout_checkbox_hot_area) {
if (this.f1957b.isChecked()) {
c.a = "FinAuthZFAC";
b5.a(c.a.a.a("disagree_face_agreement", this.u, this.t));
this.f1957b.setChecked(false);
} else {
c.a = "FinAuthZFAC";
b5.a(c.a.a.a("agree_face_agreement", this.u, this.t));
this.f1957b.setChecked(true);
}
} else if (id == R.id.ll_bar_left || id == R.id.tv_bar_title) {
a();
} else if (id == R.id.linearlayout_checkbox_hot_area_credit) {
if (this.f1958c.isChecked()) {
c.a = "FinAuthZFAC";
b5.a(c.a.a.a("disagree_credit_agreement", this.u, this.t));
this.f1958c.setChecked(false);
} else {
c.a = "FinAuthZFAC";
b5.a(c.a.a.a("agree_credit_agreement", this.u, this.t));
this.f1958c.setChecked(true);
}
}
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(m4.f(this).I2 ? R.layout.face_liveness_guide_activity_landscape : R.layout.face_liveness_guide_activity);
if (b.a) {
this.w = e1.a.a;
} else {
this.w = a1.a.a;
}
boolean z2 = m4.f(this).R2;
int i2 = m4.f(this).E2;
if (z2 && i2 == 0) {
getWindow().addFlags(8192);
}
this.x = this.w.a.c;
this.y = m4.f(this).O2;
this.u = m4.a(this);
this.t = m4.f(this).a;
n2 n2Var = this.w.a;
this.v = n2Var.b;
m4.a(this, this.x, n2Var.d);
c.a = "FinAuthZFAC";
b5.a(c.a.a.a("enter_guide_page", this.u, this.t));
this.f1969n = (RelativeLayout) findViewById(R.id.rl_face_liveness_guide_main);
ImageView imageView = (ImageView) findViewById(R.id.img_bar_left);
this.f1973r = imageView;
imageView.setImageDrawable(m4.b(this, y4.a(this).b(getResources().getString(R.string.key_liveness_home_back_highlight)), y4.a(this).b(getResources().getString(R.string.key_liveness_home_back_normal))));
TextView textView = (TextView) findViewById(R.id.tv_face_liveness_guide_title);
this.f1968m = textView;
textView.setText(getResources().getString(y4.a(this).d(getString(R.string.key_liveness_home_agreementpage_top_title_text))));
this.f1968m.setTextSize(0, getResources().getDimension(R.dimen.face_liveness_home_agreementpage_title_text_size));
CheckBox checkBox = (CheckBox) findViewById(R.id.cb_face_liveness_user_agreement);
this.f1957b = checkBox;
y4 a2 = y4.a(this);
Resources resources = getResources();
int i3 = R.string.key_liveness_agreement_selected;
int b2 = a2.b(resources.getString(i3));
y4 a3 = y4.a(this);
Resources resources2 = getResources();
int i4 = R.string.key_liveness_agreement_noselected;
checkBox.setBackground(m4.a(this, b2, a3.b(resources2.getString(i4))));
CheckBox checkBox2 = (CheckBox) findViewById(R.id.cb_face_liveness_user_credit);
this.f1958c = checkBox2;
checkBox2.setBackground(m4.a(this, y4.a(this).b(getResources().getString(i3)), y4.a(this).b(getResources().getString(i4))));
Button button = (Button) findViewById(R.id.bt_face_liveness_begin_detect);
this.f1956a = button;
button.setOnClickListener(this);
this.f1956a.setText(getResources().getString(y4.a(this).d(getString(R.string.key_liveness_home_agreementpage_bottom_button_title_text))));
Button button2 = this.f1956a;
y4 a4 = y4.a(this);
Resources resources3 = getResources();
int i5 = R.string.key_liveness_home_agreementpage_bottom_button_before_click_color;
int a5 = a4.a(resources3.getString(i5));
y4 a6 = y4.a(this);
Resources resources4 = getResources();
int i6 = R.string.key_liveness_home_agreementpage_bottom_button_after_click_color;
int a7 = a6.a(resources4.getString(i6));
int a8 = a5.a(this, 40.0f);
StateListDrawable stateListDrawable = new StateListDrawable();
int[] iArr = {android.R.attr.state_pressed};
int color = getResources().getColor(a7);
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setShape(0);
float f2 = a8;
gradientDrawable.setCornerRadius(f2);
gradientDrawable.setColor(color);
stateListDrawable.addState(iArr, gradientDrawable);
int color2 = getResources().getColor(a5);
GradientDrawable gradientDrawable2 = new GradientDrawable();
gradientDrawable2.setShape(0);
gradientDrawable2.setCornerRadius(f2);
gradientDrawable2.setColor(color2);
stateListDrawable.addState(new int[0], gradientDrawable2);
button2.setBackground(stateListDrawable);
LinearLayout linearLayout = (LinearLayout) findViewById(R.id.linearlayout_checkbox_hot_area);
this.f1959d = linearLayout;
linearLayout.setOnClickListener(this);
LinearLayout linearLayout2 = (LinearLayout) findViewById(R.id.linearlayout_checkbox_hot_area_credit);
this.f1960e = linearLayout2;
linearLayout2.setOnClickListener(this);
this.f1965j = (LinearLayout) findViewById(R.id.ll_face_liveness_agreement);
this.f1966k = (LinearLayout) findViewById(R.id.ll_face_liveness_credit);
boolean z3 = m4.f(getApplicationContext()).r2;
String str = m4.f(getApplicationContext()).q2;
if (z3) {
this.f1965j.setVisibility(0);
} else {
this.f1965j.setVisibility(8);
}
if (TextUtils.isEmpty(str)) {
this.f1966k.setVisibility(8);
} else {
this.f1966k.setVisibility(0);
}
TextView textView2 = (TextView) findViewById(R.id.tv_user_agreement_link);
this.f1961f = textView2;
textView2.setText(getResources().getString(y4.a(this).d(getString(R.string.key_liveness_home_agreement_text))));
this.f1961f.setTextColor(getResources().getColor(y4.a(this).a(getResources().getString(i5))));
this.f1961f.setHighlightColor(getResources().getColor(android.R.color.transparent));
this.f1961f.setOnTouchListener(new i0(this));
TextView textView3 = (TextView) findViewById(R.id.tv_user_credit_link);
this.f1962g = textView3;
textView3.setText(getResources().getString(y4.a(this).d(getString(R.string.key_liveness_home_credit_text))));
this.f1962g.setTextColor(getResources().getColor(y4.a(this).a(getResources().getString(i5))));
this.f1962g.setHighlightColor(getResources().getColor(android.R.color.transparent));
this.f1962g.setOnTouchListener(new j0(this));
LinearLayout linearLayout3 = (LinearLayout) findViewById(R.id.ll_bar_left);
this.f1963h = linearLayout3;
linearLayout3.setOnClickListener(this);
TextView textView4 = (TextView) findViewById(R.id.tv_bar_title);
this.f1964i = textView4;
textView4.setOnClickListener(this);
this.f1964i.setTextColor(new ColorStateList(new int[][]{new int[]{android.R.attr.state_pressed}, new int[0]}, new int[]{getResources().getColor(y4.a(this).a(getResources().getString(i6))), getResources().getColor(y4.a(this).a(getResources().getString(i5)))}));
TextView textView5 = (TextView) findViewById(R.id.tv_face_liveness_guide_tips);
this.f1967l = textView5;
textView5.setText(getResources().getString(y4.a(this).d(getString(R.string.key_liveness_home_agreementpage_bottom_title_text))));
this.f1967l.setTextSize(0, getResources().getDimension(R.dimen.face_liveness_home_agreementpage_bottom_title_text_size));
this.f1970o = (RelativeLayout) findViewById(R.id.rl_face_liveness_image);
ImageView imageView2 = (ImageView) findViewById(R.id.iv_face_liveness_image);
this.f1971p = imageView2;
imageView2.setImageDrawable(getResources().getDrawable(y4.a(this).b(getResources().getString(R.string.key_agreement_image_center))));
this.f1957b.setChecked(false);
this.f1958c.setChecked(false);
ImageView imageView3 = (ImageView) findViewById(R.id.iv_face_powerby);
this.f1972q = imageView3;
if (this.y) {
imageView3.setVisibility(0);
this.f1972q.setImageDrawable(getResources().getDrawable(y4.a(this).b(getResources().getString(R.string.key_liveness_logo_icon))));
} else {
imageView3.setVisibility(8);
}
this.f1974s = new d5(getApplicationContext());
setRequestedOrientation(!m4.f(this).I2 ? 1 : 0);
}
@Override
public void onDestroy() {
super.onDestroy();
if (d5.a != null) {
d5.a = null;
}
this.f1974s = null;
}
@Override
public boolean onKeyDown(int i2, KeyEvent keyEvent) {
if (i2 != 4) {
return super.onKeyDown(i2, keyEvent);
}
a();
return true;
}
@Override
@SensorsDataInstrumented
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
PushAutoTrackHelper.onNewIntent(this, intent);
}
@Override
public void onResume() {
super.onResume();
this.f1956a.post(new h0(this));
d.a(this);
}
}