热汗舞蹈 v1.24.1.0版本的 MD5 值为:f1dc6ef07903515a73f51f41f372123e
以下内容为反编译后的 LoginAuthActivity.java 源代码,内容仅作参考
package cc.quicklogin.sdk.open;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import cc.quicklogin.common.d.b;
import cc.quicklogin.common.d.e;
import cc.quicklogin.sdk.R;
import cc.quicklogin.sdk.g.a;
import cc.quicklogin.sdk.g.c;
import cc.quicklogin.sdk.g.d;
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.List;
import java.util.Locale;
public class LoginAuthActivity extends Activity {
public static final int LOGIN_HEIGHT_DEFAULT = 48;
public static final int LOGIN_TEXT_SIZE_DEFAULT = 16;
public static final int LOGO_PADDING_DEFAULT = 0;
public static final int NAV_CLOSE_PADDING_DEFAULT = 12;
public static final int NOT_SETTING_VALUE = Integer.MIN_VALUE;
public static final int NUMBER_SIZE_DEFAULT = 22;
public static final int OTHER_TEXT_SIZE_DEFAULT = 14;
public static final int PRIVACY_TEXT_SIZE_DEFAULT = 11;
public static final int SLOGAN_TEXT_SIZE_DEFAULT = 12;
private BroadcastReceiver broadcastReceiver;
private RelativeLayout contentView;
private String mobile;
private String operator = "中国联通";
private String operatorPrivacyName = "联通统一认证服务条款";
private String operatorPrivacyUrl = "https://opencloud.wostore.cn/authz/resource/html/disclaimer.html?fromsdk=true";
private RelativeLayout progressView;
private RelativeLayout rootView;
private ScrollView scrollView;
public void cancelByUser() {
Intent intent = new Intent();
intent.setAction("cc.bitlib.quicklogin.MAIN_ACTION");
intent.putExtra("code", 50102);
d.a(a.a().c()).a(intent);
}
private void colorSameError() {
Intent intent = new Intent();
intent.setAction("cc.bitlib.quicklogin.MAIN_ACTION");
intent.putExtra("code", 50107);
d.a(a.a().c()).a(intent);
}
private int convertDpToPixels(Context context, int i10, int i11) {
return b.a(getApplicationContext()).a(context, i10 == Integer.MIN_VALUE ? i11 : i10);
}
private int convertWidthHeight(Context context, int i10, int i11, boolean z10, float f10) {
if (i10 == Integer.MIN_VALUE) {
if (i11 != Integer.MIN_VALUE) {
return b.a(getApplicationContext()).a(context, formatValueWithOrientation(z10, i11, f10));
}
} else if (i10 != -1) {
if (i10 == -2) {
return -2;
}
return b.a(getApplicationContext()).a(context, i10);
}
return -1;
}
private int formatValueWithOrientation(boolean z10, int i10, float f10) {
return z10 ? (int) (i10 * f10) : i10;
}
private int getStatusBarHeight() {
int identifier;
if (a.a().b().isDialog() || (identifier = getApplicationContext().getResources().getIdentifier("status_bar_height", "dimen", "android")) <= 0) {
return 0;
}
return getApplicationContext().getResources().getDimensionPixelSize(identifier);
}
private void initContentView(boolean z10) {
int i10;
b a10;
RelativeLayout.LayoutParams layoutParams;
int i11;
int numberSize;
int sloganSize;
RelativeLayout.LayoutParams layoutParams2;
RelativeLayout relativeLayout;
View view;
int logBtnTextSize;
int switchTextSize;
int i12;
int i13;
String str;
String str2;
String fourthDecorator;
ViewGroup.LayoutParams layoutParams3;
String str3;
int privacyTextSize;
List<cc.quicklogin.sdk.g.b> customViewList;
int i14;
int convertDpToPixels;
int convertDpToPixels2;
int navBackOffsetX;
int navBackOffsetRightX;
int navBackOffsetBottomY;
int i15;
initDialog();
final AuthUIConfig b10 = a.a().b();
if (e.a(this, b10.getNumberColor()) == e.a(this, b10.getBackgroundColor()) || e.a(this, b10.getSloganTextColor()) == e.a(this, b10.getBackgroundColor()) || e.a(this, b10.getPrivacyColor()) == e.a(this, b10.getBackgroundColor()) || e.a(this, b10.getBaseColor()) == e.a(this, b10.getBackgroundColor())) {
colorSameError();
finish();
}
RelativeLayout relativeLayout2 = this.rootView;
if (relativeLayout2 == null) {
this.rootView = new RelativeLayout(this);
} else {
relativeLayout2.removeAllViews();
}
if (b10.getBackgroundImgDrawable() != null) {
this.rootView.setBackground(b10.getBackgroundImgDrawable());
} else if (TextUtils.isEmpty(b10.getBackgroundImgPath())) {
this.rootView.setBackgroundColor(e.a(this, b10.getBackgroundColor()));
} else {
this.rootView.setBackgroundResource(getResources().getIdentifier(b10.getBackgroundImgPath(), "drawable", getPackageName()));
}
ViewGroup.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(-1, -1);
setStatusBarColor(b10.getStatusBarColor());
setNavigationBarColor(b10);
RelativeLayout relativeLayout3 = new RelativeLayout(this);
relativeLayout3.setId(R.id.quick_login_toolbar_view);
RelativeLayout.LayoutParams layoutParams5 = new RelativeLayout.LayoutParams(-1, b.a(getApplicationContext()).a(this, 48.0f));
layoutParams5.setMargins(0, getStatusBarHeight(), 0, 0);
relativeLayout3.setBackgroundColor(b10.isNavTransparent() ? 0 : e.a(this, b10.getNavColor()));
TextView textView = new TextView(this);
RelativeLayout.LayoutParams layoutParams6 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams6.addRule(13);
textView.setText(b10.getNavText());
textView.setTextSize(b10.getNavTextSize());
textView.setTextColor(e.a(this, b10.getNavTextColor()));
ImageView imageView = new ImageView(this);
RelativeLayout.LayoutParams layoutParams7 = new RelativeLayout.LayoutParams(convertDpToPixels(this, b10.getNavBackWidth(), -2), convertDpToPixels(this, b10.getNavBackHeight(), -2));
if (b10.getNavBackImgDrawable() != null) {
imageView.setImageDrawable(b10.getNavBackImgDrawable());
} else {
String navBackImgPath = b10.getNavBackImgPath();
if (b10.isDialog() && TextUtils.equals(navBackImgPath, "quick_login_back")) {
navBackImgPath = "quick_login_back";
}
imageView.setImageResource(getResources().getIdentifier(navBackImgPath, "drawable", getPackageName()));
}
imageView.setVisibility(b10.isNavBackHidden() ? 8 : 0);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
LoginAuthActivity.this.cancelByUser();
LoginAuthActivity.this.finish();
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
});
relativeLayout3.addView(textView, layoutParams6);
relativeLayout3.setVisibility(b10.isNavHidden() ? 8 : 0);
ScrollView scrollView = this.scrollView;
if (scrollView == null) {
ScrollView scrollView2 = new ScrollView(this);
this.scrollView = scrollView2;
scrollView2.setVerticalScrollBarEnabled(false);
} else {
scrollView.removeAllViews();
}
this.scrollView.setFillViewport(true);
RelativeLayout.LayoutParams layoutParams8 = new RelativeLayout.LayoutParams(-1, -1);
RelativeLayout relativeLayout4 = this.contentView;
if (relativeLayout4 == null) {
this.contentView = new RelativeLayout(this);
} else {
relativeLayout4.removeAllViews();
}
RelativeLayout relativeLayout5 = new RelativeLayout(this);
relativeLayout5.setId(R.id.quick_login_logo_view);
RelativeLayout.LayoutParams layoutParams9 = new RelativeLayout.LayoutParams(-2, -2);
int logoPaddingTop = b10.getLogoPaddingTop();
if (logoPaddingTop == Integer.MIN_VALUE) {
logoPaddingTop = formatValueWithOrientation(z10, 0, 0.5f);
}
int logoPaddingBottom = b10.getLogoPaddingBottom();
if (logoPaddingBottom == Integer.MIN_VALUE) {
logoPaddingBottom = formatValueWithOrientation(z10, 0, 0.5f);
}
relativeLayout5.setPadding(0, b.a(getApplicationContext()).a(this, logoPaddingTop), 0, b.a(getApplicationContext()).a(this, logoPaddingBottom));
ImageView imageView2 = new ImageView(this);
float f10 = 60.0f;
int a11 = b10.getLogoWidth() > 0 ? b.a(getApplicationContext()).a(this, b10.getLogoWidth()) : z10 ? b.a(getApplicationContext()).a(this, 60.0f) : -2;
if (b10.getLogoHeight() > 0) {
a10 = b.a(getApplicationContext());
f10 = b10.getLogoHeight();
} else if (!z10) {
i10 = -2;
RelativeLayout.LayoutParams layoutParams10 = new RelativeLayout.LayoutParams(a11, i10);
if (b10.getLogoImgDrawable() == null) {
imageView2.setImageDrawable(b10.getLogoImgDrawable());
} else if (!TextUtils.isEmpty(b10.getLogoImgPath())) {
imageView2.setImageResource(getResources().getIdentifier(b10.getLogoImgPath(), "drawable", getPackageName()));
}
imageView2.setVisibility(!b10.isLogoHidden() ? 8 : 0);
relativeLayout5.addView(imageView2, layoutParams10);
RelativeLayout relativeLayout6 = new RelativeLayout(this);
relativeLayout6.setId(R.id.quick_login_phone_view);
RelativeLayout.LayoutParams layoutParams11 = new RelativeLayout.LayoutParams(-2, -2);
TextView textView2 = new TextView(this);
int a12 = b10.getNumberWidth() <= 0 ? b.a(getApplicationContext()).a(this, b10.getNumberWidth()) : -2;
if (b10.getNumberHeight() <= 0) {
layoutParams = layoutParams9;
i11 = b.a(getApplicationContext()).a(this, b10.getNumberHeight());
} else {
layoutParams = layoutParams9;
i11 = -2;
}
RelativeLayout.LayoutParams layoutParams12 = new RelativeLayout.LayoutParams(a12, i11);
textView2.setText(this.mobile);
textView2.setTextColor(e.a(this, b10.getNumberColor()));
numberSize = b10.getNumberSize();
if (numberSize == Integer.MIN_VALUE) {
numberSize = formatValueWithOrientation(z10, 22, 0.75f);
}
textView2.setTextSize(numberSize);
relativeLayout6.addView(textView2, layoutParams12);
RelativeLayout relativeLayout7 = new RelativeLayout(this);
relativeLayout7.setId(R.id.quick_login_slogan_view);
RelativeLayout.LayoutParams layoutParams13 = new RelativeLayout.LayoutParams(-2, -2);
TextView textView3 = new TextView(this);
RelativeLayout.LayoutParams layoutParams14 = new RelativeLayout.LayoutParams(-2, -2);
textView3.setText(String.format("%s提供认证服务", this.operator));
textView3.setTextColor(e.a(this, b10.getSloganTextColor()));
sloganSize = b10.getSloganSize();
if (sloganSize != Integer.MIN_VALUE) {
layoutParams2 = layoutParams13;
sloganSize = formatValueWithOrientation(z10, 12, 0.75f);
} else {
layoutParams2 = layoutParams13;
}
textView3.setTextSize(sloganSize);
if (b10.getSloganPaintFlags() != null) {
textView3.setPaintFlags(textView3.getPaintFlags() | b10.getSloganPaintFlags().intValue());
}
relativeLayout7.addView(textView3, layoutParams14);
relativeLayout = this.progressView;
if (relativeLayout != null) {
this.progressView = new RelativeLayout(this);
} else {
relativeLayout.removeAllViews();
}
this.progressView.setId(R.id.quick_login_progress_view);
this.progressView.setVisibility(8);
this.progressView.bringToFront();
RelativeLayout.LayoutParams layoutParams15 = new RelativeLayout.LayoutParams(-1, -2);
RelativeLayout.LayoutParams layoutParams16 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams16.addRule(13);
if (b10.getLoadingView() != null) {
ProgressBar progressBar = new ProgressBar(this);
progressBar.setIndeterminateTintList(ColorStateList.valueOf(e.a(this, R.color.nav_bg)));
view = progressBar;
} else {
layoutParams15.addRule(13);
View loadingView = b10.getLoadingView();
ViewParent parent = loadingView.getParent();
view = loadingView;
if (parent != null) {
((RelativeLayout) loadingView.getParent()).removeView(loadingView);
view = loadingView;
}
}
this.progressView.addView(view, layoutParams16);
RelativeLayout relativeLayout8 = new RelativeLayout(this);
relativeLayout8.setId(R.id.quick_login_login_view);
RelativeLayout.LayoutParams layoutParams17 = layoutParams;
RelativeLayout.LayoutParams layoutParams18 = layoutParams2;
RelativeLayout.LayoutParams layoutParams19 = new RelativeLayout.LayoutParams(convertWidthHeight(this, b10.getLogBtnWidth(), Integer.MIN_VALUE, z10, 1.0f), convertWidthHeight(this, b10.getLogBtnHeight(), 48, z10, 0.85f));
final Button button = new Button(this);
button.setId(R.id.quick_login_login_btn);
RelativeLayout.LayoutParams layoutParams20 = new RelativeLayout.LayoutParams(-1, -1);
layoutParams20.addRule(13);
if (b10.getLogBtnBackgroundDrawable() == null) {
button.setBackground(b10.getLogBtnBackgroundDrawable());
} else {
button.setBackgroundResource(getResources().getIdentifier(b10.getLogBtnBackgroundPath(), "drawable", getPackageName()));
}
button.setText(b10.getLogBtnText());
logBtnTextSize = b10.getLogBtnTextSize();
if (logBtnTextSize == Integer.MIN_VALUE) {
logBtnTextSize = formatValueWithOrientation(z10, 16, 0.75f);
}
button.setTextSize(logBtnTextSize);
button.setTextColor(e.a(this, b10.getLogBtnTextColor()));
button.setOnClickListener(new View.OnClickListener() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (!b.a(LoginAuthActivity.this.getApplicationContext()).m()) {
LoginAuthActivity.this.simCardError();
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
return;
}
if (((CheckBox) LoginAuthActivity.this.findViewById(R.id.quick_login_privacy_checkbox)).isChecked()) {
button.setEnabled(false);
if (b10.getLoginClicker() != null) {
b10.getLoginClicker().onClick(view2);
}
Intent intent = new Intent();
intent.setAction("cc.bitlib.quicklogin.MAIN_ACTION");
intent.putExtra("code", 50104);
d.a(a.a().c()).a(intent);
} else {
Toast makeText = Toast.makeText(a.a().c(), "请先同意条款", 0);
makeText.setDuration(b10.getToastDuration().intValue() != 0 ? 1 : 0);
if (b10.getToastGravity() != null) {
makeText.setGravity(b10.getToastGravity().intValue(), b10.getToastXOffset().intValue(), b10.getToastYOffset().intValue());
}
if (b10.getToastHorizontalMargin() != null) {
makeText.setMargin(b10.getToastHorizontalMargin().floatValue(), b10.getToastVerticalMargin().floatValue());
}
makeText.setText(b10.getUncheckToastText());
makeText.show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
});
relativeLayout8.addView(button, layoutParams20);
RelativeLayout relativeLayout9 = new RelativeLayout(this);
relativeLayout9.setId(R.id.quick_login_other_view);
RelativeLayout.LayoutParams layoutParams21 = new RelativeLayout.LayoutParams(-2, -2);
final TextView textView4 = new TextView(this);
RelativeLayout.LayoutParams layoutParams22 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams22.addRule(14);
textView4.setText(b10.getSwitchText());
textView4.setTextColor(e.a(this, b10.getSwitchTextColor()));
textView4.setOnClickListener(new View.OnClickListener() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.getSwitchClicker() != null) {
b10.getSwitchClicker().onClick(textView4);
}
Intent intent = new Intent();
intent.setAction("cc.bitlib.quicklogin.MAIN_ACTION");
intent.putExtra("code", 50103);
d.a(a.a().c()).a(intent);
LoginAuthActivity.this.finish();
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
});
switchTextSize = b10.getSwitchTextSize();
if (switchTextSize != Integer.MIN_VALUE) {
switchTextSize = formatValueWithOrientation(z10, 14, 0.75f);
}
textView4.setTextSize(switchTextSize);
textView4.setVisibility(!b10.isSwitchHidden() ? 8 : 0);
relativeLayout9.addView(textView4, layoutParams22);
RelativeLayout relativeLayout10 = new RelativeLayout(this);
relativeLayout10.setId(R.id.quick_login_privacy_view);
RelativeLayout.LayoutParams layoutParams23 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams23.addRule(14);
CheckBox checkBox = new CheckBox(this);
checkBox.setId(R.id.quick_login_privacy_checkbox);
checkBox.setButtonDrawable(e.b(a.a().c(), getResources().getIdentifier(b10.getCheckboxDrawable(), "drawable", getPackageName())));
RelativeLayout.LayoutParams layoutParams24 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams24.addRule(6, R.id.quick_login_privacy_textview);
if (b10.isCheckboxCenter()) {
i12 = 8;
} else {
i12 = 8;
layoutParams24.addRule(8, R.id.quick_login_privacy_textview);
}
if (b10.isCheckboxHidden()) {
i13 = 1;
checkBox.setVisibility(0);
checkBox.setChecked(b10.isCheckboxChecked());
} else {
i13 = 1;
checkBox.setChecked(true);
checkBox.setVisibility(i12);
}
TextView textView5 = new TextView(this);
textView5.setId(R.id.quick_login_privacy_textview);
textView5.setTextSize(10.0f);
textView5.setGravity(i13);
textView5.setPadding(b.a(getApplicationContext()).a(this, 2.0f), 0, 0, 0);
RelativeLayout.LayoutParams layoutParams25 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams25.addRule(1, R.id.quick_login_privacy_checkbox);
String str4 = "《" + this.operatorPrivacyName + "》";
str = "《" + b10.getPrivacyOneName() + "》";
str2 = "《" + b10.getPrivacyTwoName() + "》";
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
String firstDecorator = b10.getFirstDecorator();
String secondDecorator = b10.getSecondDecorator();
String thirdDecorator = b10.getThirdDecorator();
fourthDecorator = b10.getFourthDecorator();
if (str.length() <= 2) {
str3 = secondDecorator + str;
layoutParams3 = layoutParams25;
} else {
layoutParams3 = layoutParams25;
str3 = "";
}
String str5 = str2.length() > 2 ? thirdDecorator + str2 : "";
if (TextUtils.isEmpty(fourthDecorator)) {
fourthDecorator = "并授权" + b.a(getApplicationContext().getApplicationContext()).i() + "获取本机号码";
}
spannableStringBuilder.append((CharSequence) firstDecorator).append((CharSequence) str4).append((CharSequence) str3).append((CharSequence) str5).append((CharSequence) fourthDecorator);
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.isShowByApp()) {
if (b10.getOperatorPrivacyClicker() == null) {
if (!TextUtils.isEmpty(LoginAuthActivity.this.operatorPrivacyUrl)) {
LoginAuthActivity loginAuthActivity = LoginAuthActivity.this;
new c(loginAuthActivity, loginAuthActivity.operatorPrivacyUrl, b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
}
b10.getOperatorPrivacyClicker().onClick(view2, LoginAuthActivity.this.operatorPrivacyUrl);
} else if (!TextUtils.isEmpty(LoginAuthActivity.this.operatorPrivacyUrl)) {
LoginAuthActivity loginAuthActivity2 = LoginAuthActivity.this;
new c(loginAuthActivity2, loginAuthActivity2.operatorPrivacyUrl, b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setColor(e.a(LoginAuthActivity.this, b10.getPrivacyColor()));
textPaint.setUnderlineText(false);
}
};
ClickableSpan clickableSpan2 = new ClickableSpan() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.getAppPrivacyOneClicker() != null) {
b10.getAppPrivacyOneClicker().onClick(view2, b10.getPrivacyOneUrl());
} else if (!TextUtils.isEmpty(b10.getPrivacyOneUrl())) {
new c(LoginAuthActivity.this, b10.getPrivacyOneUrl(), b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setColor(e.a(LoginAuthActivity.this, b10.getPrivacyColor()));
textPaint.setUnderlineText(false);
}
};
ClickableSpan clickableSpan3 = new ClickableSpan() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.getAppPrivacyTwoClicker() != null) {
b10.getAppPrivacyTwoClicker().onClick(view2, b10.getPrivacyTwoUrl());
} else if (!TextUtils.isEmpty(b10.getPrivacyTwoUrl())) {
new c(LoginAuthActivity.this, b10.getPrivacyTwoUrl(), b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setColor(e.a(LoginAuthActivity.this, b10.getPrivacyColor()));
textPaint.setUnderlineText(false);
}
};
int length = firstDecorator.length();
int length2 = firstDecorator.length() + str4.length();
int length3 = firstDecorator.length() + secondDecorator.length() + str4.length();
int length4 = firstDecorator.length() + str4.length() + str3.length();
int length5 = firstDecorator.length() + secondDecorator.length() + str4.length() + str3.length();
int length6 = firstDecorator.length() + str4.length() + str3.length() + str5.length();
ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(e.a(this, b10.getPrivacyColor()));
if (str2.length() > 2) {
spannableStringBuilder.setSpan(clickableSpan3, length5, length6, 33);
spannableStringBuilder.setSpan(foregroundColorSpan, length5, length6, 33);
}
if (str.length() > 2) {
spannableStringBuilder.setSpan(clickableSpan2, length3, length4, 33);
spannableStringBuilder.setSpan(foregroundColorSpan, length3, length4, 33);
}
spannableStringBuilder.setSpan(clickableSpan, length, length2, 33);
spannableStringBuilder.setSpan(foregroundColorSpan, length, length2, 33);
textView5.setText(spannableStringBuilder);
textView5.setTextColor(e.a(this, b10.getBaseColor()));
textView5.setHighlightColor(getResources().getColor(17170445));
textView5.setMovementMethod(LinkMovementMethod.getInstance());
textView5.setText(spannableStringBuilder);
if (b10.isPrivacyGravityLeft()) {
textView5.setGravity(3);
}
privacyTextSize = b10.getPrivacyTextSize();
if (privacyTextSize == Integer.MIN_VALUE) {
privacyTextSize = 11;
}
textView5.setTextSize(privacyTextSize);
relativeLayout10.addView(checkBox, layoutParams24);
relativeLayout10.addView(textView5, layoutParams3);
this.contentView.addView(relativeLayout5, layoutParams17);
this.contentView.addView(relativeLayout6, layoutParams11);
this.contentView.addView(relativeLayout7, layoutParams18);
this.contentView.addView(relativeLayout8, layoutParams19);
this.contentView.addView(relativeLayout9, layoutParams21);
this.contentView.addView(relativeLayout10, layoutParams23);
addView(this, relativeLayout5, convertDpToPixels(this, b10.getLogoWidth(), -2), convertDpToPixels(this, b10.getLogBtnHeight(), -2), b10.getLogoOffsetX(), b10.getLogoOffsetY(), b10.getLogoOffsetRightX(), b10.getLogoOffsetBottomY());
addView(this, relativeLayout6, convertDpToPixels(this, b10.getNumberWidth(), -2), convertDpToPixels(this, b10.getNumberHeight(), -2), b10.getNumberOffsetX(), b10.getNumberOffsetY(), b10.getNumberOffsetRightX(), b10.getNumberOffsetBottomY());
addView(this, relativeLayout7, convertDpToPixels(this, Integer.MIN_VALUE, -2), convertDpToPixels(this, Integer.MIN_VALUE, -2), b10.getSloganOffsetX(), b10.getSloganOffsetY(), b10.getSloganOffsetRightX(), b10.getSloganOffsetBottomY());
addView(this, relativeLayout8, convertDpToPixels(this, b10.getLogBtnWidth(), -2), convertDpToPixels(this, b10.getLogBtnHeight(), -2), b10.getLogBtnOffsetX(), b10.getLogBtnOffsetY(), b10.getLogBtnOffsetRightX(), b10.getLogBtnOffsetBottomY());
addView(this, relativeLayout9, convertDpToPixels(this, Integer.MIN_VALUE, -2), convertDpToPixels(this, Integer.MIN_VALUE, -2), b10.getSwitchOffsetX(), b10.getSwitchOffsetY(), b10.getSwitchOffsetRightX(), b10.getSwitchOffsetBottomY());
addView(this, relativeLayout10, -2, -2, b10.getPrivacyOffsetX(), b10.getPrivacyOffsetY(), b10.getPrivacyOffsetRightX(), b10.getPrivacyOffsetBottomY());
customViewList = b10.getCustomViewList();
if (customViewList != null && customViewList.size() > 0) {
for (i15 = 0; i15 < customViewList.size(); i15++) {
cc.quicklogin.sdk.g.b bVar = customViewList.get(i15);
View a13 = bVar.a();
if (a13.getParent() != null) {
((RelativeLayout) a13.getParent()).removeView(a13);
}
final View.OnClickListener b11 = bVar.b();
a13.setOnClickListener(new View.OnClickListener() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
View.OnClickListener onClickListener = b11;
if (onClickListener != null) {
onClickListener.onClick(view2);
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
});
this.contentView.addView(a13);
}
}
this.contentView.addView(this.progressView, layoutParams15);
if (b10.getLoadingView() == null) {
layoutParams15.addRule(6, R.id.quick_login_login_view);
layoutParams15.addRule(8, R.id.quick_login_login_view);
}
this.scrollView.addView(this.contentView);
this.rootView.addView(this.scrollView, layoutParams8);
this.rootView.addView(relativeLayout3, layoutParams5);
this.rootView.addView(imageView, layoutParams7);
if (!b10.isDialog() && b10.getNavBackOffsetX() == Integer.MIN_VALUE && b10.getNavBackOffsetY() == Integer.MIN_VALUE && b10.getNavBackOffsetRightX() == Integer.MIN_VALUE && b10.getNavBackOffsetBottomY() == Integer.MIN_VALUE) {
convertDpToPixels = convertDpToPixels(this, b10.getNavBackWidth(), -2);
convertDpToPixels2 = convertDpToPixels(this, b10.getNavBackWidth(), -2);
navBackOffsetX = Integer.MIN_VALUE;
i14 = 12;
navBackOffsetRightX = 12;
navBackOffsetBottomY = Integer.MIN_VALUE;
} else {
int navBackOffsetY = b10.getNavBackOffsetY();
if (!b10.isDialog()) {
navBackOffsetY += b.a(getApplicationContext()).b(this, getStatusBarHeight());
}
i14 = navBackOffsetY;
convertDpToPixels = convertDpToPixels(this, b10.getNavBackWidth(), -2);
convertDpToPixels2 = convertDpToPixels(this, b10.getNavBackWidth(), -2);
navBackOffsetX = b10.getNavBackOffsetX();
navBackOffsetRightX = b10.getNavBackOffsetRightX();
navBackOffsetBottomY = b10.getNavBackOffsetBottomY();
}
addView(this, imageView, convertDpToPixels, convertDpToPixels2, navBackOffsetX, i14, navBackOffsetRightX, navBackOffsetBottomY);
layoutParams8.addRule(3, R.id.quick_login_toolbar_view);
setContentView(this.rootView, layoutParams4);
} else {
a10 = b.a(getApplicationContext());
}
i10 = a10.a(this, f10);
RelativeLayout.LayoutParams layoutParams102 = new RelativeLayout.LayoutParams(a11, i10);
if (b10.getLogoImgDrawable() == null) {
}
imageView2.setVisibility(!b10.isLogoHidden() ? 8 : 0);
relativeLayout5.addView(imageView2, layoutParams102);
RelativeLayout relativeLayout62 = new RelativeLayout(this);
relativeLayout62.setId(R.id.quick_login_phone_view);
RelativeLayout.LayoutParams layoutParams112 = new RelativeLayout.LayoutParams(-2, -2);
TextView textView22 = new TextView(this);
if (b10.getNumberWidth() <= 0) {
}
if (b10.getNumberHeight() <= 0) {
}
RelativeLayout.LayoutParams layoutParams122 = new RelativeLayout.LayoutParams(a12, i11);
textView22.setText(this.mobile);
textView22.setTextColor(e.a(this, b10.getNumberColor()));
numberSize = b10.getNumberSize();
if (numberSize == Integer.MIN_VALUE) {
}
textView22.setTextSize(numberSize);
relativeLayout62.addView(textView22, layoutParams122);
RelativeLayout relativeLayout72 = new RelativeLayout(this);
relativeLayout72.setId(R.id.quick_login_slogan_view);
RelativeLayout.LayoutParams layoutParams132 = new RelativeLayout.LayoutParams(-2, -2);
TextView textView32 = new TextView(this);
RelativeLayout.LayoutParams layoutParams142 = new RelativeLayout.LayoutParams(-2, -2);
textView32.setText(String.format("%s提供认证服务", this.operator));
textView32.setTextColor(e.a(this, b10.getSloganTextColor()));
sloganSize = b10.getSloganSize();
if (sloganSize != Integer.MIN_VALUE) {
}
textView32.setTextSize(sloganSize);
if (b10.getSloganPaintFlags() != null) {
}
relativeLayout72.addView(textView32, layoutParams142);
relativeLayout = this.progressView;
if (relativeLayout != null) {
}
this.progressView.setId(R.id.quick_login_progress_view);
this.progressView.setVisibility(8);
this.progressView.bringToFront();
RelativeLayout.LayoutParams layoutParams152 = new RelativeLayout.LayoutParams(-1, -2);
RelativeLayout.LayoutParams layoutParams162 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams162.addRule(13);
if (b10.getLoadingView() != null) {
}
this.progressView.addView(view, layoutParams162);
RelativeLayout relativeLayout82 = new RelativeLayout(this);
relativeLayout82.setId(R.id.quick_login_login_view);
RelativeLayout.LayoutParams layoutParams172 = layoutParams;
RelativeLayout.LayoutParams layoutParams182 = layoutParams2;
RelativeLayout.LayoutParams layoutParams192 = new RelativeLayout.LayoutParams(convertWidthHeight(this, b10.getLogBtnWidth(), Integer.MIN_VALUE, z10, 1.0f), convertWidthHeight(this, b10.getLogBtnHeight(), 48, z10, 0.85f));
final Button button2 = new Button(this);
button2.setId(R.id.quick_login_login_btn);
RelativeLayout.LayoutParams layoutParams202 = new RelativeLayout.LayoutParams(-1, -1);
layoutParams202.addRule(13);
if (b10.getLogBtnBackgroundDrawable() == null) {
}
button2.setText(b10.getLogBtnText());
logBtnTextSize = b10.getLogBtnTextSize();
if (logBtnTextSize == Integer.MIN_VALUE) {
}
button2.setTextSize(logBtnTextSize);
button2.setTextColor(e.a(this, b10.getLogBtnTextColor()));
button2.setOnClickListener(new View.OnClickListener() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (!b.a(LoginAuthActivity.this.getApplicationContext()).m()) {
LoginAuthActivity.this.simCardError();
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
return;
}
if (((CheckBox) LoginAuthActivity.this.findViewById(R.id.quick_login_privacy_checkbox)).isChecked()) {
button2.setEnabled(false);
if (b10.getLoginClicker() != null) {
b10.getLoginClicker().onClick(view2);
}
Intent intent = new Intent();
intent.setAction("cc.bitlib.quicklogin.MAIN_ACTION");
intent.putExtra("code", 50104);
d.a(a.a().c()).a(intent);
} else {
Toast makeText = Toast.makeText(a.a().c(), "请先同意条款", 0);
makeText.setDuration(b10.getToastDuration().intValue() != 0 ? 1 : 0);
if (b10.getToastGravity() != null) {
makeText.setGravity(b10.getToastGravity().intValue(), b10.getToastXOffset().intValue(), b10.getToastYOffset().intValue());
}
if (b10.getToastHorizontalMargin() != null) {
makeText.setMargin(b10.getToastHorizontalMargin().floatValue(), b10.getToastVerticalMargin().floatValue());
}
makeText.setText(b10.getUncheckToastText());
makeText.show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
});
relativeLayout82.addView(button2, layoutParams202);
RelativeLayout relativeLayout92 = new RelativeLayout(this);
relativeLayout92.setId(R.id.quick_login_other_view);
RelativeLayout.LayoutParams layoutParams212 = new RelativeLayout.LayoutParams(-2, -2);
final TextView textView42 = new TextView(this);
RelativeLayout.LayoutParams layoutParams222 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams222.addRule(14);
textView42.setText(b10.getSwitchText());
textView42.setTextColor(e.a(this, b10.getSwitchTextColor()));
textView42.setOnClickListener(new View.OnClickListener() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.getSwitchClicker() != null) {
b10.getSwitchClicker().onClick(textView42);
}
Intent intent = new Intent();
intent.setAction("cc.bitlib.quicklogin.MAIN_ACTION");
intent.putExtra("code", 50103);
d.a(a.a().c()).a(intent);
LoginAuthActivity.this.finish();
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
});
switchTextSize = b10.getSwitchTextSize();
if (switchTextSize != Integer.MIN_VALUE) {
}
textView42.setTextSize(switchTextSize);
textView42.setVisibility(!b10.isSwitchHidden() ? 8 : 0);
relativeLayout92.addView(textView42, layoutParams222);
RelativeLayout relativeLayout102 = new RelativeLayout(this);
relativeLayout102.setId(R.id.quick_login_privacy_view);
RelativeLayout.LayoutParams layoutParams232 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams232.addRule(14);
CheckBox checkBox2 = new CheckBox(this);
checkBox2.setId(R.id.quick_login_privacy_checkbox);
checkBox2.setButtonDrawable(e.b(a.a().c(), getResources().getIdentifier(b10.getCheckboxDrawable(), "drawable", getPackageName())));
RelativeLayout.LayoutParams layoutParams242 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams242.addRule(6, R.id.quick_login_privacy_textview);
if (b10.isCheckboxCenter()) {
}
if (b10.isCheckboxHidden()) {
}
TextView textView52 = new TextView(this);
textView52.setId(R.id.quick_login_privacy_textview);
textView52.setTextSize(10.0f);
textView52.setGravity(i13);
textView52.setPadding(b.a(getApplicationContext()).a(this, 2.0f), 0, 0, 0);
RelativeLayout.LayoutParams layoutParams252 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams252.addRule(1, R.id.quick_login_privacy_checkbox);
String str42 = "《" + this.operatorPrivacyName + "》";
str = "《" + b10.getPrivacyOneName() + "》";
str2 = "《" + b10.getPrivacyTwoName() + "》";
SpannableStringBuilder spannableStringBuilder2 = new SpannableStringBuilder();
String firstDecorator2 = b10.getFirstDecorator();
String secondDecorator2 = b10.getSecondDecorator();
String thirdDecorator2 = b10.getThirdDecorator();
fourthDecorator = b10.getFourthDecorator();
if (str.length() <= 2) {
}
if (str2.length() > 2) {
}
String str52 = str2.length() > 2 ? thirdDecorator2 + str2 : "";
if (TextUtils.isEmpty(fourthDecorator)) {
}
spannableStringBuilder2.append((CharSequence) firstDecorator2).append((CharSequence) str42).append((CharSequence) str3).append((CharSequence) str52).append((CharSequence) fourthDecorator);
ClickableSpan clickableSpan4 = new ClickableSpan() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.isShowByApp()) {
if (b10.getOperatorPrivacyClicker() == null) {
if (!TextUtils.isEmpty(LoginAuthActivity.this.operatorPrivacyUrl)) {
LoginAuthActivity loginAuthActivity = LoginAuthActivity.this;
new c(loginAuthActivity, loginAuthActivity.operatorPrivacyUrl, b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
}
b10.getOperatorPrivacyClicker().onClick(view2, LoginAuthActivity.this.operatorPrivacyUrl);
} else if (!TextUtils.isEmpty(LoginAuthActivity.this.operatorPrivacyUrl)) {
LoginAuthActivity loginAuthActivity2 = LoginAuthActivity.this;
new c(loginAuthActivity2, loginAuthActivity2.operatorPrivacyUrl, b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setColor(e.a(LoginAuthActivity.this, b10.getPrivacyColor()));
textPaint.setUnderlineText(false);
}
};
ClickableSpan clickableSpan22 = new ClickableSpan() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.getAppPrivacyOneClicker() != null) {
b10.getAppPrivacyOneClicker().onClick(view2, b10.getPrivacyOneUrl());
} else if (!TextUtils.isEmpty(b10.getPrivacyOneUrl())) {
new c(LoginAuthActivity.this, b10.getPrivacyOneUrl(), b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setColor(e.a(LoginAuthActivity.this, b10.getPrivacyColor()));
textPaint.setUnderlineText(false);
}
};
ClickableSpan clickableSpan32 = new ClickableSpan() {
@Override
@SensorsDataInstrumented
public void onClick(View view2) {
if (b10.getAppPrivacyTwoClicker() != null) {
b10.getAppPrivacyTwoClicker().onClick(view2, b10.getPrivacyTwoUrl());
} else if (!TextUtils.isEmpty(b10.getPrivacyTwoUrl())) {
new c(LoginAuthActivity.this, b10.getPrivacyTwoUrl(), b10.getNavColor(), b10.getNavBackImgPath(), b10.getNavBackImgDrawable(), b10.getNavTextColor()).show();
}
SensorsDataAutoTrackHelper.trackViewOnClick(view2);
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setColor(e.a(LoginAuthActivity.this, b10.getPrivacyColor()));
textPaint.setUnderlineText(false);
}
};
int length7 = firstDecorator2.length();
int length22 = firstDecorator2.length() + str42.length();
int length32 = firstDecorator2.length() + secondDecorator2.length() + str42.length();
int length42 = firstDecorator2.length() + str42.length() + str3.length();
int length52 = firstDecorator2.length() + secondDecorator2.length() + str42.length() + str3.length();
int length62 = firstDecorator2.length() + str42.length() + str3.length() + str52.length();
ForegroundColorSpan foregroundColorSpan2 = new ForegroundColorSpan(e.a(this, b10.getPrivacyColor()));
if (str2.length() > 2) {
}
if (str.length() > 2) {
}
spannableStringBuilder2.setSpan(clickableSpan4, length7, length22, 33);
spannableStringBuilder2.setSpan(foregroundColorSpan2, length7, length22, 33);
textView52.setText(spannableStringBuilder2);
textView52.setTextColor(e.a(this, b10.getBaseColor()));
textView52.setHighlightColor(getResources().getColor(17170445));
textView52.setMovementMethod(LinkMovementMethod.getInstance());
textView52.setText(spannableStringBuilder2);
if (b10.isPrivacyGravityLeft()) {
}
privacyTextSize = b10.getPrivacyTextSize();
if (privacyTextSize == Integer.MIN_VALUE) {
}
textView52.setTextSize(privacyTextSize);
relativeLayout102.addView(checkBox2, layoutParams242);
relativeLayout102.addView(textView52, layoutParams3);
this.contentView.addView(relativeLayout5, layoutParams172);
this.contentView.addView(relativeLayout62, layoutParams112);
this.contentView.addView(relativeLayout72, layoutParams182);
this.contentView.addView(relativeLayout82, layoutParams192);
this.contentView.addView(relativeLayout92, layoutParams212);
this.contentView.addView(relativeLayout102, layoutParams232);
addView(this, relativeLayout5, convertDpToPixels(this, b10.getLogoWidth(), -2), convertDpToPixels(this, b10.getLogBtnHeight(), -2), b10.getLogoOffsetX(), b10.getLogoOffsetY(), b10.getLogoOffsetRightX(), b10.getLogoOffsetBottomY());
addView(this, relativeLayout62, convertDpToPixels(this, b10.getNumberWidth(), -2), convertDpToPixels(this, b10.getNumberHeight(), -2), b10.getNumberOffsetX(), b10.getNumberOffsetY(), b10.getNumberOffsetRightX(), b10.getNumberOffsetBottomY());
addView(this, relativeLayout72, convertDpToPixels(this, Integer.MIN_VALUE, -2), convertDpToPixels(this, Integer.MIN_VALUE, -2), b10.getSloganOffsetX(), b10.getSloganOffsetY(), b10.getSloganOffsetRightX(), b10.getSloganOffsetBottomY());
addView(this, relativeLayout82, convertDpToPixels(this, b10.getLogBtnWidth(), -2), convertDpToPixels(this, b10.getLogBtnHeight(), -2), b10.getLogBtnOffsetX(), b10.getLogBtnOffsetY(), b10.getLogBtnOffsetRightX(), b10.getLogBtnOffsetBottomY());
addView(this, relativeLayout92, convertDpToPixels(this, Integer.MIN_VALUE, -2), convertDpToPixels(this, Integer.MIN_VALUE, -2), b10.getSwitchOffsetX(), b10.getSwitchOffsetY(), b10.getSwitchOffsetRightX(), b10.getSwitchOffsetBottomY());
addView(this, relativeLayout102, -2, -2, b10.getPrivacyOffsetX(), b10.getPrivacyOffsetY(), b10.getPrivacyOffsetRightX(), b10.getPrivacyOffsetBottomY());
customViewList = b10.getCustomViewList();
if (customViewList != null) {
while (i15 < customViewList.size()) {
}
}
this.contentView.addView(this.progressView, layoutParams152);
if (b10.getLoadingView() == null) {
}
this.scrollView.addView(this.contentView);
this.rootView.addView(this.scrollView, layoutParams8);
this.rootView.addView(relativeLayout3, layoutParams5);
this.rootView.addView(imageView, layoutParams7);
if (!b10.isDialog()) {
}
int navBackOffsetY2 = b10.getNavBackOffsetY();
if (!b10.isDialog()) {
}
i14 = navBackOffsetY2;
convertDpToPixels = convertDpToPixels(this, b10.getNavBackWidth(), -2);
convertDpToPixels2 = convertDpToPixels(this, b10.getNavBackWidth(), -2);
navBackOffsetX = b10.getNavBackOffsetX();
navBackOffsetRightX = b10.getNavBackOffsetRightX();
navBackOffsetBottomY = b10.getNavBackOffsetBottomY();
addView(this, imageView, convertDpToPixels, convertDpToPixels2, navBackOffsetX, i14, navBackOffsetRightX, navBackOffsetBottomY);
layoutParams8.addRule(3, R.id.quick_login_toolbar_view);
setContentView(this.rootView, layoutParams4);
}
public void initData(Intent intent) {
String str;
if (intent != null) {
this.mobile = intent.getStringExtra("mobile");
String stringExtra = intent.getStringExtra("operatorType");
if (OperatorType.CM.getName().equals(stringExtra.toLowerCase(Locale.getDefault()))) {
this.operator = "中国移动";
this.operatorPrivacyName = "中国移动认证服务条款";
str = "https://wap.cmpassport.com/resources/html/contract.html";
} else if (OperatorType.CU.getName().equals(stringExtra.toLowerCase(Locale.getDefault()))) {
this.operator = "中国联通";
this.operatorPrivacyName = "联通统一认证服务条款";
str = "https://opencloud.wostore.cn/authz/resource/html/disclaimer.html?fromsdk=true";
} else if (OperatorType.CT.getName().equals(stringExtra.toLowerCase(Locale.getDefault()))) {
this.operator = "中国电信";
this.operatorPrivacyName = "天翼账号服务与隐私协议";
str = "https://e.189.cn/sdk/agreement/detail.do?hidetop=true";
}
this.operatorPrivacyUrl = str;
}
if (TextUtils.isEmpty(this.mobile)) {
finish();
}
boolean z10 = true;
if (getRequestedOrientation() != 0 && getRequestedOrientation() != 8) {
WindowManager windowManager = getWindowManager();
DisplayMetrics displayMetrics = new DisplayMetrics();
windowManager.getDefaultDisplay().getMetrics(displayMetrics);
if (displayMetrics.widthPixels <= displayMetrics.heightPixels) {
z10 = false;
}
}
initContentView(z10);
}
private void initDialog() {
DisplayMetrics displayMetrics;
AuthUIConfig b10 = a.a().b();
if (b10.isDialog()) {
Window window = getWindow();
WindowManager.LayoutParams attributes = window.getAttributes();
WindowManager windowManager = getWindowManager();
windowManager.getDefaultDisplay().getMetrics(new DisplayMetrics());
int i10 = (int) (displayMetrics.widthPixels * 0.8d);
int i11 = (int) (displayMetrics.heightPixels * 0.7d);
if (b10.getDialogWidth() != Integer.MIN_VALUE) {
i10 = b10.getDialogWidth();
}
attributes.width = i10;
if (b10.getDialogHeight() != Integer.MIN_VALUE) {
i11 = b10.getDialogHeight();
}
attributes.height = i11;
attributes.x = b10.getDialogOffsetX();
attributes.y = b10.getDialogOffsetY();
attributes.gravity = b10.getDialogGravity();
attributes.flags |= 2;
attributes.dimAmount = b10.getDialogDimAmount();
window.setAttributes(attributes);
}
}
private void initSystemUI(boolean z10) {
Window window = getWindow();
int i10 = Build.VERSION.SDK_INT;
window.clearFlags(201326592);
window.getDecorView().setSystemUiVisibility(1024);
if (i10 >= 23) {
if (z10) {
window.getDecorView().setSystemUiVisibility(9216);
} else {
window.getDecorView().setSystemUiVisibility(1024);
}
}
window.addFlags(-2080374784);
}
private void setNavigationBarColor(AuthUIConfig authUIConfig) {
Window window = getWindow();
int i10 = Build.VERSION.SDK_INT;
if (authUIConfig.getNavigationBarColor() != null) {
window.setNavigationBarColor(e.a(this, authUIConfig.getNavigationBarColor().intValue()));
}
if (authUIConfig.getNavigationBarDividerColor() == null || i10 < 28) {
return;
}
window.setNavigationBarDividerColor(e.a(this, authUIConfig.getNavigationBarDividerColor().intValue()));
}
private void setStatusBarColor(int i10) {
Window window = getWindow();
window.clearFlags(67108864);
window.addFlags(Integer.MIN_VALUE);
window.setStatusBarColor(e.a(this, i10));
}
public void simCardError() {
Intent intent = new Intent();
intent.setAction("cc.bitlib.quicklogin.MAIN_ACTION");
intent.putExtra("code", 50106);
d.a(a.a().c()).a(intent);
}
public void addView(Context context, View view, int i10, int i11, int i12, int i13, int i14, int i15) {
int i16;
int convertDpToPixels = convertDpToPixels(context, i12, 0);
int convertDpToPixels2 = convertDpToPixels(context, i13, 0) + (a.a().b().isNavHidden() ? getStatusBarHeight() : 0);
int convertDpToPixels3 = convertDpToPixels(context, i14, 0);
int convertDpToPixels4 = convertDpToPixels(context, i15, 0);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(view.getLayoutParams());
layoutParams.setMargins(convertDpToPixels, convertDpToPixels2, convertDpToPixels3, convertDpToPixels4);
if (i15 == Integer.MIN_VALUE) {
if (i13 != Integer.MIN_VALUE) {
i16 = 10;
layoutParams.addRule(i16);
}
layoutParams.addRule(15);
} else {
if (i13 == Integer.MIN_VALUE || convertDpToPixels2 != convertDpToPixels4) {
i16 = 12;
layoutParams.addRule(i16);
}
layoutParams.addRule(15);
}
int i17 = 14;
if ((i12 != Integer.MIN_VALUE || i14 != Integer.MIN_VALUE) && (i12 == Integer.MIN_VALUE || i14 == Integer.MIN_VALUE || convertDpToPixels != convertDpToPixels3)) {
i17 = 9;
if ((i12 == Integer.MIN_VALUE || i14 == Integer.MIN_VALUE) && (i12 == Integer.MIN_VALUE || i14 != Integer.MIN_VALUE)) {
i17 = 11;
}
}
layoutParams.addRule(i17);
view.setLayoutParams(layoutParams);
}
@Override
public void onBackPressed() {
super.onBackPressed();
cancelByUser();
}
@Override
public void onConfigurationChanged(Configuration configuration) {
initContentView(configuration.orientation == 2);
super.onConfigurationChanged(configuration);
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
initSystemUI(a.a().b().isStatusBarLight());
initData(getIntent());
this.broadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, final Intent intent) {
PushAutoTrackHelper.onBroadcastReceiver(this, context, intent);
if (intent != null) {
int intExtra = intent.getIntExtra("code", -1);
if (intExtra == 50101) {
LoginAuthActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
LoginAuthActivity.this.finish();
}
});
} else if (intExtra != 50108) {
} else {
LoginAuthActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
LoginAuthActivity.this.initData(intent);
}
});
}
}
}
};
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("cc.bitlib.quicklogin.LOGIN_ACTION");
d.a(a.a().c()).a(this.broadcastReceiver, intentFilter);
}
@Override
public void onDestroy() {
super.onDestroy();
d.a(a.a().c()).a(this.broadcastReceiver);
}
@Override
@SensorsDataInstrumented
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
PushAutoTrackHelper.onNewIntent(this, intent);
}
}