PhotoRoom v4.8.2版本的 MD5 值为:c40a01bb3380c0f75c0cb6ac6760f295
以下内容为反编译后的 ManageSubscriptionActivity.java 源代码,内容仅作参考
package com.photoroom.features.upsell.ui;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.core.view.d1;
import androidx.fragment.app.f0;
import androidx.lifecycle.b1;
import androidx.lifecycle.g1;
import b10.o0;
import com.appboy.Constants;
import com.photoroom.features.preferences.ui.a;
import com.photoroom.features.upsell.ui.ManageSubscriptionActivity;
import com.photoroom.shared.ui.AlertActivity;
import com.shakebugs.shake.internal.domain.models.SystemEvent;
import g1.n;
import hy.p;
import io.intercom.android.sdk.Intercom;
import io.intercom.android.sdk.metrics.ops.OpsMetricTracker;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.u;
import kotlin.jvm.internal.q;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.t0;
import kotlin.jvm.internal.v;
import px.b0;
import px.f1;
import px.n0;
import px.x;
import px.z;
import xr.a;
import z0.b4;
import z0.q0;
import z0.r;
import zs.f;
@n
@t0
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0007\u0018\u0000 \u00122\u00020\u0001:\u0001\u0013B\u0007¢\u0006\u0004\b\u0010\u0010\u0011J\b\u0010\u0003\u001a\u00020\u0002H\u0002J\b\u0010\u0004\u001a\u00020\u0002H\u0002J\b\u0010\u0005\u001a\u00020\u0002H\u0002J\b\u0010\u0006\u001a\u00020\u0002H\u0002J\u0012\u0010\t\u001a\u00020\u00022\b\u0010\b\u001a\u0004\u0018\u00010\u0007H\u0014R\u001b\u0010\u000f\u001a\u00020\n8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u000b\u0010\f\u001a\u0004\b\r\u0010\u000e¨\u0006\u0016²\u0006\f\u0010\u0015\u001a\u00020\u00148\nX\u008a\u0084\u0002"}, d2 = {"Lcom/photoroom/features/upsell/ui/ManageSubscriptionActivity;", "Landroidx/appcompat/app/e;", "Lpx/f1;", "y0", "p0", "u0", "q0", "Landroid/os/Bundle;", "savedInstanceState", SystemEvent.STATE_APP_LAUNCHED, "Lzs/h;", "c", "Lpx/x;", "x0", "()Lzs/h;", "viewModel", "<init>", "()V", Constants.APPBOY_PUSH_NOTIFICATION_SOUND_DEFAULT_VALUE, Constants.APPBOY_PUSH_CONTENT_KEY, "Lzs/f;", "state", "app_release"}, k = 1, mv = {1, 9, 0})
public final class ManageSubscriptionActivity extends androidx.appcompat.app.e {
public static final a f36031d = new a(null);
public static final int f36032e = 8;
private final x f36033c;
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.k kVar) {
this();
}
public final Intent a(Context context) {
t.i(context, "context");
return new Intent(context, ManageSubscriptionActivity.class);
}
}
public class b extends q implements hy.a {
b(Object obj) {
super(0, obj, ManageSubscriptionActivity.class, OpsMetricTracker.FINISH, "finish()V", 0);
}
@Override
public Object invoke() {
m3582invoke();
return f1.f64673a;
}
public final void m3582invoke() {
((ManageSubscriptionActivity) this.receiver).finish();
}
}
public static final class c extends v implements hy.a {
c() {
super(0);
}
@Override
public Object invoke() {
m3583invoke();
return f1.f64673a;
}
public final void m3583invoke() {
gu.a.f46685a.b(ManageSubscriptionActivity.this, "https://help.photoroom.com/en/articles/3580333-change-your-photoroom-plan");
ManageSubscriptionActivity.this.finish();
}
}
public static final class d extends v implements hy.a {
d() {
super(0);
}
public static final void f(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
gu.a.f46685a.b(this$0, "https://help.photoroom.com/en/articles/3518262-cancel-your-subscription");
this$0.finish();
}
public static final void g(ManageSubscriptionActivity this$0, DialogInterface dialogInterface) {
t.i(this$0, "this$0");
this$0.finish();
}
public static final void h(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
gu.a.f46685a.b(this$0, "https://help.photoroom.com/en/articles/3518262-cancel-your-subscription");
this$0.finish();
}
public static final void j(ManageSubscriptionActivity this$0, DialogInterface dialogInterface) {
t.i(this$0, "this$0");
this$0.finish();
}
@Override
public Object invoke() {
m3584invoke();
return f1.f64673a;
}
public final void m3584invoke() {
au.d dVar = au.d.f12341b;
if (!dVar.A()) {
gu.a.f46685a.b(ManageSubscriptionActivity.this, "https://help.photoroom.com/en/articles/3518262-cancel-your-subscription");
ManageSubscriptionActivity.this.finish();
} else if (dVar.E()) {
ManageSubscriptionActivity.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/account/subscriptions?package=com.photoroom.app")));
ManageSubscriptionActivity.this.finish();
} else if (dVar.D()) {
AlertDialog.Builder message = new AlertDialog.Builder(ManageSubscriptionActivity.this).setTitle(em.l.C7).setMessage(em.l.B7);
int i11 = em.l.H3;
final ManageSubscriptionActivity manageSubscriptionActivity = ManageSubscriptionActivity.this;
AlertDialog.Builder positiveButton = message.setPositiveButton(i11, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i12) {
ManageSubscriptionActivity.d.f(ManageSubscriptionActivity.this, dialogInterface, i12);
}
});
final ManageSubscriptionActivity manageSubscriptionActivity2 = ManageSubscriptionActivity.this;
positiveButton.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ManageSubscriptionActivity.d.g(ManageSubscriptionActivity.this, dialogInterface);
}
}).show();
} else if (dVar.F()) {
AlertDialog.Builder message2 = new AlertDialog.Builder(ManageSubscriptionActivity.this).setTitle(em.l.E7).setMessage(em.l.D7);
int i12 = em.l.H3;
final ManageSubscriptionActivity manageSubscriptionActivity3 = ManageSubscriptionActivity.this;
AlertDialog.Builder positiveButton2 = message2.setPositiveButton(i12, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i13) {
ManageSubscriptionActivity.d.h(ManageSubscriptionActivity.this, dialogInterface, i13);
}
});
final ManageSubscriptionActivity manageSubscriptionActivity4 = ManageSubscriptionActivity.this;
positiveButton2.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ManageSubscriptionActivity.d.j(ManageSubscriptionActivity.this, dialogInterface);
}
}).show();
} else {
t50.a.f72680a.b("Unknown subscription source", new Object[0]);
}
w7.f.a().N0();
}
}
public static final class e extends v implements hy.a {
e() {
super(0);
}
public static final void j(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
gu.a.f46685a.b(this$0, "https://help.photoroom.com/en/articles/8370245-request-a-refund");
this$0.finish();
}
public static final void k(ManageSubscriptionActivity this$0, DialogInterface dialogInterface) {
t.i(this$0, "this$0");
this$0.finish();
}
public static final void l(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
gu.a.f46685a.b(this$0, "https://help.photoroom.com/en/articles/8370245-request-a-refund");
this$0.finish();
}
public static final void m(ManageSubscriptionActivity this$0, DialogInterface dialogInterface) {
t.i(this$0, "this$0");
this$0.finish();
}
public static final void n(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
gu.a.f46685a.b(this$0, "https://help.photoroom.com/en/articles/3518262-cancel-your-subscription");
this$0.finish();
}
public static final void o(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
gu.a.f46685a.b(this$0, "https://help.photoroom.com/en/articles/8370245-request-a-refund");
this$0.finish();
}
public static final void p(ManageSubscriptionActivity this$0, DialogInterface dialogInterface) {
t.i(this$0, "this$0");
this$0.finish();
}
@Override
public Object invoke() {
m3585invoke();
return f1.f64673a;
}
public final void m3585invoke() {
au.d dVar = au.d.f12341b;
if (dVar.E() && dVar.l()) {
ManageSubscriptionActivity.this.x0().Y2();
} else if (dVar.D()) {
AlertDialog.Builder message = new AlertDialog.Builder(ManageSubscriptionActivity.this).setTitle(em.l.C7).setMessage(em.l.B7);
int i11 = em.l.H3;
final ManageSubscriptionActivity manageSubscriptionActivity = ManageSubscriptionActivity.this;
AlertDialog.Builder positiveButton = message.setPositiveButton(i11, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i12) {
ManageSubscriptionActivity.e.j(ManageSubscriptionActivity.this, dialogInterface, i12);
}
});
final ManageSubscriptionActivity manageSubscriptionActivity2 = ManageSubscriptionActivity.this;
positiveButton.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ManageSubscriptionActivity.e.k(ManageSubscriptionActivity.this, dialogInterface);
}
}).show();
} else if (dVar.F()) {
AlertDialog.Builder message2 = new AlertDialog.Builder(ManageSubscriptionActivity.this).setTitle(em.l.E7).setMessage(em.l.D7);
int i12 = em.l.H3;
final ManageSubscriptionActivity manageSubscriptionActivity3 = ManageSubscriptionActivity.this;
AlertDialog.Builder positiveButton2 = message2.setPositiveButton(i12, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i13) {
ManageSubscriptionActivity.e.l(ManageSubscriptionActivity.this, dialogInterface, i13);
}
});
final ManageSubscriptionActivity manageSubscriptionActivity4 = ManageSubscriptionActivity.this;
positiveButton2.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ManageSubscriptionActivity.e.m(ManageSubscriptionActivity.this, dialogInterface);
}
}).show();
} else {
AlertDialog.Builder message3 = new AlertDialog.Builder(ManageSubscriptionActivity.this).setTitle(em.l.J7).setMessage(em.l.I7);
int i13 = em.l.H3;
final ManageSubscriptionActivity manageSubscriptionActivity5 = ManageSubscriptionActivity.this;
AlertDialog.Builder positiveButton3 = message3.setPositiveButton(i13, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i14) {
ManageSubscriptionActivity.e.n(ManageSubscriptionActivity.this, dialogInterface, i14);
}
});
int i14 = em.l.f42428a4;
final ManageSubscriptionActivity manageSubscriptionActivity6 = ManageSubscriptionActivity.this;
AlertDialog.Builder neutralButton = positiveButton3.setNeutralButton(i14, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i15) {
ManageSubscriptionActivity.e.o(ManageSubscriptionActivity.this, dialogInterface, i15);
}
});
final ManageSubscriptionActivity manageSubscriptionActivity7 = ManageSubscriptionActivity.this;
neutralButton.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ManageSubscriptionActivity.e.p(ManageSubscriptionActivity.this, dialogInterface);
}
}).show();
}
w7.f.a().P0();
}
}
public static final class f extends v implements p {
public static final class a extends kotlin.coroutines.jvm.internal.m implements p {
int f36038h;
final ManageSubscriptionActivity f36039i;
final b4 f36040j;
a(ManageSubscriptionActivity manageSubscriptionActivity, b4 b4Var, ux.d dVar) {
super(2, dVar);
this.f36039i = manageSubscriptionActivity;
this.f36040j = b4Var;
}
@Override
public final ux.d create(Object obj, ux.d dVar) {
return new a(this.f36039i, this.f36040j, dVar);
}
@Override
public final Object invoke(o0 o0Var, ux.d dVar) {
return ((a) create(o0Var, dVar)).invokeSuspend(f1.f64673a);
}
@Override
public final Object invokeSuspend(Object obj) {
vx.d.e();
if (this.f36038h == 0) {
n0.b(obj);
zs.f b11 = f.b(this.f36040j);
if (b11 instanceof f.c) {
this.f36039i.p0();
} else if (b11 instanceof f.d) {
this.f36039i.u0();
} else if (b11 instanceof f.b) {
this.f36039i.q0();
} else {
boolean z11 = b11 instanceof f.a;
}
return f1.f64673a;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}
f() {
super(2);
}
public static final zs.f b(b4 b4Var) {
return (zs.f) b4Var.getValue();
}
@Override
public Object invoke(Object obj, Object obj2) {
invoke((r) obj, ((Number) obj2).intValue());
return f1.f64673a;
}
public final void invoke(r rVar, int i11) {
if ((i11 & 11) == 2 && rVar.j()) {
rVar.J();
return;
}
if (z0.t.I()) {
z0.t.T(-747441168, i11, -1, "com.photoroom.features.upsell.ui.ManageSubscriptionActivity.onCreate.<anonymous> (ManageSubscriptionActivity.kt:44)");
}
b4 c11 = k4.a.c(ManageSubscriptionActivity.this.x0().X2(), null, null, null, rVar, 8, 7);
q0.d(b(c11), new a(ManageSubscriptionActivity.this, c11, null), rVar, 64);
if (z0.t.I()) {
z0.t.S();
}
}
}
public static final class g extends v implements hy.a {
final ComponentActivity f36041g;
final s40.a f36042h;
final hy.a f36043i;
final hy.a f36044j;
public g(ComponentActivity componentActivity, s40.a aVar, hy.a aVar2, hy.a aVar3) {
super(0);
this.f36041g = componentActivity;
this.f36042h = aVar;
this.f36043i = aVar2;
this.f36044j = aVar3;
}
@Override
public final b1 invoke() {
m4.a defaultViewModelCreationExtras;
b1 a11;
ComponentActivity componentActivity = this.f36041g;
s40.a aVar = this.f36042h;
hy.a aVar2 = this.f36043i;
hy.a aVar3 = this.f36044j;
g1 viewModelStore = componentActivity.getViewModelStore();
if (aVar2 == null || (defaultViewModelCreationExtras = (m4.a) aVar2.invoke()) == null) {
defaultViewModelCreationExtras = componentActivity.getDefaultViewModelCreationExtras();
t.h(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
}
m4.a aVar4 = defaultViewModelCreationExtras;
u40.a a12 = x30.a.a(componentActivity);
kotlin.reflect.d b11 = kotlin.jvm.internal.o0.b(zs.h.class);
t.h(viewModelStore, "viewModelStore");
a11 = c40.a.a(b11, viewModelStore, (r16 & 4) != 0 ? null : null, aVar4, (r16 & 16) != 0 ? null : aVar, a12, (r16 & 64) != 0 ? null : aVar3);
return a11;
}
}
public ManageSubscriptionActivity() {
x b11;
b11 = z.b(b0.f64658d, new g(this, null, null, null));
this.f36033c = b11;
}
public final void p0() {
AlertActivity.a aVar = AlertActivity.f36333f;
String string = getString(em.l.f42788y4);
t.h(string, "getString(...)");
AlertActivity.a.g(aVar, this, string, null, 4, null);
}
public final void q0() {
AlertActivity.f36333f.a(this);
new AlertDialog.Builder(this).setTitle(em.l.H7).setMessage(em.l.G7).setPositiveButton(em.l.f42607m3, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i11) {
ManageSubscriptionActivity.r0(ManageSubscriptionActivity.this, dialogInterface, i11);
}
}).setNeutralButton(em.l.F7, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i11) {
ManageSubscriptionActivity.s0(ManageSubscriptionActivity.this, dialogInterface, i11);
}
}).setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ManageSubscriptionActivity.t0(ManageSubscriptionActivity.this, dialogInterface);
}
}).show();
}
public static final void r0(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
this$0.finish();
}
public static final void s0(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
Intercom.present$default(Intercom.Companion.client(), null, 1, null);
w7.f.a().O0();
this$0.finish();
}
public static final void t0(ManageSubscriptionActivity this$0, DialogInterface dialogInterface) {
t.i(this$0, "this$0");
this$0.finish();
}
public final void u0() {
AlertActivity.f36333f.a(this);
new AlertDialog.Builder(this).setTitle(em.l.L7).setMessage(em.l.K7).setPositiveButton(em.l.f42607m3, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i11) {
ManageSubscriptionActivity.v0(ManageSubscriptionActivity.this, dialogInterface, i11);
}
}).setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ManageSubscriptionActivity.w0(ManageSubscriptionActivity.this, dialogInterface);
}
}).show();
}
public static final void v0(ManageSubscriptionActivity this$0, DialogInterface dialogInterface, int i11) {
t.i(this$0, "this$0");
this$0.finish();
}
public static final void w0(ManageSubscriptionActivity this$0, DialogInterface dialogInterface) {
t.i(this$0, "this$0");
this$0.finish();
}
public final zs.h x0() {
return (zs.h) this.f36033c.getValue();
}
private final void y0() {
List p11;
a.C0577a c0577a = com.photoroom.features.preferences.ui.a.f35891g0;
f0 supportFragmentManager = getSupportFragmentManager();
b bVar = new b(this);
String string = getString(em.l.f42676qc);
t.h(string, "getString(...)");
a.EnumC2598a enumC2598a = a.EnumC2598a.f80707b;
xr.a aVar = new xr.a(string, enumC2598a, true, false, new c(), 8, null);
String string2 = getString(em.l.f42661pc);
t.h(string2, "getString(...)");
xr.a aVar2 = new xr.a(string2, enumC2598a, true, false, new d(), 8, null);
String string3 = getString(em.l.Wc);
t.h(string3, "getString(...)");
p11 = u.p(aVar, aVar2, new xr.a(string3, enumC2598a, true, false, new e(), 8, null));
t.f(supportFragmentManager);
a.C0577a.b(c0577a, supportFragmentManager, p11, false, bVar, 4, null);
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
d1.b(getWindow(), false);
h.d.b(this, null, g1.c.c(-747441168, true, new f()), 1, null);
y0();
}
}