LINE.apk(点击下载) / LineOutAgreementActivity.java
package com.linecorp.voip.ui.paidcall.activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import bb.x0;
import ci2.h;
import em3.q;
import em3.s;
import jp.naver.line.android.R;
import jp.naver.line.android.analytics.ga.annotation.GAScreenTracking;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import ng2.k;
import pd3.d;
import rh2.c;
import sm3.r;
import sm3.x;
import um3.w0;
import vh2.e;
import z1.g;
import zg2.f;
import zm3.t;
@Metadata(bv = {}, d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0005\b\u0007\u0018\u00002\u00020\u00012\u00020\u0002:\u0001\tB\u0007¢\u0006\u0004\b\u0007\u0010\bJ\u0010\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0004\u001a\u00020\u0003H\u0016¨\u0006\n"}, d2 = {"Lcom/linecorp/voip/ui/paidcall/activity/LineOutAgreementActivity;", "Lrh2/c;", "Landroid/view/View$OnClickListener;", "Landroid/view/View;", "view", "", "onClick", "<init>", "()V", "a", "line-call_productionRelease"}, k = 1, mv = {1, 6, 0})
@GAScreenTracking(autoTracking = false)
public final class LineOutAgreementActivity extends c implements View.OnClickListener {
/* renamed from: i reason: collision with root package name */
public static final /* synthetic */ int f57724i = 0;
/* renamed from: h reason: collision with root package name */
public final Lazy f57725h = LazyKt.lazy(new b(this));
public static final class a extends ClickableSpan {
/* renamed from: b reason: collision with root package name */
public final Context f57726b;
/* renamed from: c reason: collision with root package name */
public final int f57727c;
/* renamed from: d reason: collision with root package name */
public final Lazy f57728d = LazyKt.lazy(C0571a.f57729b);
/* renamed from: com.linecorp.voip.ui.paidcall.activity.LineOutAgreementActivity$a$a reason: collision with other inner class name */
public static final class C0571a extends s implements dm3.a<String> {
/* renamed from: b reason: collision with root package name */
public static final C0571a f57729b = new C0571a();
/* renamed from: com.linecorp.voip.ui.paidcall.activity.LineOutAgreementActivity$a$a$a reason: collision with other inner class name */
public /* synthetic */ class C0572a {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[jz2.b.values().length];
iArr[jz2.b.ALPHA.ordinal()] = 1;
iArr[jz2.b.BETA.ordinal()] = 2;
iArr[jz2.b.LOCAL.ordinal()] = 3;
iArr[jz2.b.RC.ordinal()] = 4;
iArr[jz2.b.RELEASE.ordinal()] = 5;
$EnumSwitchMapping$0 = iArr;
}
}
public C0571a() {
super(0);
}
/* Return type fixed from 'java.lang.Object' to match base method */
@Override // dm3.a
public String invoke() {
int i14 = C0572a.$EnumSwitchMapping$0[d.c().i().ordinal()];
if (i14 == 1 || i14 == 2 || i14 == 3) {
return "https://terms2.line-beta.me/line_call_personal_information/sp?lang=";
}
if (i14 == 4 || i14 == 5) {
return "https://terms2.line.me/line_call_personal_information/sp?lang=";
}
throw new NoWhenBranchMatchedException();
}
}
public a(Context context, int i14) {
this.f57726b = context;
this.f57727c = i14;
}
public void onClick(View view) {
q.f(view, "widget");
int i14 = this.f57727c;
String str = null;
if (i14 == 0) {
x0 x0Var = k.f117672c;
if (x0Var != null) {
str = x0Var.s("LINE_CALL_TERMS");
}
} else if (i14 == 3) {
x0 x0Var2 = k.f117672c;
if (x0Var2 != null) {
str = x0Var2.s("LINE_CALL_PRIVACY");
}
} else if (i14 == 5) {
str = ((String) this.f57728d.getValue()) + g.c();
}
if (str != null) {
Context context = this.f57726b;
Intent intent = new Intent(this.f57726b, TermsActivity.class);
intent.setFlags(268435456);
intent.putExtra("terms_url", str);
intent.putExtra("terms_type", i14);
context.startActivity(intent);
}
}
public void updateDrawState(TextPaint textPaint) {
q.f(textPaint, "ds");
textPaint.setUnderlineText(true);
}
}
public static final class b extends s implements dm3.a<vg2.x0> {
/* renamed from: b reason: collision with root package name */
public final /* synthetic */ LineOutAgreementActivity f57730b;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public b(LineOutAgreementActivity lineOutAgreementActivity) {
super(0);
this.f57730b = lineOutAgreementActivity;
}
/* Return type fixed from 'java.lang.Object' to match base method */
@Override // dm3.a
public vg2.x0 invoke() {
View inflate = LayoutInflater.from(this.f57730b.getApplicationContext()).inflate(R.layout.lineout_agreement, (ViewGroup) null, false);
int i14 = R.id.call_agree_close_button;
ImageView imageView = (ImageView) dz.a.g(inflate, R.id.call_agree_close_button);
if (imageView != null) {
i14 = R.id.call_agree_detail;
LinearLayout linearLayout = (LinearLayout) dz.a.g(inflate, R.id.call_agree_detail);
if (linearLayout != null) {
i14 = R.id.call_agree_logo;
ImageView imageView2 = (ImageView) dz.a.g(inflate, R.id.call_agree_logo);
if (imageView2 != null) {
i14 = R.id.call_agree_terms_text;
TextView textView = (TextView) dz.a.g(inflate, R.id.call_agree_terms_text);
if (textView != null) {
i14 = R.id.check_agreement_data_collection;
ImageView imageView3 = (ImageView) dz.a.g(inflate, R.id.check_agreement_data_collection);
if (imageView3 != null) {
i14 = R.id.check_agreement_terms_privacy;
ImageView imageView4 = (ImageView) dz.a.g(inflate, R.id.check_agreement_terms_privacy);
if (imageView4 != null) {
i14 = R.id.layout_call_agree_text;
LinearLayout linearLayout2 = (LinearLayout) dz.a.g(inflate, R.id.layout_call_agree_text);
if (linearLayout2 != null) {
i14 = R.id.text_agree_start;
TextView textView2 = (TextView) dz.a.g(inflate, R.id.text_agree_start);
if (textView2 != null) {
i14 = R.id.text_agreement_data_collection;
TextView textView3 = (TextView) dz.a.g(inflate, R.id.text_agreement_data_collection);
if (textView3 != null) {
i14 = R.id.text_agreement_terms_privacy;
TextView textView4 = (TextView) dz.a.g(inflate, R.id.text_agreement_terms_privacy);
if (textView4 != null) {
return new vg2.x0((RelativeLayout) inflate, imageView, linearLayout, imageView2, textView, imageView3, imageView4, linearLayout2, textView2, textView3, textView4);
}
}
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i14)));
}
}
public void onClick(View view) {
q.f(view, "view");
int id4 = view.getId();
if (id4 == R.id.call_agree_close_button) {
finish();
return;
}
boolean z14 = false;
if (id4 == R.id.check_agreement_terms_privacy || id4 == R.id.check_agreement_data_collection) {
view.setSelected(!view.isSelected());
TextView textView = y8().f172005i;
if (y8().f172004h.isSelected() && y8().f172003g.isSelected()) {
z14 = true;
}
textView.setEnabled(z14);
return;
}
String str = null;
if (id4 == R.id.call_agree_detail) {
if (f.s(getApplicationContext())) {
Intent intent = new Intent();
intent.setClass(getApplicationContext(), TermsActivity.class);
intent.putExtra("terms_type", 4);
x0 x0Var = k.f117672c;
if (x0Var != null) {
str = x0Var.s("LINE_CALL_ABOUT_LINE_OUT_FREE");
}
intent.putExtra("terms_url", str);
startActivity(intent);
return;
}
x0 x0Var2 = k.f117672c;
if (x0Var2 != null) {
str = x0Var2.s("LINE_CALL_ABOUT");
}
startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
} else if (id4 == R.id.text_agree_start) {
w0 w0Var = w0.f166204a;
um3.g.d(z1.c.a(t.f199868a), null, 0, new vh2.f(this, null), 3, null);
}
}
@Override // androidx.activity.ComponentActivity, a2.f, rh2.c, androidx.fragment.app.n, od3.e
public void onCreate(Bundle bundle) {
String str;
super.onCreate(bundle);
RelativeLayout relativeLayout = y8().f171998b;
q.e(relativeLayout, "binding.root");
setContentView(relativeLayout);
if (h.a(getApplicationContext())) {
finish();
return;
}
w0 w0Var = w0.f166204a;
um3.g.d(z1.c.a(t.f199868a), null, 0, new e(this, null), 3, null);
fe3.a.a(this, getResources().getColor(R.color.linegray400, null));
y8().f172005i.setEnabled(false);
y8().f172001e.setImageResource(f.s(getApplicationContext()) ? R.drawable.call_registration_lineout_free : R.drawable.call_registration_lineout);
TextView textView = y8().f172002f;
if (f.s(getApplicationContext())) {
str = getString(R.string.call_intro_guide_text_free);
} else {
str = getString(R.string.call_intro_guide_text);
}
textView.setText(str);
TextView textView2 = y8().f172007k;
String string = getString(R.string.linecall_start_checkbox_consent1_termsofuse);
q.e(string, "getString(R.string.linec…kbox_consent1_termsofuse)");
String string2 = getString(R.string.linecall_start_checkbox_consent1_privacyterms);
q.e(string2, "getString(R.string.linec…ox_consent1_privacyterms)");
String string3 = getString(r.r("TH", f.m(), true) ? R.string.linecall_start_checkbox_consent1_th : R.string.linecall_start_checkbox_consent1);
q.e(string3, "getString(\n …ox_consent1\n )");
String b14 = j2.c.b(new Object[]{string, string2}, 2, string3, "format(format, *args)");
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(b14);
if (x.S(b14, string, 0, false, 6) > 0) {
Context applicationContext = getApplicationContext();
q.e(applicationContext, "applicationContext");
a aVar = new a(applicationContext, 0);
int S = x.S(b14, string, 0, false, 6);
spannableStringBuilder.setSpan(aVar, S, string.length() + S, 33);
}
if (x.S(b14, string2, 0, false, 6) > 0) {
Context applicationContext2 = getApplicationContext();
q.e(applicationContext2, "applicationContext");
a aVar2 = new a(applicationContext2, 3);
int S2 = x.S(b14, string2, 0, false, 6);
spannableStringBuilder.setSpan(aVar2, S2, string2.length() + S2, 33);
}
textView2.setText(spannableStringBuilder);
y8().f172007k.setMovementMethod(LinkMovementMethod.getInstance());
TextView textView3 = y8().f172006j;
String string4 = getString(R.string.linecall_start_checkbox_consent2_details);
q.e(string4, "getString(R.string.linec…heckbox_consent2_details)");
String string5 = getString(R.string.linecall_start_checkbox_consent2);
q.e(string5, "getString(R.string.linec…_start_checkbox_consent2)");
String b15 = j2.c.b(new Object[]{string4}, 1, string5, "format(format, *args)");
SpannableStringBuilder spannableStringBuilder2 = new SpannableStringBuilder(b15);
if (x.S(b15, string4, 0, false, 6) > 0) {
Context applicationContext3 = getApplicationContext();
q.e(applicationContext3, "applicationContext");
a aVar3 = new a(applicationContext3, 5);
int S3 = x.S(b15, string4, 0, false, 6);
spannableStringBuilder2.setSpan(aVar3, S3, string4.length() + S3, 33);
}
textView3.setText(spannableStringBuilder2);
y8().f172006j.setMovementMethod(LinkMovementMethod.getInstance());
y8().f171999c.setOnClickListener(this);
y8().f172000d.setOnClickListener(this);
y8().f172004h.setOnClickListener(this);
y8().f172003g.setOnClickListener(this);
y8().f172005i.setOnClickListener(this);
}
public final vg2.x0 y8() {
return (vg2.x0) this.f57725h.getValue();
}
}