package com.seewo.ota.v.s;

import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.UserManager;
import android.util.Log;
import com.cvte.vman.VmanMiddleWare;
import com.cvte.vman.listener.OnCtsStateChangeListener;
import com.seewo.ota.R;
import com.seewo.ota.update.device.model.vman.McuVmanUpdateTask;
import com.seewo.ota.update.device.model.vman.TouchVmanUpdateTask;
import com.seewo.ota.update.device.model.vman.TypeCVmanUpdateTask;
import com.seewo.ota.update.device.ui.DeviceUpdateDialog;
import com.seewo.ota.update.device.ui.s;
import com.seewo.ota.v.s.s.a1;
import com.seewo.ota.v.s.s.b1;
import com.seewo.ota.v.s.s.c1;
import com.seewo.ota.v.s.s.d1;
import com.seewo.ota.v.s.s.e1;
import com.seewo.ota.v.s.s.f0;
import com.seewo.ota.v.s.s.f1;
import com.seewo.ota.v.s.s.g0;
import com.seewo.ota.v.s.s.g1;
import com.seewo.ota.v.s.s.h0;
import com.seewo.ota.v.s.s.h1;
import com.seewo.ota.v.s.s.i0;
import com.seewo.ota.v.s.s.i1;
import com.seewo.ota.v.s.s.j0;
import com.seewo.ota.v.s.s.j1;
import com.seewo.ota.v.s.s.k1;
import com.seewo.ota.v.s.s.l0;
import com.seewo.ota.v.s.s.m0;
import com.seewo.ota.v.s.s.n0;
import com.seewo.ota.v.s.s.o0;
import com.seewo.ota.v.s.s.p0;
import com.seewo.ota.v.s.s.q0;
import com.seewo.ota.v.s.s.r0;
import com.seewo.ota.v.s.s.s0;
import com.seewo.ota.v.s.s.t0;
import com.seewo.ota.v.s.s.u0;
import com.seewo.ota.v.s.s.v0;
import com.seewo.ota.v.s.s.w0;
import com.seewo.ota.v.s.s.x0;
import com.seewo.ota.v.s.s.y0;
import com.seewo.ota.v.s.s.z0;
import f.z.d.v;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.Iterator;
import java.util.List;

/* JADX INFO: compiled from: DeviceUpdateManager.kt */
/* JADX INFO: loaded from: classes.dex */
public final class o {
    private final Context a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private final List<h0> f2392b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private e.a.r.b f2393c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private b1 f2394d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private DeviceUpdateDialog f2395e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private final Handler f2396f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private boolean f2397g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    private boolean f2398h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    private c f2399i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    private final List<b> f2400j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    private final Deque<r0> f2401k;
    private final q0 l;
    private final p m;
    private final f.e n;

    /* JADX INFO: compiled from: DeviceUpdateManager.kt */
    public static final class a extends OnCtsStateChangeListener {
        a() {
        }

        @Override // com.cvte.vman.listener.OnCtsStateChangeListener
        public void onCtsStateChange(boolean z) {
            super.onCtsStateChange(z);
            Log.d("DeviceUpdateManager", "onCtsStateChange:" + z);
            o.this.b();
        }
    }

    /* JADX INFO: compiled from: DeviceUpdateManager.kt */
    public interface b {
        void a(c cVar);
    }

    /* JADX INFO: compiled from: DeviceUpdateManager.kt */
    public enum c {
        UPDATE_STATE_NONE,
        UPDATE_STATE_CHECKING,
        UPDATE_STATE_HAS_UPDATE,
        UPDATE_STATE_NO_UPDATE,
        UPDATE_STATE_START,
        UPDATE_STATE_SUCCESS,
        UPDATE_STATE_FAIL
    }

    /* JADX INFO: compiled from: DeviceUpdateManager.kt */
    static final class d extends f.z.d.l implements f.z.c.a<UserManager> {
        d() {
            super(0);
        }

