82.11 - Beta (82111)

This commit is contained in:
Juby210 2021-07-04 17:43:58 +02:00
parent 3befb67634
commit 6ffa09f7cd
Signed by: Juby210
GPG key ID: F459CEC5C92E1482
27 changed files with 334 additions and 252 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId 'com.discord'
minSdkVersion 21
targetSdkVersion 29
versionCode 82109
versionName "82.9 - Beta"
versionCode 82111
versionName "82.11 - Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="82109" android:versionName="82.9 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="82111" android:versionName="82.11 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

View file

@ -286,9 +286,9 @@ public final class d0 implements a.d {
m.checkNotNullParameter(str, "serverId");
m.checkNotNullParameter(str2, "sessionId");
aVar.b();
aVar.r = str;
aVar.f213s = str2;
aVar.f216z = a.c.IDENTIFYING;
aVar.f213s = str;
aVar.t = str2;
aVar.A = a.c.IDENTIFYING;
aVar.o(0, new Payloads.Identify(str, j, str2, aVar.D, z2));
rtcConnection.u(RtcConnection.State.a.a);
}

View file

@ -42,8 +42,8 @@ public final class a extends WebSocketListener implements DebugPrintable {
public static int i;
public static final Type j = new C0038a().getType();
public static final b k = new b(null);
public boolean A;
public final String B;
public c A;
public boolean B;
public final String C;
public final String D;
public final SSLSocketFactory E;
@ -51,29 +51,29 @@ public final class a extends WebSocketListener implements DebugPrintable {
public final c.a.r.c G;
public final Clock H;
public final String I;
public final Gson l = new c.i.d.e().a();
public final Timer m = new Timer();
public final Backoff n = new Backoff(1000, 5000, 3, false, null, 24, null);
public final CopyOnWriteArraySet<d> o = new CopyOnWriteArraySet<>();
public int p = 3;
public WebSocket q;
public String r;
public final String l;
public final Gson m = new c.i.d.e().a();
public final Timer n = new Timer();
public final Backoff o;
public final CopyOnWriteArraySet<d> p;
public int q;
public WebSocket r;
/* renamed from: s reason: collision with root package name */
public String f213s;
public Long t;
public boolean u;
public b v = new b(this);
public Long w;
public String t;
public Long u;
public boolean v;
public b w;
/* renamed from: x reason: collision with root package name */
public TimerTask f214x;
public Long f214x;
/* renamed from: y reason: collision with root package name */
public Long f215y;
public TimerTask f215y;
/* renamed from: z reason: collision with root package name */
public c f216z = c.DISCONNECTED;
public Long f216z;
/* compiled from: RtcControlSocket.kt */
/* renamed from: c.a.r.l0.a$a reason: collision with other inner class name */
@ -217,7 +217,7 @@ public final class a extends WebSocketListener implements DebugPrintable {
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public Unit mo1invoke() {
if (!(!m.areEqual(this.$webSocket, this.this$0.q))) {
if (!(!m.areEqual(this.$webSocket, this.this$0.r))) {
a.a(this.this$0, true, Integer.valueOf(this.$code), this.$reason);
}
return Unit.a;
@ -242,12 +242,12 @@ public final class a extends WebSocketListener implements DebugPrintable {
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public Unit mo1invoke() {
if (!(!m.areEqual(this.$webSocket, this.this$0.q))) {
if (!(!m.areEqual(this.$webSocket, this.this$0.r))) {
if (this.$t instanceof SSLException) {
a.d(this.this$0, null, 1);
a aVar = this.this$0;
aVar.b();
for (d dVar : aVar.o) {
for (d dVar : aVar.p) {
m.checkNotNullExpressionValue(dVar, "it");
dVar.b(false, 1001, null);
}
@ -281,20 +281,20 @@ public final class a extends WebSocketListener implements DebugPrintable {
/* renamed from: invoke */
public Unit mo1invoke() {
boolean z2 = true;
if (!(!m.areEqual(this.$webSocket, this.this$0.q))) {
if (!(!m.areEqual(this.$webSocket, this.this$0.r))) {
switch (this.$message.getOpcode()) {
case 2:
a aVar = this.this$0;
Object c2 = aVar.l.c(this.$message.getData(), Payloads.Ready.class);
Object c2 = aVar.m.c(this.$message.getData(), Payloads.Ready.class);
m.checkNotNullExpressionValue(c2, "gson.fromJson(message.da…yloads.Ready::class.java)");
Payloads.Ready ready = (Payloads.Ready) c2;
aVar.n.succeed();
aVar.o.succeed();
long currentTimeMillis = aVar.H.currentTimeMillis();
Long l = aVar.f215y;
Long l = aVar.f216z;
long longValue = currentTimeMillis - (l != null ? l.longValue() : 0);
aVar.j("[READY] took " + longValue + " ms");
aVar.b();
for (d dVar : aVar.o) {
for (d dVar : aVar.p) {
m.checkNotNullExpressionValue(dVar, "it");
dVar.l(ready.getPort(), ready.getSsrc(), ready.getIp());
}
@ -305,11 +305,11 @@ public final class a extends WebSocketListener implements DebugPrintable {
break;
case 4:
a aVar3 = this.this$0;
Object c3 = aVar3.l.c(this.$message.getData(), Payloads.Description.class);
Object c3 = aVar3.m.c(this.$message.getData(), Payloads.Description.class);
m.checkNotNullExpressionValue(c3, "gson.fromJson(message.da….Description::class.java)");
Payloads.Description description = (Payloads.Description) c3;
aVar3.b();
for (d dVar2 : aVar3.o) {
for (d dVar2 : aVar3.p) {
m.checkNotNullExpressionValue(dVar2, "it");
dVar2.c(description.getMode(), description.getSecretKey());
dVar2.a(description.getAudioCodec(), description.getVideoCodec());
@ -318,11 +318,11 @@ public final class a extends WebSocketListener implements DebugPrintable {
dVar2.d(mediaSessionId);
}
}
aVar3.A = true;
aVar3.B = true;
break;
case 5:
a aVar4 = this.this$0;
Object c4 = aVar4.l.c(this.$message.getData(), Payloads.Speaking.class);
Object c4 = aVar4.m.c(this.$message.getData(), Payloads.Speaking.class);
m.checkNotNullExpressionValue(c4, "gson.fromJson(message.da…ads.Speaking::class.java)");
Payloads.Speaking speaking = (Payloads.Speaking) c4;
if (!(speaking.getUserId() == null || speaking.getSpeaking() == null)) {
@ -331,7 +331,7 @@ public final class a extends WebSocketListener implements DebugPrintable {
z2 = false;
}
aVar4.b();
for (d dVar3 : aVar4.o) {
for (d dVar3 : aVar4.p) {
m.checkNotNullExpressionValue(dVar3, "it");
dVar3.onSpeaking(speaking.getUserId().longValue(), speaking.getSsrc(), z2);
}
@ -339,16 +339,16 @@ public final class a extends WebSocketListener implements DebugPrintable {
}
case 6:
a aVar5 = this.this$0;
Object c5 = aVar5.l.c(this.$message.getData(), Long.TYPE);
Object c5 = aVar5.m.c(this.$message.getData(), Long.TYPE);
m.checkNotNullExpressionValue(c5, "gson.fromJson(message.data, Long::class.java)");
long longValue2 = ((Number) c5).longValue();
long currentTimeMillis2 = aVar5.H.currentTimeMillis();
long j = currentTimeMillis2 - longValue2;
Logger.d$default(aVar5.F, aVar5.B, c.d.b.a.a.r("got heartbeat ack after ", j, " ms"), null, 4, null);
aVar5.w = Long.valueOf(currentTimeMillis2);
aVar5.u = true;
Logger.d$default(aVar5.F, aVar5.l, c.d.b.a.a.r("got heartbeat ack after ", j, " ms"), null, 4, null);
aVar5.f214x = Long.valueOf(currentTimeMillis2);
aVar5.v = true;
aVar5.b();
for (d dVar4 : aVar5.o) {
for (d dVar4 : aVar5.p) {
m.checkNotNullExpressionValue(dVar4, "it");
dVar4.g(j);
}
@ -364,31 +364,31 @@ public final class a extends WebSocketListener implements DebugPrintable {
break;
case 8:
a aVar7 = this.this$0;
Object c6 = aVar7.l.c(this.$message.getData(), Payloads.Hello.class);
Object c6 = aVar7.m.c(this.$message.getData(), Payloads.Hello.class);
m.checkNotNullExpressionValue(c6, "gson.fromJson(message.da…yloads.Hello::class.java)");
Payloads.Hello hello = (Payloads.Hello) c6;
TimerTask timerTask = aVar7.f214x;
TimerTask timerTask = aVar7.f215y;
if (timerTask != null) {
timerTask.cancel();
}
aVar7.j("[HELLO] raw: " + hello);
aVar7.t = Long.valueOf(hello.getHeartbeatIntervalMs());
aVar7.p = hello.getServerVersion();
aVar7.v.cancel();
aVar7.u = true;
aVar7.u = Long.valueOf(hello.getHeartbeatIntervalMs());
aVar7.q = hello.getServerVersion();
aVar7.w.cancel();
aVar7.v = true;
aVar7.l();
break;
case 9:
this.this$0.n.succeed();
this.this$0.o.succeed();
break;
case 12:
a aVar8 = this.this$0;
Object c7 = aVar8.l.c(this.$message.getData(), Payloads.Video.class);
Object c7 = aVar8.m.c(this.$message.getData(), Payloads.Video.class);
m.checkNotNullExpressionValue(c7, "gson.fromJson(message.da…yloads.Video::class.java)");
Payloads.Video video = (Payloads.Video) c7;
if (video.getUserId() != null) {
aVar8.b();
for (d dVar5 : aVar8.o) {
for (d dVar5 : aVar8.p) {
m.checkNotNullExpressionValue(dVar5, "it");
dVar5.e(video.getUserId().longValue(), video.getAudioSsrc(), video.getVideoSsrc(), video.getStreams());
}
@ -397,22 +397,22 @@ public final class a extends WebSocketListener implements DebugPrintable {
break;
case 13:
a aVar9 = this.this$0;
Object c8 = aVar9.l.c(this.$message.getData(), Payloads.ClientDisconnect.class);
Object c8 = aVar9.m.c(this.$message.getData(), Payloads.ClientDisconnect.class);
m.checkNotNullExpressionValue(c8, "gson.fromJson(message.da…ntDisconnect::class.java)");
Payloads.ClientDisconnect clientDisconnect = (Payloads.ClientDisconnect) c8;
aVar9.b();
for (d dVar6 : aVar9.o) {
for (d dVar6 : aVar9.p) {
m.checkNotNullExpressionValue(dVar6, "it");
dVar6.k(clientDisconnect.getUserId());
}
break;
case 14:
a aVar10 = this.this$0;
Object c9 = aVar10.l.c(this.$message.getData(), Payloads.SessionUpdate.class);
Object c9 = aVar10.m.c(this.$message.getData(), Payloads.SessionUpdate.class);
m.checkNotNullExpressionValue(c9, "gson.fromJson(message.da…essionUpdate::class.java)");
Payloads.SessionUpdate sessionUpdate = (Payloads.SessionUpdate) c9;
aVar10.b();
for (d dVar7 : aVar10.o) {
for (d dVar7 : aVar10.p) {
m.checkNotNullExpressionValue(dVar7, "it");
String mediaSessionId2 = sessionUpdate.getMediaSessionId();
if (mediaSessionId2 != null) {
@ -422,7 +422,7 @@ public final class a extends WebSocketListener implements DebugPrintable {
break;
case 15:
a aVar11 = this.this$0;
Gson gson = aVar11.l;
Gson gson = aVar11.m;
JsonElement data = this.$message.getData();
Type type = a.j;
Objects.requireNonNull(gson);
@ -430,7 +430,7 @@ public final class a extends WebSocketListener implements DebugPrintable {
m.checkNotNullExpressionValue(d, "gson.fromJson(message.data, MEDIA_SINK_WANTS_TYPE)");
Map<String, Integer> map = (Map) d;
aVar11.b();
for (d dVar8 : aVar11.o) {
for (d dVar8 : aVar11.p) {
m.checkNotNullExpressionValue(dVar8, "it");
dVar8.f(map);
}
@ -458,54 +458,54 @@ public final class a extends WebSocketListener implements DebugPrintable {
/* renamed from: invoke */
public Unit mo1invoke() {
boolean z2 = true;
if (!(!m.areEqual(this.$webSocket, this.this$0.q))) {
if (!(!m.areEqual(this.$webSocket, this.this$0.r))) {
a aVar = this.this$0;
c cVar = aVar.f216z;
c cVar = aVar.A;
if (cVar == c.CONNECTING) {
aVar.b();
for (d dVar : aVar.o) {
for (d dVar : aVar.p) {
m.checkNotNullExpressionValue(dVar, "it");
dVar.j();
}
} else if (cVar == c.RECONNECTING) {
String str = aVar.f213s;
String str2 = aVar.r;
String str = aVar.t;
String str2 = aVar.f213s;
String str3 = aVar.D;
Long l = aVar.w;
Long l = aVar.f214x;
if (l != null && aVar.H.currentTimeMillis() - l.longValue() > 60000) {
z2 = false;
}
if (str == null || str2 == null || !aVar.A || !z2) {
if (str == null || str2 == null || !aVar.B || !z2) {
StringBuilder L = c.d.b.a.a.L("Cannot resume connection. resumable: ");
L.append(aVar.A);
L.append(aVar.B);
L.append(" -- isHeartbeatRecentEnough: ");
L.append(z2);
aVar.h(false, 4801, L.toString());
} else {
aVar.j("[RESUME] resuming session. serverId=" + str2 + " sessionId=" + str);
aVar.b();
for (d dVar2 : aVar.o) {
for (d dVar2 : aVar.p) {
m.checkNotNullExpressionValue(dVar2, "it");
dVar2.h();
}
aVar.f216z = c.RESUMING;
aVar.A = c.RESUMING;
aVar.o(7, new Payloads.Resume(str3, str, str2));
}
}
a aVar2 = this.this$0;
aVar2.f216z = c.CONNECTED;
aVar2.A = c.CONNECTED;
long currentTimeMillis = aVar2.H.currentTimeMillis();
Long l2 = this.this$0.f215y;
Long l2 = this.this$0.f216z;
long longValue = currentTimeMillis - (l2 != null ? l2.longValue() : 0);
a aVar3 = this.this$0;
Logger logger = aVar3.F;
String str4 = aVar3.B;
String str4 = aVar3.l;
StringBuilder L2 = c.d.b.a.a.L("[CONNECTED] to ");
L2.append(this.this$0.C);
Logger.i$default(logger, str4, L2.toString(), null, 4, null);
a aVar4 = this.this$0;
aVar4.b();
for (d dVar3 : aVar4.o) {
for (d dVar3 : aVar4.p) {
m.checkNotNullExpressionValue(dVar3, "it");
dVar3.g(longValue / ((long) 2));
}
@ -551,19 +551,25 @@ public final class a extends WebSocketListener implements DebugPrintable {
int i2 = i + 1;
i = i2;
P.append(i2);
this.B = P.toString();
String sb = P.toString();
this.l = sb;
this.o = new Backoff(1000, 5000, 3, false, new Backoff.TimerScheduler(sb, cVar), 8, null);
this.p = new CopyOnWriteArraySet<>();
this.q = 3;
this.w = new b(this);
this.A = c.DISCONNECTED;
}
public static final void a(a aVar, boolean z2, Integer num, String str) {
aVar.f216z = c.DISCONNECTED;
aVar.A = c.DISCONNECTED;
if ((num != null && num.intValue() == 4004) || ((num != null && num.intValue() == 4015) || ((num != null && num.intValue() == 4011) || (num != null && num.intValue() == 4006)))) {
aVar.h(true, num, str);
} else if (aVar.n.hasReachedFailureThreshold()) {
} else if (aVar.o.hasReachedFailureThreshold()) {
aVar.k("[WS CLOSED] Backoff exceeded. Resetting.");
aVar.h(z2, num, str);
} else {
aVar.c(null);
String H = c.d.b.a.a.H(new Object[]{Double.valueOf(((double) aVar.n.fail(new c(aVar, z2, num, str))) / 1000.0d)}, 1, "%.2f", "java.lang.String.format(this, *args)");
String H = c.d.b.a.a.H(new Object[]{Double.valueOf(((double) aVar.o.fail(new c(aVar, z2, num, str))) / 1000.0d)}, 1, "%.2f", "java.lang.String.format(this, *args)");
aVar.k("`[WS CLOSED] (" + z2 + ", " + num + ", " + str + ") retrying in " + H + " seconds.");
}
}
@ -586,41 +592,41 @@ public final class a extends WebSocketListener implements DebugPrintable {
}
public final void c(Function1<? super WebSocket, Unit> function1) {
this.n.cancel();
this.v.cancel();
TimerTask timerTask = this.f214x;
this.o.cancel();
this.w.cancel();
TimerTask timerTask = this.f215y;
if (timerTask != null) {
timerTask.cancel();
}
WebSocket webSocket = this.q;
WebSocket webSocket = this.r;
if (!(webSocket == null || function1 == null)) {
function1.invoke(webSocket);
}
this.q = null;
this.r = null;
}
@Override // com.discord.utilities.debug.DebugPrintable
public void debugPrint(DebugPrintBuilder debugPrintBuilder) {
m.checkNotNullParameter(debugPrintBuilder, "dp");
debugPrintBuilder.appendKeyValue("serverId", this.r);
debugPrintBuilder.appendKeyValue("sessionId", this.f213s);
debugPrintBuilder.appendKeyValue("heartbeatInterval", this.t);
debugPrintBuilder.appendKeyValue("lastHeartbeatAckTime", this.w);
debugPrintBuilder.appendKeyValue("connectionStartTime", this.f215y);
debugPrintBuilder.appendKeyValue("connectionState", this.f216z);
debugPrintBuilder.appendKeyValue("resumable", Boolean.valueOf(this.A));
debugPrintBuilder.appendKeyValue("serverId", this.f213s);
debugPrintBuilder.appendKeyValue("sessionId", this.t);
debugPrintBuilder.appendKeyValue("heartbeatInterval", this.u);
debugPrintBuilder.appendKeyValue("lastHeartbeatAckTime", this.f214x);
debugPrintBuilder.appendKeyValue("connectionStartTime", this.f216z);
debugPrintBuilder.appendKeyValue("connectionState", this.A);
debugPrintBuilder.appendKeyValue("resumable", Boolean.valueOf(this.B));
}
public final void e() {
b();
j("[CLOSE]");
c(e.i);
this.r = null;
this.f213s = null;
this.A = false;
this.f216z = c.DISCONNECTED;
this.t = null;
this.B = false;
this.A = c.DISCONNECTED;
b();
for (d dVar : this.o) {
for (d dVar : this.p) {
m.checkNotNullExpressionValue(dVar, "it");
dVar.b(false, 1000, "Force Close");
}
@ -628,14 +634,14 @@ public final class a extends WebSocketListener implements DebugPrintable {
public final boolean f() {
b();
if (this.f216z != c.DISCONNECTED) {
if (this.A != c.DISCONNECTED) {
k("Cannot start a new connection, connection state is not disconnected");
return false;
}
this.f216z = c.CONNECTING;
this.A = c.CONNECTING;
g();
b();
for (d dVar : this.o) {
for (d dVar : this.p) {
m.checkNotNullExpressionValue(dVar, "it");
dVar.i();
}
@ -646,19 +652,19 @@ public final class a extends WebSocketListener implements DebugPrintable {
StringBuilder L = c.d.b.a.a.L("[CONNECT] ");
L.append(this.C);
j(L.toString());
if (this.q != null) {
this.F.e(this.B, "Connect called with already existing websocket", null, null);
if (this.r != null) {
this.F.e(this.l, "Connect called with already existing websocket", null, null);
c(f.i);
return;
}
this.f215y = Long.valueOf(this.H.currentTimeMillis());
TimerTask timerTask = this.f214x;
this.f216z = Long.valueOf(this.H.currentTimeMillis());
TimerTask timerTask = this.f215y;
if (timerTask != null) {
timerTask.cancel();
}
g gVar = new g(this);
this.f214x = gVar;
this.m.schedule(gVar, 20000);
this.f215y = gVar;
this.n.schedule(gVar, 20000);
x.a aVar = new x.a();
aVar.a(1, TimeUnit.MINUTES);
SSLSocketFactory sSLSocketFactory = this.E;
@ -671,18 +677,18 @@ public final class a extends WebSocketListener implements DebugPrintable {
x xVar = new x(aVar);
z.a aVar3 = new z.a();
aVar3.f(D);
this.q = xVar.g(aVar3.a(), this);
this.r = xVar.g(aVar3.a(), this);
}
public final void h(boolean z2, Integer num, String str) {
k("[DISCONNECT] (" + z2 + ", " + num + ", " + str + ')');
c(null);
this.r = null;
this.f213s = null;
this.A = false;
this.f216z = c.DISCONNECTED;
this.t = null;
this.B = false;
this.A = c.DISCONNECTED;
b();
for (d dVar : this.o) {
for (d dVar : this.p) {
m.checkNotNullExpressionValue(dVar, "it");
dVar.b(z2, num, str);
}
@ -691,52 +697,52 @@ public final class a extends WebSocketListener implements DebugPrintable {
public final void i(long j2, String str, boolean z2) {
m.checkNotNullParameter(str, "reason");
b();
if (this.q != null) {
if (this.r != null) {
j("Performing an immediate heartbeat on existing socket: " + str);
this.v.cancel();
this.w.cancel();
b bVar = new b(this);
this.v = bVar;
this.m.schedule(bVar, j2);
this.w = bVar;
this.n.schedule(bVar, j2);
} else if (!z2) {
j("Immediate heartbeat requested, but is disconnected and a reset was not requested: " + str);
} else if (this.n.isPending() && this.q == null) {
} else if (this.o.isPending() && this.r == null) {
j("Connection backoff reset Immediate heartbeat when socket was disconnected.");
this.n.succeed();
this.o.succeed();
m(false, 4802, "Reset backoff.");
}
}
public final void j(String str) {
Logger.i$default(this.F, this.B, str, null, 4, null);
Logger.i$default(this.F, this.l, str, null, 4, null);
}
public final void k(String str) {
Logger.w$default(this.F, this.B, str, null, 4, null);
Logger.w$default(this.F, this.l, str, null, 4, null);
}
public final void l() {
if (this.u) {
this.u = false;
if (this.v) {
this.v = false;
o(3, String.valueOf(this.H.currentTimeMillis()));
Long l2 = this.t;
Long l2 = this.u;
if (l2 != null) {
b bVar = new b(this);
this.v = bVar;
this.m.schedule(bVar, l2.longValue());
this.w = bVar;
this.n.schedule(bVar, l2.longValue());
return;
}
k("onHeartbeatInterval called when heartbeatInterval was null");
return;
}
c(d.i);
String H = c.d.b.a.a.H(new Object[]{Double.valueOf(((double) this.n.fail(new e(this))) / 1000.0d)}, 1, "%.2f", "java.lang.String.format(this, *args)");
String H = c.d.b.a.a.H(new Object[]{Double.valueOf(((double) this.o.fail(new e(this))) / 1000.0d)}, 1, "%.2f", "java.lang.String.format(this, *args)");
k("[ACK TIMEOUT] reconnecting in " + H + " seconds.");
}
public final void m(boolean z2, Integer num, String str) {
j("[RECONNECT] wasFatal=" + z2 + " code=" + num + " reason=" + str);
c(l.i);
this.f216z = c.RECONNECTING;
this.A = c.RECONNECTING;
g();
}
@ -751,23 +757,23 @@ public final class a extends WebSocketListener implements DebugPrintable {
}
public final void o(int i2, Object obj) {
WebSocket webSocket = this.q;
WebSocket webSocket = this.r;
if (webSocket == null) {
StringBuilder L = c.d.b.a.a.L("opcode() websocket null. opcode: ");
L.append(Opcodes.INSTANCE.getNameOf(i2));
this.F.e(this.B, L.toString(), null, null);
this.F.e(this.l, L.toString(), null, null);
return;
}
try {
String m = this.l.m(new Payloads.Outgoing(i2, obj));
String m = this.m.m(new Payloads.Outgoing(i2, obj));
Logger logger = this.F;
String str = this.B;
String str = this.l;
Logger.d$default(logger, str, "sending (" + Opcodes.INSTANCE.getNameOf(i2) + "): " + m, null, 4, null);
m.checkNotNullExpressionValue(m, "json");
webSocket.a(m);
} catch (Exception unused) {
Logger logger2 = this.F;
String str2 = this.B;
String str2 = this.l;
Logger.w$default(logger2, str2, "exception sending opcode: " + i2 + " and payload: " + obj, null, 4, null);
}
}
@ -799,7 +805,7 @@ public final class a extends WebSocketListener implements DebugPrintable {
public void onMessage(WebSocket webSocket, String str) {
m.checkNotNullParameter(webSocket, "webSocket");
m.checkNotNullParameter(str, "text");
Object g2 = this.l.g(str, Payloads.Incoming.class);
Object g2 = this.m.g(str, Payloads.Incoming.class);
super.onMessage(webSocket, str);
n(new j(this, webSocket, (Payloads.Incoming) c.i.a.f.e.o.c.q0(Payloads.Incoming.class).cast(g2)));
}

View file

@ -61,7 +61,7 @@ public final class s extends o implements Function0<Unit> {
a aVar3 = new a(replace$default2, str2, sSLSocketFactory, rtcConnection.S, rtcConnection.R.c(), rtcConnection.T, rtcConnection.k);
d0 d0Var = rtcConnection.J;
m.checkNotNullParameter(d0Var, "listener");
aVar3.o.add(d0Var);
aVar3.p.add(d0Var);
aVar3.f();
rtcConnection.v = aVar3;
}

View file

@ -38,7 +38,7 @@ public final /* synthetic */ class z extends k implements Function1<Pair<? exten
}
m.checkNotNullParameter(linkedHashMap, "wants");
aVar.b();
if (aVar.p >= 5) {
if (aVar.q >= 5) {
aVar.o(15, linkedHashMap);
}
}

View file

@ -4,7 +4,7 @@ import com.discord.api.guildmember.GuildMember;
import com.discord.api.presence.Presence;
import com.discord.api.utcdatetime.UtcDateTime;
/* compiled from: AugmentedThreadMember.kt */
public final class AugmentedThreadMember extends ThreadMember {
public final class AugmentedThreadMember {
private final int flags;
/* renamed from: id reason: collision with root package name */
@ -14,31 +14,23 @@ public final class AugmentedThreadMember extends ThreadMember {
private final Presence presence;
private final long userId;
@Override // com.discord.api.thread.ThreadMember
public int a() {
public final int a() {
return this.flags;
}
@Override // com.discord.api.thread.ThreadMember
public long b() {
return this.f1578id;
}
@Override // com.discord.api.thread.ThreadMember
public UtcDateTime c() {
public final UtcDateTime b() {
return this.joinTimestamp;
}
@Override // com.discord.api.thread.ThreadMember
public long d() {
return this.userId;
}
public final GuildMember e() {
public final GuildMember c() {
return this.member;
}
public final Presence f() {
public final Presence d() {
return this.presence;
}
public final long e() {
return this.userId;
}
}

View file

@ -172,7 +172,7 @@ public class App extends Application {
loggingProvider.init(appLog);
c.i.c.c.e(this);
String str = null;
if (BuildUtils.INSTANCE.isValidBuildVersionName("82.9 - Beta")) {
if (BuildUtils.INSTANCE.isValidBuildVersionName("82.11 - Beta")) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
} else {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false);

View file

@ -1,5 +1,6 @@
package com.discord.models.domain;
import com.discord.api.premium.SubscriptionInterval;
import com.discord.models.domain.ModelSubscription;
import com.discord.models.domain.premium.SubscriptionPlanType;
import d0.t.o;
@ -26,8 +27,9 @@ public abstract class HasSubscriptionItems {
}
public final long getPremiumBasePlanId() {
SubscriptionPlanType.Companion companion = SubscriptionPlanType.Companion;
return companion.getBasePlanFromSubscriptionItems(getItems(), companion.from(getItems().get(0).getPlanId()).getInterval()).getPlanId();
ModelSubscription.SubscriptionItem subscriptionItem = (ModelSubscription.SubscriptionItem) u.firstOrNull((List<? extends Object>) getItems());
Long valueOf = subscriptionItem != null ? Long.valueOf(subscriptionItem.getPlanId()) : null;
return SubscriptionPlanType.Companion.getBasePlanFromSubscriptionItems(getItems(), valueOf != null ? SubscriptionPlanType.Companion.from(valueOf.longValue()).getInterval() : SubscriptionInterval.MONTHLY).getPlanId();
}
public final Long getPremiumGuildPlanId() {

View file

@ -648,7 +648,7 @@ public final class RtcConnection implements DebugPrintable, MediaSinkWantsManage
this.p.cancel();
c.a.r.l0.a aVar = this.v;
if (aVar != null) {
aVar.o.clear();
aVar.p.clear();
aVar.e();
}
this.v = null;

View file

@ -15,7 +15,7 @@ public final class StoreClientVersion extends Store {
private int clientMinVersion;
private final String clientMinVersionKey = "CLIENT_OUTDATED_KEY";
private final SerializedSubject<Boolean, Boolean> clientOutdatedSubject = new SerializedSubject<>(BehaviorSubject.l0(Boolean.FALSE));
private final int clientVersion = 82109;
private final int clientVersion = 82111;
public static final /* synthetic */ void access$setClientMinVersion(StoreClientVersion storeClientVersion, int i) {
storeClientVersion.setClientMinVersion(i);

View file

@ -238,9 +238,9 @@ public final class StoreGameParty extends StoreV2 {
if (a != null) {
ArrayList<Presence> arrayList = new ArrayList();
for (AugmentedThreadMember augmentedThreadMember : a) {
Presence f = augmentedThreadMember.f();
if (f != null) {
arrayList.add(f);
Presence d = augmentedThreadMember.d();
if (d != null) {
arrayList.add(d);
}
}
for (Presence presence : arrayList) {

View file

@ -440,9 +440,9 @@ public final class StoreGuilds extends StoreV2 {
if (a != null) {
ArrayList arrayList2 = new ArrayList();
for (AugmentedThreadMember augmentedThreadMember : a) {
com.discord.api.guildmember.GuildMember e = augmentedThreadMember.e();
if (e != null) {
arrayList2.add(e);
com.discord.api.guildmember.GuildMember c2 = augmentedThreadMember.c();
if (c2 != null) {
arrayList2.add(c2);
}
}
arrayList = arrayList2;

View file

@ -333,7 +333,7 @@ public final class StorePermissions extends StoreV2 {
if (!it.hasNext()) {
break;
}
if (((AugmentedThreadMember) it.next()).d() == getMeId()) {
if (((AugmentedThreadMember) it.next()).e() == getMeId()) {
z2 = true;
continue;
} else {

View file

@ -102,8 +102,8 @@ public final class StoreThreadMembers extends StoreV2 {
List<AugmentedThreadMember> a = threadMembersUpdate.a();
if (a != null) {
for (AugmentedThreadMember augmentedThreadMember : a) {
GuildMember e = augmentedThreadMember.e();
Long valueOf = (e == null || (j = e.j()) == null) ? null : Long.valueOf(j.i());
GuildMember c2 = augmentedThreadMember.c();
Long valueOf = (c2 == null || (j = c2.j()) == null) ? null : Long.valueOf(j.i());
if (valueOf != null) {
Set<Long> set = this.memberLists.get(Long.valueOf(threadMembersUpdate.c()));
if (set != null) {

View file

@ -276,7 +276,7 @@ public final class StoreThreadsJoined extends StoreV2 {
break;
}
Object next = it.next();
if (((AugmentedThreadMember) next).d() == id2) {
if (((AugmentedThreadMember) next).e() == id2) {
z2 = true;
continue;
} else {
@ -291,7 +291,7 @@ public final class StoreThreadsJoined extends StoreV2 {
augmentedThreadMember = augmentedThreadMember;
}
if (augmentedThreadMember != null) {
this.joinedThreads.put(Long.valueOf(threadMembersUpdate.c()), new JoinedThread(threadMembersUpdate.c(), threadMembersUpdate.b(), augmentedThreadMember.a(), augmentedThreadMember.c()));
this.joinedThreads.put(Long.valueOf(threadMembersUpdate.c()), new JoinedThread(threadMembersUpdate.c(), threadMembersUpdate.b(), augmentedThreadMember.a(), augmentedThreadMember.b()));
markChanged();
}
}

View file

@ -363,14 +363,14 @@ public final class StoreUser extends StoreV2 {
List<AugmentedThreadMember> a = threadMembersUpdate.a();
if (a != null) {
for (AugmentedThreadMember augmentedThreadMember : a) {
GuildMember e = augmentedThreadMember.e();
if (e != null) {
updateUser(e.j());
GuildMember c2 = augmentedThreadMember.c();
if (c2 != null) {
updateUser(c2.j());
}
Presence f = augmentedThreadMember.f();
User f2 = f != null ? f.f() : null;
if (f2 != null) {
updateUser(f2);
Presence d = augmentedThreadMember.d();
User f = d != null ? d.f() : null;
if (f != null) {
updateUser(f);
}
}
}

View file

@ -565,9 +565,9 @@ public final class StoreUserPresence extends StoreV2 {
List<AugmentedThreadMember> a = threadMembersUpdate.a();
if (a != null) {
for (AugmentedThreadMember augmentedThreadMember : a) {
com.discord.api.presence.Presence f = augmentedThreadMember.f();
if (f != null) {
handlePresenceUpdate(threadMembersUpdate.b(), augmentedThreadMember.d(), f.e(), f.c(), f.b());
com.discord.api.presence.Presence d = augmentedThreadMember.d();
if (d != null) {
handlePresenceUpdate(threadMembersUpdate.b(), augmentedThreadMember.e(), d.e(), d.c(), d.b());
}
}
}

View file

@ -77,7 +77,7 @@ public final class AnalyticSuperProperties {
private final void setBaselineProperties() {
String locale = Locale.getDefault().toString();
m.checkNotNullExpressionValue(locale, "Locale.getDefault().toString()");
updateSuperProperties(h0.mapOf(o.to("browser", "Discord Android"), o.to("browser_user_agent", "Discord-Android/82109"), o.to("client_build_number", 82109), o.to("client_version", "82.9 - Beta"), o.to("device", Build.MODEL + ", " + Build.PRODUCT), o.to("os", "Android"), o.to("os_sdk_version", String.valueOf(Build.VERSION.SDK_INT)), o.to("os_version", Build.VERSION.RELEASE), o.to("system_locale", t.replace$default(locale, "_", "-", false, 4, (Object) null))));
updateSuperProperties(h0.mapOf(o.to("browser", "Discord Android"), o.to("browser_user_agent", "Discord-Android/82111"), o.to("client_build_number", 82111), o.to("client_version", "82.11 - Beta"), o.to("device", Build.MODEL + ", " + Build.PRODUCT), o.to("os", "Android"), o.to("os_sdk_version", String.valueOf(Build.VERSION.SDK_INT)), o.to("os_version", Build.VERSION.RELEASE), o.to("system_locale", t.replace$default(locale, "_", "-", false, 4, (Object) null))));
}
private final void setSuperProperties(Map<String, ? extends Object> map) {

View file

@ -1,17 +1,40 @@
package com.discord.utilities.networking;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.logging.LoggingProvider;
import com.discord.utilities.networking.Backoff;
import java.util.TimerTask;
import java.util.concurrent.ExecutorService;
import kotlin.jvm.functions.Function0;
/* compiled from: Backoff.kt */
public final class Backoff$TimerScheduler$schedule$1 extends TimerTask {
public final /* synthetic */ Function0 $action;
public final /* synthetic */ Backoff.TimerScheduler this$0;
public Backoff$TimerScheduler$schedule$1(Function0 function0) {
public Backoff$TimerScheduler$schedule$1(Backoff.TimerScheduler timerScheduler, Function0 function0) {
this.this$0 = timerScheduler;
this.$action = function0;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARNING: Unknown variable types count: 1 */
@Override // java.util.TimerTask, java.lang.Runnable
public void run() {
this.$action.mo1invoke();
if (Backoff.TimerScheduler.access$getDelegateExecutor$p(this.this$0) == null) {
this.$action.mo1invoke();
return;
}
Logger logger = LoggingProvider.INSTANCE.get();
if (Backoff.TimerScheduler.access$getDelegateExecutor$p(this.this$0).isShutdown()) {
Logger.i$default(logger, Backoff.TimerScheduler.access$getTag$p(this.this$0), "skipping delayed task. executor is not running", null, 4, null);
return;
}
Logger.v$default(logger, Backoff.TimerScheduler.access$getTag$p(this.this$0), "TimerScheduler posting to delegate scheduler", null, 4, null);
ExecutorService access$getDelegateExecutor$p = Backoff.TimerScheduler.access$getDelegateExecutor$p(this.this$0);
Function0 function0 = this.$action;
if (function0 != null) {
function0 = new Backoff$sam$java_lang_Runnable$0(function0);
}
access$getDelegateExecutor$p.execute((Runnable) function0);
}
}

View file

@ -0,0 +1,17 @@
package com.discord.utilities.networking;
import d0.z.d.m;
import kotlin.jvm.functions.Function0;
/* compiled from: Backoff.kt */
public final class Backoff$sam$java_lang_Runnable$0 implements Runnable {
private final /* synthetic */ Function0 function;
public Backoff$sam$java_lang_Runnable$0(Function0 function0) {
this.function = function0;
}
@Override // java.lang.Runnable
public final /* synthetic */ void run() {
m.checkNotNullExpressionValue(this.function.mo1invoke(), "invoke(...)");
}
}

View file

@ -3,6 +3,7 @@ package com.discord.utilities.networking;
import d0.z.d.m;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ExecutorService;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
@ -26,8 +27,33 @@ public final class Backoff {
/* compiled from: Backoff.kt */
public static final class TimerScheduler extends Timer implements Scheduler {
private final ExecutorService delegateExecutor;
private final String tag;
private TimerTask timeoutTimerTask;
public TimerScheduler() {
this(null, null, 3, null);
}
public TimerScheduler(String str, ExecutorService executorService) {
m.checkNotNullParameter(str, "tag");
this.tag = str;
this.delegateExecutor = executorService;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ TimerScheduler(String str, ExecutorService executorService, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? "TimerScheduler" : str, (i & 2) != 0 ? null : executorService);
}
public static final /* synthetic */ ExecutorService access$getDelegateExecutor$p(TimerScheduler timerScheduler) {
return timerScheduler.delegateExecutor;
}
public static final /* synthetic */ String access$getTag$p(TimerScheduler timerScheduler) {
return timerScheduler.tag;
}
@Override // java.util.Timer, com.discord.utilities.networking.Backoff.Scheduler
public synchronized void cancel() {
TimerTask timerTask = this.timeoutTimerTask;
@ -43,7 +69,7 @@ public final class Backoff {
if (timerTask != null) {
timerTask.cancel();
}
Backoff$TimerScheduler$schedule$1 backoff$TimerScheduler$schedule$1 = new Backoff$TimerScheduler$schedule$1(function0);
Backoff$TimerScheduler$schedule$1 backoff$TimerScheduler$schedule$1 = new Backoff$TimerScheduler$schedule$1(this, function0);
this.timeoutTimerTask = backoff$TimerScheduler$schedule$1;
schedule(backoff$TimerScheduler$schedule$1, j);
}
@ -65,7 +91,7 @@ public final class Backoff {
/* JADX WARNING: Illegal instructions before constructor call */
public /* synthetic */ Backoff(long j, long j2, int i, boolean z2, Scheduler scheduler, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(r0, (i2 & 2) != 0 ? ((long) 10) * r0 : j2, (i2 & 4) != 0 ? Integer.MAX_VALUE : i, (i2 & 8) != 0 ? true : z2, (i2 & 16) != 0 ? new TimerScheduler() : scheduler);
this(r0, (i2 & 2) != 0 ? ((long) 10) * r0 : j2, (i2 & 4) != 0 ? Integer.MAX_VALUE : i, (i2 & 8) != 0 ? true : z2, (i2 & 16) != 0 ? new TimerScheduler(null, null, 3, null) : scheduler);
long j3 = (i2 & 1) != 0 ? 500 : j;
}

View file

@ -177,7 +177,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
public String getUserAgent() {
return "Discord-Android/82109";
return "Discord-Android/82111";
}
}

View file

@ -100,7 +100,7 @@ public final class WidgetFatalCrash extends AppFragment {
textView2.setText(b.j(this, 2131887892, objArr2, null, 4));
TextView textView3 = getBinding().b;
m.checkNotNullExpressionValue(textView3, "binding.fatalCrashAppVersion");
textView3.setText(b.j(this, 2131887885, new Object[]{"82.9 - Beta"}, null, 4));
textView3.setText(b.j(this, 2131887885, new Object[]{"82.11 - Beta"}, null, 4));
TextView textView4 = getBinding().d;
m.checkNotNullExpressionValue(textView4, "binding.fatalCrashOsVersion");
textView4.setText(b.j(this, 2131887888, new Object[]{String.valueOf(Build.VERSION.SDK_INT)}, null, 4));

View file

@ -332,7 +332,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
TextView textView = binding.f;
m.checkNotNullExpressionValue(textView, "appInfoHeader");
String string = getString(2131886360);
textView.setText(string + " - 82.9 - Beta (82109)");
textView.setText(string + " - 82.11 - Beta (82111)");
binding.f1921y.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$2(this));
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$4.INSTANCE);
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);

View file

@ -742,10 +742,13 @@ public final class WidgetSettingsPremium extends AppFragment {
getBinding().f1938c.e.setOnClickListener(new WidgetSettingsPremium$configurePaymentInfo$2(isGoogleSubscription, premiumSubscription));
}
/* JADX WARNING: Code restructure failed: missing block: B:57:0x00df, code lost:
if (r2 != null) goto L_0x0106;
/* JADX WARNING: Code restructure failed: missing block: B:62:0x00ea, code lost:
if (r2 != null) goto L_0x0111;
*/
/* JADX WARNING: Removed duplicated region for block: B:24:0x0046 */
/* JADX WARNING: Removed duplicated region for block: B:25:0x0048 */
private final void configureStatusNotice(ModelSubscription modelSubscription, Map<String, ? extends SkuDetails> map) {
boolean z2;
CharSequence charSequence;
CharSequence charSequence2;
SubscriptionPlanType subscriptionPlanType;
@ -753,82 +756,95 @@ public final class WidgetSettingsPremium extends AppFragment {
CharSequence charSequence3;
String paymentGatewayPlanId;
ModelSubscription.Status status;
boolean z2 = (modelSubscription != null ? modelSubscription.getRenewalMutations() : null) != null;
boolean z3 = (modelSubscription != null ? modelSubscription.getRenewalMutations() : null) != null;
boolean isAccountHold = (modelSubscription == null || (status = modelSubscription.getStatus()) == null) ? false : status.isAccountHold();
boolean z3 = z2 || isAccountHold;
if (z3 || isAccountHold) {
if ((modelSubscription != null ? modelSubscription.getStatus() : null) != ModelSubscription.Status.CANCELED) {
z2 = true;
CardView cardView = getBinding().n;
m.checkNotNullExpressionValue(cardView, "binding.premiumSettingsStatusNoticeContainer");
int i = 8;
cardView.setVisibility(!z2 ? 0 : 8);
if (z2 && modelSubscription != null) {
boolean isGoogleSubscription = modelSubscription.isGoogleSubscription();
if (z3) {
String renderUtcDate$default = TimeUtils.renderUtcDate$default(TimeUtils.INSTANCE, modelSubscription.getCurrentPeriodEnd(), requireContext(), (String) null, (java.text.DateFormat) null, 0, 28, (Object) null);
ModelSubscription.SubscriptionRenewalMutations renewalMutations = modelSubscription.getRenewalMutations();
SkuDetails skuDetails = (renewalMutations == null || (paymentGatewayPlanId = renewalMutations.getPaymentGatewayPlanId()) == null || map == null) ? null : (SkuDetails) map.get(paymentGatewayPlanId);
SubscriptionPlanType[] values = SubscriptionPlanType.values();
int i2 = 0;
while (true) {
if (i2 >= 10) {
subscriptionPlanType2 = null;
break;
}
subscriptionPlanType2 = values[i2];
long planId = subscriptionPlanType2.getPlanId();
ModelSubscription.SubscriptionRenewalMutations renewalMutations2 = modelSubscription.getRenewalMutations();
if (renewalMutations2 != null && planId == renewalMutations2.getPremiumBasePlanId()) {
break;
}
i2++;
}
if (!isGoogleSubscription || skuDetails == null) {
charSequence3 = getPlanString(subscriptionPlanType2);
} else {
charSequence3 = skuDetails.a();
m.checkNotNullExpressionValue(charSequence3, "skuDetails.description");
}
charSequence = b.j(this, 2131892286, new Object[]{charSequence3, renderUtcDate$default}, null, 4);
} else if (isAccountHold) {
String paymentGatewayPlanId2 = modelSubscription.getPaymentGatewayPlanId();
if (paymentGatewayPlanId2 != null) {
SkuDetails skuDetails2 = map != null ? (SkuDetails) map.get(paymentGatewayPlanId2) : null;
if (skuDetails2 != null) {
charSequence2 = skuDetails2.a();
}
}
SubscriptionPlanType[] values2 = SubscriptionPlanType.values();
int i3 = 0;
while (true) {
if (i3 >= 10) {
subscriptionPlanType = null;
break;
}
subscriptionPlanType = values2[i3];
if (modelSubscription.hasAnyOfPlans(m0.setOf(Long.valueOf(subscriptionPlanType.getPlanId())))) {
break;
}
i3++;
}
charSequence2 = getPlanString(subscriptionPlanType);
charSequence = b.j(this, 2131892315, new Object[]{TimeUtils.renderUtcDate$default(TimeUtils.INSTANCE, modelSubscription.getAccountHoldEstimatedExpirationTimestamp(), requireContext(), 0, 4, null), charSequence2}, null, 4);
} else {
charSequence = "";
}
TextView textView = getBinding().o;
m.checkNotNullExpressionValue(textView, "binding.premiumSettingsStatusNoticeTv");
textView.setText(charSequence);
Button button = getBinding().m;
m.checkNotNullExpressionValue(button, "binding.premiumSettingsStatusNoticeButton");
if (isAccountHold) {
i = 0;
}
button.setVisibility(i);
if (isAccountHold) {
Button button2 = getBinding().m;
m.checkNotNullExpressionValue(button2, "binding.premiumSettingsStatusNoticeButton");
b.m(button2, 2131892314, new Object[0], null, 4);
getBinding().m.setOnClickListener(new WidgetSettingsPremium$configureStatusNotice$1(this, modelSubscription));
return;
}
return;
}
}
}
z2 = false;
CardView cardView = getBinding().n;
m.checkNotNullExpressionValue(cardView, "binding.premiumSettingsStatusNoticeContainer");
int i = 8;
cardView.setVisibility(z3 ? 0 : 8);
if (z3 && modelSubscription != null) {
boolean isGoogleSubscription = modelSubscription.isGoogleSubscription();
if (z2) {
String renderUtcDate$default = TimeUtils.renderUtcDate$default(TimeUtils.INSTANCE, modelSubscription.getCurrentPeriodEnd(), requireContext(), (String) null, (java.text.DateFormat) null, 0, 28, (Object) null);
ModelSubscription.SubscriptionRenewalMutations renewalMutations = modelSubscription.getRenewalMutations();
SkuDetails skuDetails = (renewalMutations == null || (paymentGatewayPlanId = renewalMutations.getPaymentGatewayPlanId()) == null || map == null) ? null : (SkuDetails) map.get(paymentGatewayPlanId);
SubscriptionPlanType[] values = SubscriptionPlanType.values();
int i2 = 0;
while (true) {
if (i2 >= 10) {
subscriptionPlanType2 = null;
break;
}
subscriptionPlanType2 = values[i2];
long planId = subscriptionPlanType2.getPlanId();
ModelSubscription.SubscriptionRenewalMutations renewalMutations2 = modelSubscription.getRenewalMutations();
if (renewalMutations2 != null && planId == renewalMutations2.getPremiumBasePlanId()) {
break;
}
i2++;
}
if (!isGoogleSubscription || skuDetails == null) {
charSequence3 = getPlanString(subscriptionPlanType2);
} else {
charSequence3 = skuDetails.a();
m.checkNotNullExpressionValue(charSequence3, "skuDetails.description");
}
charSequence = b.j(this, 2131892286, new Object[]{charSequence3, renderUtcDate$default}, null, 4);
} else if (isAccountHold) {
String paymentGatewayPlanId2 = modelSubscription.getPaymentGatewayPlanId();
if (paymentGatewayPlanId2 != null) {
SkuDetails skuDetails2 = map != null ? (SkuDetails) map.get(paymentGatewayPlanId2) : null;
if (skuDetails2 != null) {
charSequence2 = skuDetails2.a();
}
}
SubscriptionPlanType[] values2 = SubscriptionPlanType.values();
int i3 = 0;
while (true) {
if (i3 >= 10) {
subscriptionPlanType = null;
break;
}
subscriptionPlanType = values2[i3];
if (modelSubscription.hasAnyOfPlans(m0.setOf(Long.valueOf(subscriptionPlanType.getPlanId())))) {
break;
}
i3++;
}
charSequence2 = getPlanString(subscriptionPlanType);
charSequence = b.j(this, 2131892315, new Object[]{TimeUtils.renderUtcDate$default(TimeUtils.INSTANCE, modelSubscription.getAccountHoldEstimatedExpirationTimestamp(), requireContext(), 0, 4, null), charSequence2}, null, 4);
} else {
charSequence = "";
}
TextView textView = getBinding().o;
m.checkNotNullExpressionValue(textView, "binding.premiumSettingsStatusNoticeTv");
textView.setText(charSequence);
Button button = getBinding().m;
m.checkNotNullExpressionValue(button, "binding.premiumSettingsStatusNoticeButton");
if (isAccountHold) {
i = 0;
}
button.setVisibility(i);
if (isAccountHold) {
Button button2 = getBinding().m;
m.checkNotNullExpressionValue(button2, "binding.premiumSettingsStatusNoticeButton");
b.m(button2, 2131892314, new Object[0], null, 4);
getBinding().m.setOnClickListener(new WidgetSettingsPremium$configureStatusNotice$1(this, modelSubscription));
}
cardView.setVisibility(!z2 ? 0 : 8);
if (z2) {
}
}

View file

@ -1341,7 +1341,7 @@
<string name="color_picker_presets">Presets</string>
<string name="color_picker_title">Select a color</string>
<string name="color_picker_transparency">Transparency</string>
<string name="res_2131887421_com_crashlytics_android_build_id">b98318c12ac84e23aff9ec103d261bc0</string>
<string name="res_2131887421_com_crashlytics_android_build_id">f31707f8e813423498473e05c7641788</string>
<string name="coming_soon">Coming Soon</string>
<string name="command_accessibility_desc_app_header_item">Slash command application {applicationName}</string>
<string name="command_accessibility_desc_app_item">{applicationName} application</string>