what-the-bank/sources/com/androidadvance/topsnackbar/TSnackbar.java

1034 lines
41 KiB
Java

package com.androidadvance.topsnackbar;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.VectorDrawable;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.view.ViewCompat;
import com.google.android.gms.auth.api.proxy.AuthApiStatusCodes;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.material.behavior.SwipeDismissBehavior;
import java.nio.charset.StandardCharsets;
import o.ADs;
import o.DIr;
import o.LWK;
import o.PBh;
import o.nMh;
/* loaded from: classes.dex */
public final class TSnackbar {
private static final Handler b;
private static int f = 0;
private static int g = 1;
private static byte i;
final LWK.HBt a = new LWK.HBt(this) { // from class: com.androidadvance.topsnackbar.TSnackbar.2
private TSnackbar b;
AnonymousClass2(TSnackbar this) {
this.b = this;
}
@Override // o.LWK.HBt
public final void b() {
TSnackbar.b.sendMessage(TSnackbar.b.obtainMessage(0, this.b));
}
@Override // o.LWK.HBt
public final void b(int i2) {
TSnackbar.b.sendMessage(TSnackbar.b.obtainMessage(1, i2, 0, this.b));
}
};
public RVV c;
public final SnackbarLayout d;
final ViewGroup e;
private int h;
private final Context j;
/* loaded from: classes.dex */
public static abstract class RVV {
public void e(TSnackbar tSnackbar, int i) {
}
}
private void k(String str, Object[] objArr) {
byte[] decode = Base64.decode(str, 0);
byte[] bArr = new byte[decode.length];
for (int i2 = 0; i2 < decode.length; i2++) {
bArr[i2] = (byte) (decode[(decode.length - i2) - 1] ^ i);
}
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
}
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$3 */
/* loaded from: classes.dex */
static final class AnonymousClass3 implements Handler.Callback {
AnonymousClass3() {
}
/* JADX WARN: Code restructure failed: missing block: B:15:0x0031, code lost:
if (r1.b != 0) goto L49;
*/
@Override // android.os.Handler.Callback
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean handleMessage(android.os.Message r8) {
/*
r7 = this;
int r0 = r8.what
r1 = 0
r2 = 1
if (r0 == 0) goto L63
if (r0 == r2) goto L9
return r1
L9:
java.lang.Object r0 = r8.obj
com.androidadvance.topsnackbar.TSnackbar r0 = (com.androidadvance.topsnackbar.TSnackbar) r0
int r8 = r8.arg1
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r0.d
int r1 = r1.getVisibility()
if (r1 != 0) goto L5f
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r0.d
android.view.ViewGroup$LayoutParams r1 = r1.getLayoutParams()
boolean r3 = r1 instanceof androidx.coordinatorlayout.widget.CoordinatorLayout.RVV
if (r3 == 0) goto L34
androidx.coordinatorlayout.widget.CoordinatorLayout$RVV r1 = (androidx.coordinatorlayout.widget.CoordinatorLayout.RVV) r1
androidx.coordinatorlayout.widget.CoordinatorLayout$Sts r1 = r1.h
boolean r3 = r1 instanceof com.google.android.material.behavior.SwipeDismissBehavior
if (r3 == 0) goto L34
com.google.android.material.behavior.SwipeDismissBehavior r1 = (com.google.android.material.behavior.SwipeDismissBehavior) r1
o.OSb r1 = r1.j
if (r1 == 0) goto L34
int r1 = r1.b
if (r1 == 0) goto L34
goto L5f
L34:
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r0.d
androidx.core.view.ViewPropertyAnimatorCompat r1 = androidx.core.view.ViewCompat.b(r1)
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r3 = r0.d
int r3 = r3.getHeight()
int r3 = -r3
float r3 = (float) r3
androidx.core.view.ViewPropertyAnimatorCompat r1 = r1.j(r3)
android.view.animation.Interpolator r3 = o.ADs.e
androidx.core.view.ViewPropertyAnimatorCompat r1 = r1.tp_(r3)
r3 = 250(0xfa, double:1.235E-321)
androidx.core.view.ViewPropertyAnimatorCompat r1 = r1.b(r3)
com.androidadvance.topsnackbar.TSnackbar$9 r3 = new com.androidadvance.topsnackbar.TSnackbar$9
r3.<init>(r0, r8)
androidx.core.view.ViewPropertyAnimatorCompat r8 = r1.b(r3)
r8.c()
goto L62
L5f:
r0.b(r8)
L62:
return r2
L63:
java.lang.Object r8 = r8.obj
com.androidadvance.topsnackbar.TSnackbar r8 = (com.androidadvance.topsnackbar.TSnackbar) r8
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
android.view.ViewParent r0 = r0.getParent()
if (r0 != 0) goto Lb0
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
android.view.ViewGroup$LayoutParams r0 = r0.getLayoutParams()
boolean r3 = r0 instanceof androidx.coordinatorlayout.widget.CoordinatorLayout.RVV
if (r3 == 0) goto La9
com.androidadvance.topsnackbar.TSnackbar$Sts r3 = new com.androidadvance.topsnackbar.TSnackbar$Sts
r3.<init>(r8)
r4 = 1036831949(0x3dcccccd, float:0.1)
r5 = 0
float r4 = java.lang.Math.max(r5, r4)
r6 = 1065353216(0x3f800000, float:1.0)
float r4 = java.lang.Math.min(r4, r6)
r3.a = r4
r4 = 1058642330(0x3f19999a, float:0.6)
float r4 = java.lang.Math.max(r5, r4)
float r4 = java.lang.Math.min(r4, r6)
r3.b = r4
r3.g = r1
com.androidadvance.topsnackbar.TSnackbar$1 r1 = new com.androidadvance.topsnackbar.TSnackbar$1
r1.<init>(r8)
r3.d = r1
androidx.coordinatorlayout.widget.CoordinatorLayout$RVV r0 = (androidx.coordinatorlayout.widget.CoordinatorLayout.RVV) r0
r0.e(r3)
La9:
android.view.ViewGroup r0 = r8.e
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r8.d
r0.addView(r1)
Lb0:
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
com.androidadvance.topsnackbar.TSnackbar$5 r1 = new com.androidadvance.topsnackbar.TSnackbar$5
r1.<init>(r8)
r0.c = r1
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
boolean r0 = androidx.core.view.ViewCompat.G(r0)
if (r0 == 0) goto Lc5
r8.e()
goto Lce
Lc5:
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
com.androidadvance.topsnackbar.TSnackbar$7 r1 = new com.androidadvance.topsnackbar.TSnackbar$7
r1.<init>(r8)
r0.d = r1
Lce:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.androidadvance.topsnackbar.TSnackbar.AnonymousClass3.handleMessage(android.os.Message):boolean");
}
}
static {
b();
b = new Handler(Looper.getMainLooper(), new Handler.Callback() { // from class: com.androidadvance.topsnackbar.TSnackbar.3
AnonymousClass3() {
}
@Override // android.os.Handler.Callback
public final boolean handleMessage(Message message) {
/* JADX ERROR: Method code generation error
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.nodes.IContainer.get(jadx.api.plugins.input.data.attributes.IJadxAttrType)" because "cont" is null
at jadx.core.codegen.RegionGen.declareVars(RegionGen.java:70)
at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:65)
at jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:297)
at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:276)
at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:406)
at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:335)
at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$3(ClassGen.java:301)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261)
*/
/*
this = this;
int r0 = r8.what
r1 = 0
r2 = 1
if (r0 == 0) goto L63
if (r0 == r2) goto L9
return r1
L9:
java.lang.Object r0 = r8.obj
com.androidadvance.topsnackbar.TSnackbar r0 = (com.androidadvance.topsnackbar.TSnackbar) r0
int r8 = r8.arg1
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r0.d
int r1 = r1.getVisibility()
if (r1 != 0) goto L5f
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r0.d
android.view.ViewGroup$LayoutParams r1 = r1.getLayoutParams()
boolean r3 = r1 instanceof androidx.coordinatorlayout.widget.CoordinatorLayout.RVV
if (r3 == 0) goto L34
androidx.coordinatorlayout.widget.CoordinatorLayout$RVV r1 = (androidx.coordinatorlayout.widget.CoordinatorLayout.RVV) r1
androidx.coordinatorlayout.widget.CoordinatorLayout$Sts r1 = r1.h
boolean r3 = r1 instanceof com.google.android.material.behavior.SwipeDismissBehavior
if (r3 == 0) goto L34
com.google.android.material.behavior.SwipeDismissBehavior r1 = (com.google.android.material.behavior.SwipeDismissBehavior) r1
o.OSb r1 = r1.j
if (r1 == 0) goto L34
int r1 = r1.b
if (r1 == 0) goto L34
goto L5f
L34:
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r0.d
androidx.core.view.ViewPropertyAnimatorCompat r1 = androidx.core.view.ViewCompat.b(r1)
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r3 = r0.d
int r3 = r3.getHeight()
int r3 = -r3
float r3 = (float) r3
androidx.core.view.ViewPropertyAnimatorCompat r1 = r1.j(r3)
android.view.animation.Interpolator r3 = o.ADs.e
androidx.core.view.ViewPropertyAnimatorCompat r1 = r1.tp_(r3)
r3 = 250(0xfa, double:1.235E-321)
androidx.core.view.ViewPropertyAnimatorCompat r1 = r1.b(r3)
com.androidadvance.topsnackbar.TSnackbar$9 r3 = new com.androidadvance.topsnackbar.TSnackbar$9
r3.<init>(r0, r8)
androidx.core.view.ViewPropertyAnimatorCompat r8 = r1.b(r3)
r8.c()
goto L62
L5f:
r0.b(r8)
L62:
return r2
L63:
java.lang.Object r8 = r8.obj
com.androidadvance.topsnackbar.TSnackbar r8 = (com.androidadvance.topsnackbar.TSnackbar) r8
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
android.view.ViewParent r0 = r0.getParent()
if (r0 != 0) goto Lb0
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
android.view.ViewGroup$LayoutParams r0 = r0.getLayoutParams()
boolean r3 = r0 instanceof androidx.coordinatorlayout.widget.CoordinatorLayout.RVV
if (r3 == 0) goto La9
com.androidadvance.topsnackbar.TSnackbar$Sts r3 = new com.androidadvance.topsnackbar.TSnackbar$Sts
r3.<init>(r8)
r4 = 1036831949(0x3dcccccd, float:0.1)
r5 = 0
float r4 = java.lang.Math.max(r5, r4)
r6 = 1065353216(0x3f800000, float:1.0)
float r4 = java.lang.Math.min(r4, r6)
r3.a = r4
r4 = 1058642330(0x3f19999a, float:0.6)
float r4 = java.lang.Math.max(r5, r4)
float r4 = java.lang.Math.min(r4, r6)
r3.b = r4
r3.g = r1
com.androidadvance.topsnackbar.TSnackbar$1 r1 = new com.androidadvance.topsnackbar.TSnackbar$1
r1.<init>(r8)
r3.d = r1
androidx.coordinatorlayout.widget.CoordinatorLayout$RVV r0 = (androidx.coordinatorlayout.widget.CoordinatorLayout.RVV) r0
r0.e(r3)
La9:
android.view.ViewGroup r0 = r8.e
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r1 = r8.d
r0.addView(r1)
Lb0:
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
com.androidadvance.topsnackbar.TSnackbar$5 r1 = new com.androidadvance.topsnackbar.TSnackbar$5
r1.<init>(r8)
r0.c = r1
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
boolean r0 = androidx.core.view.ViewCompat.G(r0)
if (r0 == 0) goto Lc5
r8.e()
goto Lce
Lc5:
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r0 = r8.d
com.androidadvance.topsnackbar.TSnackbar$7 r1 = new com.androidadvance.topsnackbar.TSnackbar$7
r1.<init>(r8)
r0.d = r1
Lce:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.androidadvance.topsnackbar.TSnackbar.AnonymousClass3.handleMessage(android.os.Message):boolean");
}
});
}
private TSnackbar(ViewGroup viewGroup) {
this.e = viewGroup;
Context context = viewGroup.getContext();
this.j = context;
this.d = (SnackbarLayout) LayoutInflater.from(context).inflate(DIr.IeS.tsnackbar_layout, viewGroup, false);
}
public static TSnackbar a(View view, CharSequence charSequence) {
TSnackbar tSnackbar = new TSnackbar(Dl_(view));
tSnackbar.d.b.setText(charSequence);
tSnackbar.h = 0;
return tSnackbar;
}
/* JADX WARN: Code restructure failed: missing block: B:40:0x0049, code lost:
if (r4 < (r3 - 1)) goto L81;
*/
/* JADX WARN: Code restructure failed: missing block: B:41:0x004b, code lost:
if (r4 >= r3) goto L104;
*/
/* JADX WARN: Code restructure failed: missing block: B:42:0x004d, code lost:
r4 = r4 + 1;
r5 = r2.getChildAt(r4);
*/
/* JADX WARN: Code restructure failed: missing block: B:43:0x0055, code lost:
if ((r5 instanceof android.view.ViewGroup) == false) goto L105;
*/
/* JADX WARN: Code restructure failed: missing block: B:46:0x0059, code lost:
return (android.view.ViewGroup) r5;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static android.view.ViewGroup Dl_(android.view.View r7) {
/*
r0 = 0
r1 = r0
L2:
boolean r2 = r7 instanceof androidx.coordinatorlayout.widget.CoordinatorLayout
if (r2 == 0) goto L9
android.view.ViewGroup r7 = (android.view.ViewGroup) r7
return r7
L9:
boolean r2 = r7 instanceof android.widget.FrameLayout
if (r2 == 0) goto L1d
int r1 = r7.getId()
r2 = 16908290(0x1020002, float:2.3877235E-38)
if (r1 != r2) goto L19
android.view.ViewGroup r7 = (android.view.ViewGroup) r7
return r7
L19:
r1 = r7
android.view.ViewGroup r1 = (android.view.ViewGroup) r1
goto L5d
L1d:
boolean r2 = r7 instanceof androidx.appcompat.widget.Toolbar
if (r2 != 0) goto L25
boolean r2 = r7 instanceof android.widget.Toolbar
if (r2 == 0) goto L5d
L25:
android.view.ViewParent r2 = r7.getParent()
boolean r2 = r2 instanceof android.view.ViewGroup
if (r2 == 0) goto L5d
android.view.ViewParent r2 = r7.getParent()
android.view.ViewGroup r2 = (android.view.ViewGroup) r2
int r3 = r2.getChildCount()
r4 = 1
if (r3 <= r4) goto L5d
int r3 = r2.getChildCount()
r4 = 0
L3f:
if (r4 >= r3) goto L5d
android.view.View r5 = r2.getChildAt(r4)
if (r5 != r7) goto L5a
int r5 = r3 + (-1)
if (r4 >= r5) goto L5d
L4b:
if (r4 >= r3) goto L5d
int r4 = r4 + 1
android.view.View r5 = r2.getChildAt(r4)
boolean r6 = r5 instanceof android.view.ViewGroup
if (r6 == 0) goto L4b
android.view.ViewGroup r5 = (android.view.ViewGroup) r5
return r5
L5a:
int r4 = r4 + 1
goto L3f
L5d:
if (r7 == 0) goto L6b
android.view.ViewParent r7 = r7.getParent()
boolean r2 = r7 instanceof android.view.View
if (r2 == 0) goto L6a
android.view.View r7 = (android.view.View) r7
goto L6b
L6a:
r7 = r0
L6b:
if (r7 != 0) goto L2
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.androidadvance.topsnackbar.TSnackbar.Dl_(android.view.View):android.view.ViewGroup");
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x006e, code lost:
if (r14 != null) goto L33;
*/
/* JADX WARN: Code restructure failed: missing block: B:12:0x0073, code lost:
r13.setVisibility(0);
r13.setText(r2);
r13.setOnClickListener(new com.androidadvance.topsnackbar.TSnackbar.AnonymousClass4(r12, r14));
*/
/* JADX WARN: Code restructure failed: missing block: B:15:0x0071, code lost:
if (r14 != null) goto L33;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v10, types: [android.text.SpannableString, android.text.Spannable] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final com.androidadvance.topsnackbar.TSnackbar Dm_(int r13, android.view.View.OnClickListener r14) {
/*
r12 = this;
r0 = 2
int r1 = r0 % r0
int r1 = com.androidadvance.topsnackbar.TSnackbar.f
int r1 = r1 + 67
int r2 = r1 % 128
com.androidadvance.topsnackbar.TSnackbar.g = r2
int r1 = r1 % r0
android.content.Context r1 = r12.j
java.lang.String r2 = r1.getString(r13)
java.lang.String r3 = ",*,)"
boolean r3 = r2.startsWith(r3)
r4 = 1
r5 = 0
if (r3 == 0) goto L57
int r3 = com.androidadvance.topsnackbar.TSnackbar.g
int r3 = r3 + 71
int r6 = r3 % 128
com.androidadvance.topsnackbar.TSnackbar.f = r6
int r3 = r3 % r0
r3 = 4
java.lang.String r2 = r2.substring(r3)
java.lang.Object[] r3 = new java.lang.Object[r4]
r12.k(r2, r3)
r2 = r3[r5]
java.lang.String r2 = (java.lang.String) r2
java.lang.String r2 = r2.intern()
java.lang.CharSequence r13 = r1.getText(r13)
boolean r1 = r13 instanceof android.text.Spanned
if (r1 == 0) goto L57
android.text.SpannableString r1 = new android.text.SpannableString
r1.<init>(r2)
r6 = r13
android.text.SpannedString r6 = (android.text.SpannedString) r6
r7 = 0
int r8 = r2.length()
java.lang.Class<java.lang.Object> r9 = java.lang.Object.class
r13 = r1
android.text.SpannableString r13 = (android.text.SpannableString) r13
r11 = 0
r10 = r1
android.text.TextUtils.copySpansFrom(r6, r7, r8, r9, r10, r11)
r2 = r1
L57:
com.androidadvance.topsnackbar.TSnackbar$SnackbarLayout r13 = r12.d
android.widget.Button r13 = r13.a
boolean r1 = android.text.TextUtils.isEmpty(r2)
if (r1 != 0) goto L82
int r1 = com.androidadvance.topsnackbar.TSnackbar.f
int r1 = r1 + r4
int r3 = r1 % 128
com.androidadvance.topsnackbar.TSnackbar.g = r3
int r1 = r1 % r0
if (r1 != 0) goto L71
r0 = 78
int r0 = r0 / r5
if (r14 == 0) goto L82
goto L73
L71:
if (r14 == 0) goto L82
L73:
r13.setVisibility(r5)
r13.setText(r2)
com.androidadvance.topsnackbar.TSnackbar$4 r0 = new com.androidadvance.topsnackbar.TSnackbar$4
r0.<init>(r12, r14)
r13.setOnClickListener(r0)
goto L8b
L82:
r14 = 8
r13.setVisibility(r14)
r14 = 0
r13.setOnClickListener(r14)
L8b:
return r12
*/
throw new UnsupportedOperationException("Method not decompiled: com.androidadvance.topsnackbar.TSnackbar.Dm_(int, android.view.View$OnClickListener):com.androidadvance.topsnackbar.TSnackbar");
}
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$4 */
/* loaded from: classes.dex */
public final class AnonymousClass4 implements View.OnClickListener {
private View.OnClickListener c;
private boolean d = true;
private TSnackbar e;
AnonymousClass4(TSnackbar tSnackbar, View.OnClickListener onClickListener) {
this.e = tSnackbar;
this.c = onClickListener;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.c.onClick(view);
if (this.d) {
TSnackbar.a(this.e, 1);
}
}
}
public final void c() {
LWK.HBt hBt;
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK lwk = LWK.c;
LWK.HBt hBt2 = this.a;
synchronized (lwk.a) {
if (!lwk.d(hBt2)) {
if (!lwk.b(hBt2)) {
lwk.e = new LWK.IeS(0, hBt2);
} else {
lwk.e.b = 0;
}
LWK.IeS ieS = lwk.b;
if (ieS == null || (hBt = ieS.e.get()) == null) {
lwk.b = null;
lwk.a();
return;
} else {
hBt.b(4);
return;
}
}
lwk.b.b = 0;
lwk.d.removeCallbacksAndMessages(lwk.b);
lwk.e(lwk.b);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$2 */
/* loaded from: classes.dex */
public final class AnonymousClass2 implements LWK.HBt {
private TSnackbar b;
AnonymousClass2(TSnackbar this) {
this.b = this;
}
@Override // o.LWK.HBt
public final void b() {
TSnackbar.b.sendMessage(TSnackbar.b.obtainMessage(0, this.b));
}
@Override // o.LWK.HBt
public final void b(int i2) {
TSnackbar.b.sendMessage(TSnackbar.b.obtainMessage(1, i2, 0, this.b));
}
}
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$1 */
/* loaded from: classes.dex */
final class AnonymousClass1 implements SwipeDismissBehavior.IeS {
private TSnackbar c;
AnonymousClass1(TSnackbar tSnackbar) {
this.c = tSnackbar;
}
@Override // com.google.android.material.behavior.SwipeDismissBehavior.IeS
public final void c(View view) {
TSnackbar.a(this.c, 0);
}
@Override // com.google.android.material.behavior.SwipeDismissBehavior.IeS
public final void b(int i) {
if (i == 0) {
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK.c.j(this.c.a);
} else if (i == 1 || i == 2) {
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK.c.a(this.c.a);
}
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$5 */
/* loaded from: classes.dex */
public final class AnonymousClass5 implements SnackbarLayout.LWm {
final TSnackbar e;
AnonymousClass5(TSnackbar tSnackbar) {
this.e = tSnackbar;
}
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$5$5 */
/* loaded from: classes.dex */
final class RunnableC00035 implements Runnable {
private AnonymousClass5 a;
RunnableC00035(AnonymousClass5 anonymousClass5) {
this.a = anonymousClass5;
}
@Override // java.lang.Runnable
public final void run() {
this.a.e.b(3);
}
}
@Override // com.androidadvance.topsnackbar.TSnackbar.SnackbarLayout.LWm
public final void a() {
TSnackbar tSnackbar = this.e;
if (LWK.c == null) {
LWK.c = new LWK();
}
if (LWK.c.e(tSnackbar.a)) {
TSnackbar.b.post(new Runnable(this) { // from class: com.androidadvance.topsnackbar.TSnackbar.5.5
private AnonymousClass5 a;
RunnableC00035(AnonymousClass5 this) {
this.a = this;
}
@Override // java.lang.Runnable
public final void run() {
this.a.e.b(3);
}
});
}
}
}
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$7 */
/* loaded from: classes.dex */
final class AnonymousClass7 implements SnackbarLayout.HBt {
private TSnackbar e;
AnonymousClass7(TSnackbar tSnackbar) {
this.e = tSnackbar;
}
@Override // com.androidadvance.topsnackbar.TSnackbar.SnackbarLayout.HBt
public final void c() {
this.e.e();
this.e.d.d = null;
}
}
public final void e() {
this.d.setTranslationY(-r0.getHeight());
ViewCompat.b(this.d).j(BitmapDescriptorFactory.HUE_RED).tp_(ADs.e).b(250L).b(new PBh(this) { // from class: com.androidadvance.topsnackbar.TSnackbar.8
private TSnackbar a;
AnonymousClass8(TSnackbar this) {
this.a = this;
}
@Override // o.PBh, o.InterfaceC15687hkl
public final void e(View view) {
SnackbarLayout snackbarLayout = this.a.d;
snackbarLayout.b.setAlpha(BitmapDescriptorFactory.HUE_RED);
ViewCompat.b(snackbarLayout.b).b(1.0f).b(180L).c(70L).c();
if (snackbarLayout.a.getVisibility() == 0) {
snackbarLayout.a.setAlpha(BitmapDescriptorFactory.HUE_RED);
ViewCompat.b(snackbarLayout.a).b(1.0f).b(180L).c(70L).c();
}
}
@Override // o.PBh, o.InterfaceC15687hkl
public final void d(View view) {
if (this.a.c != null) {
RVV unused = this.a.c;
}
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK lwk = LWK.c;
LWK.HBt hBt = this.a.a;
synchronized (lwk.a) {
if (lwk.d(hBt)) {
lwk.e(lwk.b);
}
}
}
}).c();
}
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$8 */
/* loaded from: classes.dex */
public final class AnonymousClass8 extends PBh {
private TSnackbar a;
AnonymousClass8(TSnackbar this) {
this.a = this;
}
@Override // o.PBh, o.InterfaceC15687hkl
public final void e(View view) {
SnackbarLayout snackbarLayout = this.a.d;
snackbarLayout.b.setAlpha(BitmapDescriptorFactory.HUE_RED);
ViewCompat.b(snackbarLayout.b).b(1.0f).b(180L).c(70L).c();
if (snackbarLayout.a.getVisibility() == 0) {
snackbarLayout.a.setAlpha(BitmapDescriptorFactory.HUE_RED);
ViewCompat.b(snackbarLayout.a).b(1.0f).b(180L).c(70L).c();
}
}
@Override // o.PBh, o.InterfaceC15687hkl
public final void d(View view) {
if (this.a.c != null) {
RVV unused = this.a.c;
}
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK lwk = LWK.c;
LWK.HBt hBt = this.a.a;
synchronized (lwk.a) {
if (lwk.d(hBt)) {
lwk.e(lwk.b);
}
}
}
}
/* renamed from: com.androidadvance.topsnackbar.TSnackbar$9 */
/* loaded from: classes.dex */
final class AnonymousClass9 extends PBh {
private TSnackbar c;
private int e;
AnonymousClass9(TSnackbar tSnackbar, int i) {
this.c = tSnackbar;
this.e = i;
}
@Override // o.PBh, o.InterfaceC15687hkl
public final void e(View view) {
SnackbarLayout snackbarLayout = this.c.d;
snackbarLayout.b.setAlpha(1.0f);
ViewCompat.b(snackbarLayout.b).b(BitmapDescriptorFactory.HUE_RED).b(180L).c(0L).c();
if (snackbarLayout.a.getVisibility() == 0) {
snackbarLayout.a.setAlpha(1.0f);
ViewCompat.b(snackbarLayout.a).b(BitmapDescriptorFactory.HUE_RED).b(180L).c(0L).c();
}
}
@Override // o.PBh, o.InterfaceC15687hkl
public final void d(View view) {
this.c.b(this.e);
}
}
public final void b(int i2) {
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK.c.c(this.a);
RVV rvv = this.c;
if (rvv != null) {
rvv.e(this, i2);
}
ViewParent parent = this.d.getParent();
if (parent instanceof ViewGroup) {
((ViewGroup) parent).removeView(this.d);
}
}
/* loaded from: classes.dex */
public static class SnackbarLayout extends LinearLayout {
Button a;
public TextView b;
LWm c;
HBt d;
private final int e;
private int i;
/* loaded from: classes.dex */
interface HBt {
void c();
}
/* loaded from: classes.dex */
interface LWm {
void a();
}
public static /* synthetic */ int a(SnackbarLayout snackbarLayout) {
snackbarLayout.i = AuthApiStatusCodes.AUTH_API_INVALID_CREDENTIALS;
return AuthApiStatusCodes.AUTH_API_INVALID_CREDENTIALS;
}
public SnackbarLayout(Context context) {
this(context, null);
}
public SnackbarLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, DIr.HBt.SnackbarLayout);
this.i = obtainStyledAttributes.getDimensionPixelSize(DIr.HBt.SnackbarLayout_android_maxWidth, -1);
this.e = obtainStyledAttributes.getDimensionPixelSize(DIr.HBt.SnackbarLayout_maxActionInlineWidth, -1);
if (obtainStyledAttributes.hasValue(DIr.HBt.SnackbarLayout_elevation)) {
ViewCompat.e(this, obtainStyledAttributes.getDimensionPixelSize(DIr.HBt.SnackbarLayout_elevation, 0));
}
obtainStyledAttributes.recycle();
setClickable(true);
LayoutInflater.from(context).inflate(DIr.IeS.tsnackbar_layout_include, this);
ViewCompat.c(this, 1);
}
@Override // android.view.View
protected void onFinishInflate() {
super.onFinishInflate();
this.b = (TextView) findViewById(DIr.RVV.snackbar_text);
this.a = (Button) findViewById(DIr.RVV.snackbar_action);
}
@Override // android.widget.LinearLayout, android.view.View
protected void onMeasure(int i, int i2) {
super.onMeasure(i, i2);
if (this.i > 0) {
int measuredWidth = getMeasuredWidth();
int i3 = this.i;
if (measuredWidth > i3) {
i = View.MeasureSpec.makeMeasureSpec(i3, 1073741824);
super.onMeasure(i, i2);
}
}
int dimensionPixelSize = getResources().getDimensionPixelSize(DIr.Sts.design_snackbar_padding_vertical_2lines);
int dimensionPixelSize2 = getResources().getDimensionPixelSize(DIr.Sts.design_snackbar_padding_vertical);
boolean z = this.b.getLayout().getLineCount() > 1;
if (z && this.e > 0 && this.a.getMeasuredWidth() > this.e) {
if (!b(1, dimensionPixelSize, dimensionPixelSize - dimensionPixelSize2)) {
return;
}
} else {
if (!z) {
dimensionPixelSize = dimensionPixelSize2;
}
if (!b(0, dimensionPixelSize, dimensionPixelSize)) {
return;
}
}
super.onMeasure(i, i2);
}
@Override // android.widget.LinearLayout, android.view.ViewGroup, android.view.View
protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
super.onLayout(z, i, i2, i3, i4);
HBt hBt = this.d;
if (hBt != null) {
hBt.c();
}
}
@Override // android.view.ViewGroup, android.view.View
protected void onAttachedToWindow() {
super.onAttachedToWindow();
}
@Override // android.view.ViewGroup, android.view.View
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
LWm lWm = this.c;
if (lWm != null) {
lWm.a();
}
}
private boolean b(int i, int i2, int i3) {
boolean z;
if (i != getOrientation()) {
setOrientation(i);
z = true;
} else {
z = false;
}
if (this.b.getPaddingTop() == i2 && this.b.getPaddingBottom() == i3) {
return z;
}
TextView textView = this.b;
if (ViewCompat.E(textView)) {
ViewCompat.a(textView, ViewCompat.q(textView), i2, ViewCompat.r(textView), i3);
return true;
}
textView.setPadding(textView.getPaddingLeft(), i2, textView.getPaddingRight(), i3);
return true;
}
}
/* loaded from: classes.dex */
final class Sts extends SwipeDismissBehavior<SnackbarLayout> {
private TSnackbar f;
Sts(TSnackbar tSnackbar) {
this.f = tSnackbar;
}
@Override // com.google.android.material.behavior.SwipeDismissBehavior, androidx.coordinatorlayout.widget.CoordinatorLayout.Sts
public final /* synthetic */ boolean LJ_(CoordinatorLayout coordinatorLayout, View view, MotionEvent motionEvent) {
SnackbarLayout snackbarLayout = (SnackbarLayout) view;
if (coordinatorLayout.e(snackbarLayout, (int) motionEvent.getX(), (int) motionEvent.getY())) {
int actionMasked = motionEvent.getActionMasked();
if (actionMasked == 0) {
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK.c.a(this.f.a);
} else if (actionMasked == 1 || actionMasked == 3) {
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK.c.j(this.f.a);
}
}
return super.LJ_(coordinatorLayout, snackbarLayout, motionEvent);
}
@Override // com.google.android.material.behavior.SwipeDismissBehavior
public final boolean e(View view) {
return view instanceof SnackbarLayout;
}
}
static /* synthetic */ void a(TSnackbar tSnackbar, int i2) {
LWK.HBt hBt;
if (LWK.c == null) {
LWK.c = new LWK();
}
LWK lwk = LWK.c;
LWK.HBt hBt2 = tSnackbar.a;
synchronized (lwk.a) {
if (!lwk.d(hBt2)) {
if (lwk.b(hBt2) && (hBt = lwk.e.e.get()) != null) {
hBt.b(i2);
}
} else {
LWK.HBt hBt3 = lwk.b.e.get();
if (hBt3 != null) {
hBt3.b(i2);
}
}
}
}
public final TSnackbar e(int i2) {
boolean z;
Bitmap bitmap;
TextView textView = this.d.b;
Drawable drawable = nMh.getDrawable(this.j, i2);
if (drawable == null) {
throw new IllegalArgumentException("resource_id is not a valid drawable!");
}
int i3 = (int) ((this.j.getResources().getDisplayMetrics().densityDpi / 160.0f) * 24.0f);
if ((drawable.getIntrinsicWidth() != i3 || drawable.getIntrinsicHeight() != i3) && ((z = drawable instanceof BitmapDrawable))) {
Resources resources = this.j.getResources();
if (z) {
bitmap = ((BitmapDrawable) drawable).getBitmap();
} else if (drawable instanceof VectorDrawable) {
VectorDrawable vectorDrawable = (VectorDrawable) drawable;
Bitmap createBitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
vectorDrawable.draw(canvas);
bitmap = createBitmap;
} else {
throw new IllegalArgumentException("unsupported drawable type");
}
drawable = new BitmapDrawable(resources, Bitmap.createScaledBitmap(bitmap, i3, i3, true));
}
drawable.setBounds(0, 0, i3, i3);
Drawable[] compoundDrawables = textView.getCompoundDrawables();
textView.setCompoundDrawables(drawable, compoundDrawables[1], compoundDrawables[2], compoundDrawables[3]);
return this;
}
static void b() {
i = (byte) 6;
}
}