        @Override // f.z.c.a
        /* JADX INFO: renamed from: b, reason: merged with bridge method [inline-methods] */
        public final UserManager invoke() {
            Object systemService = o.this.a.getSystemService("user");
            if (systemService != null) {
                return (UserManager) systemService;
            }
            throw new NullPointerException("null cannot be cast to non-null type android.os.UserManager");
        }
    }

    public o(Context context) {
        f.z.d.k.e(context, "mContext");
        this.a = context;
        this.f2396f = new Handler(Looper.getMainLooper());
        this.f2399i = c.UPDATE_STATE_NONE;
        this.f2400j = new ArrayList();
        this.f2401k = new ArrayDeque();
        this.l = new q0() { // from class: com.seewo.ota.v.s.g
            @Override // com.seewo.ota.v.s.s.q0
            public final void a(String str, boolean z, boolean z2) {
                o.s(this.a, str, z, z2);
            }
        };
        this.m = new p(this.a, this);
        this.n = f.g.a(new d());
        this.f2392b = new ArrayList();
        if (g()) {
            y();
        } else {
            x();
        }
        Log.d("DeviceUpdateManager", "CtsState:" + VmanMiddleWare.getInstance().getSystemCtrl().IsCtsRunning());
        VmanMiddleWare.getInstance().registerListener(new a());
    }

    private final void A() {
        if (this.f2395e == null) {
            this.f2395e = new DeviceUpdateDialog(this.a);
        }
        DeviceUpdateDialog deviceUpdateDialog = this.f2395e;
        f.z.d.k.c(deviceUpdateDialog);
        if (deviceUpdateDialog.isShowing()) {
            return;
        }
        DeviceUpdateDialog deviceUpdateDialog2 = this.f2395e;
        f.z.d.k.c(deviceUpdateDialog2);
        deviceUpdateDialog2.show();
    }

    private final void B(String str) {
        Context applicationContext = this.a.getApplicationContext();
        f.z.d.k.d(applicationContext, "mContext.applicationContext");
        s sVar = new s(applicationContext);
        sVar.n(R.string.update_confirm_dialog_title);
        sVar.j(str);
        sVar.m(new DialogInterface.OnClickListener() { // from class: com.seewo.ota.v.s.k
            @Override // android.content.DialogInterface.OnClickListener
            public final void onClick(DialogInterface dialogInterface, int i2) {
                o.C(this.f2387b, dialogInterface, i2);
            }
        });
        sVar.show();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void C(o oVar, DialogInterface dialogInterface, int i2) {
        f.z.d.k.e(oVar, "this$0");
        if (i2 == -1) {
            oVar.v(c.UPDATE_STATE_START);
            oVar.D();
        } else {
            oVar.f2401k.clear();
            Log.i("DeviceUpdateManager", "cancel update device");
        }
    }

    private final void D() {
        Log.d("DeviceUpdateManager", "startDeviceUpdateTask");
        if (!this.f2401k.isEmpty()) {
            final r0 r0VarPop = this.f2401k.pop();
            A();
            DeviceUpdateDialog deviceUpdateDialog = this.f2395e;
            if (deviceUpdateDialog != null) {
                f.z.d.k.c(deviceUpdateDialog);
                if (deviceUpdateDialog.isShowing()) {
                    DeviceUpdateDialog deviceUpdateDialog2 = this.f2395e;
                    f.z.d.k.c(deviceUpdateDialog2);
                    deviceUpdateDialog2.g(r0VarPop);
                }
            }
            Log.d("DeviceUpdateManager", "startDeviceUpdateTask: run:" + r0VarPop.getName());
            this.f2396f.postDelayed(new Runnable() { // from class: com.seewo.ota.v.s.i
                @Override // java.lang.Runnable
                public final void run() {
                    o.E(r0VarPop);
                }
            }, 3000L);
            return;
        }
        DeviceUpdateDialog deviceUpdateDialog3 = this.f2395e;
        if (deviceUpdateDialog3 != null) {
            f.z.d.k.c(deviceUpdateDialog3);
            if (deviceUpdateDialog3.isShowing()) {
                DeviceUpdateDialog deviceUpdateDialog4 = this.f2395e;
                f.z.d.k.c(deviceUpdateDialog4);
                deviceUpdateDialog4.c(this.f2397g);
            }
        }
        if (!this.f2397g) {
            if (this.f2399i == c.UPDATE_STATE_START) {
                v(c.UPDATE_STATE_FAIL);
            }
        } else {
            if (this.f2398h) {
                c();
            }
            if (this.f2399i == c.UPDATE_STATE_START) {
                v(c.UPDATE_STATE_SUCCESS);
            }
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void E(r0 r0Var) {
        r0Var.run();
    }

    /* JADX WARN: Code restructure failed: missing block: B:7:0x0015, code lost:
    
        if (r0.isShowing() != false) goto L24;
     */
    @android.annotation.SuppressLint({"CheckResult"})
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    private final void G(final java.util.List<? extends com.seewo.ota.v.s.s.h0> r4) {
        /*
            r3 = this;
            java.util.Deque<com.seewo.ota.v.s.s.r0> r0 = r3.f2401k
            boolean r0 = r0.isEmpty()
            java.lang.String r1 = "DeviceUpdateManager"
            if (r0 == 0) goto L60
            com.seewo.ota.update.device.ui.DeviceUpdateDialog r0 = r3.f2395e
            if (r0 == 0) goto L18
            f.z.d.k.c(r0)
            boolean r0 = r0.isShowing()
            if (r0 == 0) goto L18
            goto L60
        L18:
            java.lang.String r0 = "startUpdateDevice: "
            android.util.Log.d(r1, r0)
            e.a.r.b r0 = r3.f2393c
            if (r0 == 0) goto L30
            f.z.d.k.c(r0)
            boolean r0 = r0.isDisposed()
            if (r0 != 0) goto L30
            java.lang.String r4 = "startUpdateDevice: a thread is running to update."
            android.util.Log.w(r1, r4)
            return
        L30:
            android.os.UserManager r0 = r3.f()
            boolean r0 = r0.isAdminUser()
            if (r0 != 0) goto L40
            java.lang.String r4 = "startUpdateDevice: not system user"
            android.util.Log.d(r1, r4)
            return
        L40:
            r0 = 0
            r3.f2397g = r0
            d.e.g.a r0 = d.e.g.a.o()
            boolean r0 = r0.q()
            if (r0 == 0) goto L51
            r3.N(r4)
            goto L5f
        L51:
            d.e.g.a r0 = d.e.g.a.o()
            android.content.Context r1 = r3.a
            com.seewo.ota.v.s.b r2 = new com.seewo.ota.v.s.b
            r2.<init>()
            r0.m(r1, r2)
        L5f:
            return
        L60:
            java.lang.String r4 = "startUpdateDevice: a task is running."
            android.util.Log.w(r1, r4)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.seewo.ota.v.s.o.G(java.util.List):void");
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void H(o oVar, List list) {
        f.z.d.k.e(oVar, "this$0");
        f.z.d.k.e(list, "$waitUpdateTasks");
        oVar.N(list);
    }

    private final void N(List<? extends h0> list) {
        if (VmanMiddleWare.getInstance().getSystemCtrl().IsCtsRunning()) {
            Log.d("DeviceUpdateManager", "is in ctsRunning");
        } else if (com.seewo.vcommons.data.d.m("sys.ota.interrupt_upgrade", false)) {
            Log.d("DeviceUpdateManager", "updateDevice: INTERRUPT_UPGRADE");
        } else {
            v(c.UPDATE_STATE_CHECKING);
            this.f2393c = e.a.h.y(list).t(new e.a.t.e() { // from class: com.seewo.ota.v.s.a
                @Override // e.a.t.e
                public final boolean test(Object obj) {
                    return o.R((h0) obj);
                }
            }).T(e.a.x.a.b()).G(e.a.q.b.a.a()).Q(new e.a.t.c() { // from class: com.seewo.ota.v.s.c
                @Override // e.a.t.c
                public final void accept(Object obj) {
                    o.O(this.a, (h0) obj);
                }
            }, new e.a.t.c() { // from class: com.seewo.ota.v.s.e
                @Override // e.a.t.c
                public final void accept(Object obj) {
                    o.P((Throwable) obj);
                }
            }, new e.a.t.a() { // from class: com.seewo.ota.v.s.d
                @Override // e.a.t.a
                public final void run() {
                    o.Q(this.a);
                }
            });
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void O(o oVar, h0 h0Var) {
        f.z.d.k.e(oVar, "this$0");
        f.z.d.k.e(h0Var, "task");
        Log.d("DeviceUpdateManager", "isNeedRun:>>>>>" + h0Var.getName());
        oVar.f2401k.add(h0Var);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void P(Throwable th) {
        Log.e("DeviceUpdateManager", "startUpdateDevice: ", th);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void Q(o oVar) {
        f.z.d.k.e(oVar, "this$0");
        Log.e("DeviceUpdateManager", "Prepare Complete! start update device!");
        oVar.v(oVar.f2401k.isEmpty() ? c.UPDATE_STATE_NO_UPDATE : c.UPDATE_STATE_HAS_UPDATE);
        if (!oVar.f2401k.isEmpty() && oVar.a.getResources().getBoolean(R.bool.support_confirm_update)) {
            oVar.B(oVar.e());
            return;
        }
        if (!oVar.f2401k.isEmpty()) {
            oVar.v(c.UPDATE_STATE_START);
        }
        oVar.D();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean R(h0 h0Var) {
        f.z.d.k.e(h0Var, "task");
        Log.i("DeviceUpdateManager", "updateDevice: " + h0Var.getClass().getSimpleName());
        try {
            if (h0Var.isInterceptDeviceUpdate()) {
                return false;
            }
            return h0Var.isNeedRun();
        } catch (Exception e2) {
            Log.e("DeviceUpdateManager", e2.getMessage(), e2);
            return false;
        }
    }

    private final void c() {
        if (VmanMiddleWare.getInstance().getSystemCtrl().IsCtsRunning()) {
            Log.d("DeviceUpdateManager", "is running cts , not reboot");
        } else if (com.seewo.vcommons.data.d.i("persist.sys.ota.disable_device_update_reboot", 0) == 1) {
            Log.d("DeviceUpdateManager", "persist.sys.ota.disable_device_update_reboot == 1,disable device upgrade reboot");
        } else {
            this.f2396f.postDelayed(new Runnable() { // from class: com.seewo.ota.v.s.h
                @Override // java.lang.Runnable
                public final void run() {
                    o.d();
                }
            }, 4097, 3000L);
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void d() {
        if (!d.e.g.p.a.b()) {
            d.e.g.g.a.d();
        } else {
            d.e.h.e.f.a("sync");
            d.e.h.e.f.a("reboot");
        }
    }

    private final String e() {
        StringBuilder sb = new StringBuilder();
        int i2 = 0;
        for (Object obj : this.f2401k) {
            int i3 = i2 + 1;
            if (i2 < 0) {
                f.u.i.i();
                throw null;
            }
            sb.append('[' + i3 + "] ");
            sb.append(((r0) obj).getBeforeUpdateTip());
            sb.append("\n");
            i2 = i3;
        }
        String string = sb.toString();
        f.z.d.k.d(string, "content.toString()");
        return string;
    }

    private final UserManager f() {
        return (UserManager) this.n.getValue();
    }

    private final boolean g() {
        return !d.e.h.a.a.h(13) && Build.VERSION.SDK_INT >= 34;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void s(final o oVar, String str, final boolean z, final boolean z2) {
        f.z.d.k.e(oVar, "this$0");
        f.z.d.k.e(str, "name");
        Log.d("DeviceUpdateManager", "deviceUpdate Callback:" + str + "  " + z + ' ' + z2);
        oVar.f2396f.post(new Runnable() { // from class: com.seewo.ota.v.s.j
            @Override // java.lang.Runnable
            public final void run() {
                o.t(z, oVar, z2);
            }
        });
        oVar.f2396f.postDelayed(new Runnable() { // from class: com.seewo.ota.v.s.f
            @Override // java.lang.Runnable
            public final void run() {
                o.u(this.f2381b);
            }
        }, 3000L);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void t(boolean z, o oVar, boolean z2) {
        f.z.d.k.e(oVar, "this$0");
        if (!z) {
            DeviceUpdateDialog deviceUpdateDialog = oVar.f2395e;
            if (deviceUpdateDialog != null) {
                f.z.d.k.c(deviceUpdateDialog);
                if (deviceUpdateDialog.isShowing()) {
                    DeviceUpdateDialog deviceUpdateDialog2 = oVar.f2395e;
                    f.z.d.k.c(deviceUpdateDialog2);
                    deviceUpdateDialog2.b();
                    return;
                }
                return;
            }
            return;
        }
        DeviceUpdateDialog deviceUpdateDialog3 = oVar.f2395e;
        if (deviceUpdateDialog3 != null) {
            f.z.d.k.c(deviceUpdateDialog3);
            if (deviceUpdateDialog3.isShowing()) {
                DeviceUpdateDialog deviceUpdateDialog4 = oVar.f2395e;
                f.z.d.k.c(deviceUpdateDialog4);
                deviceUpdateDialog4.f();
            }
        }
        boolean z3 = true;
        oVar.f2397g = true;
        if (!oVar.f2398h && !z2) {
            z3 = false;
        }
        oVar.f2398h = z3;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void u(o oVar) {
        f.z.d.k.e(oVar, "this$0");
        oVar.D();
    }

    private final void v(c cVar) {
        this.f2398h = false;
        this.f2399i = cVar;
        Iterator<b> it = this.f2400j.iterator();
        while (it.hasNext()) {
            it.next().a(cVar);
        }
    }

    private final void x() {
        this.f2392b.add(new g1(this.a, this.l));
        this.f2392b.add(new j1(this.a, this.l));
        this.f2392b.add(new e1(this.a, this.l));
        this.f2392b.add(new d1(this.a, this.l));
        this.f2392b.add(new h1(this.a, this.l));
        this.f2392b.add(new TypeCVmanUpdateTask(this.a, this.l));
        this.f2392b.add(new f1(this.a, this.l));
        this.f2392b.add(new m0(this.a, this.l));
        this.f2392b.add(new c1(this.a, this.l));
        b1 b1Var = new b1(this.a, this.l);
        this.f2394d = b1Var;
        List<h0> list = this.f2392b;
        f.z.d.k.c(b1Var);
        list.add(b1Var);
        this.f2392b.add(new z0(this.a, this.l));
        this.f2392b.add(new y0(this.a, this.l));
        this.f2392b.add(new l0(this.a, this.l));
        this.f2392b.add(new s0(this.a, this.l));
        this.f2392b.add(new f0(this.a, this.l));
        this.f2392b.add(new a1(this.a, this.l));
        this.f2392b.add(new k1(this.a, this.l));
        this.f2392b.add(new j0(this.a, this.l));
        this.f2392b.add(new i0(this.a, this.l));
        this.f2392b.add(new n0(this.a, this.l));
        this.f2392b.add(new w0(this.a, this.l));
        this.f2392b.add(new v0(this.a, this.l));
        this.f2392b.add(new x0(this.a, this.l));
        this.f2392b.add(new p0(this.a, this.l));
        this.f2392b.add(new g0(this.a, this.l));
        this.f2392b.add(new o0(this.a, this.l));
        this.f2392b.add(new u0(this.a, this.l));
        this.f2392b.add(new t0(this.a, this.l));
    }

    private final void y() {
        this.f2392b.add(new TypeCVmanUpdateTask(this.a, this.l));
        this.f2392b.add(new TouchVmanUpdateTask(this.a, this.l));
        this.f2392b.add(new McuVmanUpdateTask(this.a, this.l));
    }

    public final void F() {
        ArrayList arrayList = new ArrayList();
        for (h0 h0Var : this.f2392b) {
            if (h0Var instanceof h0) {
                arrayList.add(h0Var);
            }
        }
        G(arrayList);
    }

    public final void I(com.seewo.ota.v.s.r.c cVar) {
        f.z.d.k.e(cVar, "usbInfo");
        Log.d("DeviceUpdateManager", "startUpdateDeviceByUsbInfo: " + cVar);
        if (Build.VERSION.SDK_INT >= 34) {
            this.m.q(cVar);
            return;
        }
        ArrayList arrayList = new ArrayList();
        for (h0 h0Var : this.f2392b) {
            if (h0Var instanceof i1) {
                arrayList.add(h0Var);
            }
        }
        ArrayList arrayList2 = new ArrayList();
        for (Object obj : arrayList) {
            i1 i1Var = (i1) obj;
            Log.i("DeviceUpdateManager", "startUpdateDeviceByUsbInfo: task = " + v.b(i1Var.getClass()).a() + " usbInfo=" + cVar);
            List<com.seewo.ota.v.s.r.c> listSupportUsbInfoList = i1Var.supportUsbInfoList();
            f.z.d.k.d(listSupportUsbInfoList, "task.supportUsbInfoList()");
            Iterator<com.seewo.ota.v.s.r.c> it = listSupportUsbInfoList.iterator();
            int i2 = 0;
            while (true) {
                if (!it.hasNext()) {
                    i2 = -1;
                    break;
                }
                com.seewo.ota.v.s.r.c next = it.next();
                Log.i("DeviceUpdateManager", "startUpdateDeviceByUsbInfo: " + next);
                if (next.a() == cVar.a() && next.b() == cVar.b()) {
                    break;
                } else {
                    i2++;
                }
            }
            if (i2 >= 0) {
                arrayList2.add(obj);
            }
        }
        ArrayList arrayList3 = new ArrayList(f.u.l.j(arrayList2, 10));
        Iterator it2 = arrayList2.iterator();
        while (it2.hasNext()) {
            arrayList3.add((h0) ((i1) it2.next()));
        }
        G(arrayList3);
    }

    public final void J(List<? extends h0> list) {
        f.z.d.k.e(list, "waitUpdateTasks");
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            ((h0) it.next()).setUpdateCallback(this.l);
        }
        G(list);
    }

    public final void K() {
        ArrayList arrayList = new ArrayList();
        for (h0 h0Var : this.f2392b) {
            if (h0Var instanceof b1) {
                arrayList.add(h0Var);
            }
        }
        G(arrayList);
    }

    public final void L() {
        this.f2400j.clear();
    }

    public final void M(b bVar) {
        f.z.d.k.e(bVar, "listener");
        this.f2400j.remove(bVar);
    }

    public final void b() {
        this.f2401k.clear();
        DeviceUpdateDialog deviceUpdateDialog = this.f2395e;
        if (deviceUpdateDialog != null) {
            f.z.d.k.c(deviceUpdateDialog);
            if (deviceUpdateDialog.isShowing()) {
                DeviceUpdateDialog deviceUpdateDialog2 = this.f2395e;
                f.z.d.k.c(deviceUpdateDialog2);
                deviceUpdateDialog2.dismiss();
            }
        }
        e.a.r.b bVar = this.f2393c;
        if (bVar != null) {
            f.z.d.k.c(bVar);
            if (!bVar.isDisposed()) {
                e.a.r.b bVar2 = this.f2393c;
                f.z.d.k.c(bVar2);
                bVar2.dispose();
            }
        }
        this.f2397g = false;
        this.f2396f.removeCallbacksAndMessages(null);
    }

    public final void w(b bVar) {
        f.z.d.k.e(bVar, "listener");
        if (this.f2400j.contains(bVar)) {
            return;
        }
        this.f2400j.add(bVar);
    }

    public final void z() {
        b();
        L();
        this.m.u();
    }
}
