得物.apk(点击下载) / NoticeServiceImpl.java


package com.shizhuang.duapp.modules.notice.manager;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.TextUtils;
import android.view.View;
import androidx.lifecycle.MutableLiveData;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.fastjson.JSON;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.common.base.BaseApplication;
import com.shizhuang.duapp.common.helper.net.ParamsBuilder;
import com.shizhuang.duapp.libs.bpm.BM;
import com.shizhuang.duapp.modules.notice.api.NoticeService;
import com.shizhuang.duapp.modules.notice.model.PrivacyLetterModel;
import com.shizhuang.duapp.modules.notice.model.PrivacyLetterPreviewModel;
import com.shizhuang.duapp.modules.notice.ui.NewMessageCenterActivity;
import com.shizhuang.duapp.modules.notice.util.PrivacyLetterManager;
import com.shizhuang.duapp.modules.router.RouterManagerFailureType;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.modules.router.model.NoticePushTipModel;
import com.shizhuang.duapp.modules.router.service.INoticeService;
import com.shizhuang.model.NoticeModel;
import ed0.k;
import fd.m;
import fd.q;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import org.jetbrains.annotations.Nullable;
import qc.f;
import rd.l;
import td.j;
import td.s;
import u.r;
import u.x;
import u91.g;

@Route(path = "/notice/service")
public class NoticeServiceImpl implements INoticeService {
    private static final String TAG = "NoticeServiceImpl";
    public static ChangeQuickRedirect changeQuickRedirect;

    /* renamed from: a  reason: collision with root package name */
    public MutableLiveData<String> f20696a;

    public class a extends s<String> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a(NoticeServiceImpl noticeServiceImpl, Context context) {
            super(context);
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onFailed(l lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 235504, new Class[]{l.class}, Void.TYPE).isSupported) {
                super.onFailed(lVar);
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            String str = (String) obj;
            if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 235503, new Class[]{String.class}, Void.TYPE).isSupported) {
                super.onSuccess(str);
            }
        }
    }

    public class b extends g {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ long f20697a;
        public final /* synthetic */ NoticeModel b;

        public b(NoticeServiceImpl noticeServiceImpl, long j, NoticeModel noticeModel) {
            this.f20697a = j;
            this.b = noticeModel;
        }

        @Override // u91.g
        public void a(@Nullable Postcard postcard, @Nullable RouterManagerFailureType routerManagerFailureType) {
            long j;
            long j12;
            if (!PatchProxy.proxy(new Object[]{postcard, routerManagerFailureType}, this, changeQuickRedirect, false, 235507, new Class[]{Postcard.class, RouterManagerFailureType.class}, Void.TYPE).isSupported) {
                String str = this.b.routerUrl;
                String valueOf = routerManagerFailureType != null ? String.valueOf(routerManagerFailureType.getType()) : null;
                String str2 = "0";
                if (!PatchProxy.proxy(new Object[]{str2, str, valueOf}, this, changeQuickRedirect, false, 235506, new Class[]{String.class, String.class, String.class}, Void.TYPE).isSupported) {
                    if (BaseApplication.b().f7431c) {
                        j12 = System.currentTimeMillis();
                        j = this.f20697a;
                    } else {
                        j12 = System.currentTimeMillis();
                        j = BaseApplication.b().d;
                    }
                    long j13 = j12 - j;
                    HashMap j14 = a01.a.j(PushConstants.WEB_URL, str, "type", PushConstants.PUSH_FLYME_3_CHANGE_VERSION_START);
                    j14.put("isSuccess", str2);
                    if (BaseApplication.b().f7431c) {
                        str2 = "1";
                    }
                    j14.put("startType", str2);
                    j14.put("duration", j13 + "");
                    j14.put("String1", PushConstants.PUSH_FLYME_3_CHANGE_VERSION_START);
                    if (!TextUtils.isEmpty(valueOf)) {
                        j14.put("String2", valueOf);
                    }
                    BM.growth().c("growth_outer_start", j14);
                }
            }
        }

        @Override // com.alibaba.android.arouter.facade.callback.NavigationCallback, com.alibaba.android.arouter.facade.callback.NavCallback
        public void onArrival(Postcard postcard) {
            boolean z = PatchProxy.proxy(new Object[]{postcard}, this, changeQuickRedirect, false, 235505, new Class[]{Postcard.class}, Void.TYPE).isSupported;
        }
    }

    public class c extends s<PrivacyLetterPreviewModel> {
        public static ChangeQuickRedirect changeQuickRedirect;

        public c(Context context) {
            super(context);
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(l<PrivacyLetterPreviewModel> lVar) {
            boolean z = PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 235509, new Class[]{l.class}, Void.TYPE).isSupported;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            PrivacyLetterPreviewModel privacyLetterPreviewModel = (PrivacyLetterPreviewModel) obj;
            if (!PatchProxy.proxy(new Object[]{privacyLetterPreviewModel}, this, changeQuickRedirect, false, 235508, new Class[]{PrivacyLetterPreviewModel.class}, Void.TYPE).isSupported) {
                super.onSuccess(privacyLetterPreviewModel);
                NoticeServiceImpl.this.g(privacyLetterPreviewModel.toPrivacyLetter());
            }
        }
    }

    public class d extends s<NoticePushTipModel> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ INoticeService.PushTipCallback b;

        public d(NoticeServiceImpl noticeServiceImpl, INoticeService.PushTipCallback pushTipCallback) {
            this.b = pushTipCallback;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(l<NoticePushTipModel> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 235511, new Class[]{l.class}, Void.TYPE).isSupported) {
                super.onBzError(lVar);
                this.b.onError();
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            NoticePushTipModel noticePushTipModel = (NoticePushTipModel) obj;
            if (!PatchProxy.proxy(new Object[]{noticePushTipModel}, this, changeQuickRedirect, false, 235510, new Class[]{NoticePushTipModel.class}, Void.TYPE).isSupported) {
                super.onSuccess(noticePushTipModel);
                this.b.onSuccess(noticePushTipModel);
            }
        }
    }

    public class e extends s<Boolean> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ INoticeService.ReadAllNoticeCallback b;

        public e(NoticeServiceImpl noticeServiceImpl, INoticeService.ReadAllNoticeCallback readAllNoticeCallback) {
            this.b = readAllNoticeCallback;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(l<Boolean> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 235512, new Class[]{l.class}, Void.TYPE).isSupported) {
                super.onBzError(lVar);
                this.b.onError();
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            Boolean bool = (Boolean) obj;
            if (!PatchProxy.proxy(new Object[]{bool}, this, changeQuickRedirect, false, 235513, new Class[]{Boolean.class}, Void.TYPE).isSupported) {
                super.onSuccess(bool);
                if (bool != null) {
                    this.b.onSuccess(bool);
                }
            }
        }
    }

    public final boolean a(PrivacyLetterModel privacyLetterModel) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{privacyLetterModel}, this, changeQuickRedirect, false, 235488, new Class[]{PrivacyLetterModel.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        List<String> list = privacyLetterModel.blackList;
        if (list != null && !list.isEmpty()) {
            for (String str : privacyLetterModel.blackList) {
                if (str.contains("https://m.poizon.com/router/product/ProductDetail") && ServiceManager.u().isExists(1)) {
                    return true;
                }
                if (str.contains("http://m.poizon.com/router/home/HomePage?home=mall") && ServiceManager.u().isExists(0)) {
                    return true;
                }
                if (str.contains("https://m.poizon.com/router/order/paySuccess") && ServiceManager.y().isExists(0)) {
                    return true;
                }
            }
        }
        return false;
    }

    public final boolean b(Context context, NoticeModel noticeModel) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, noticeModel}, this, changeQuickRedirect, false, 235493, new Class[]{Context.class, NoticeModel.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (!TextUtils.isEmpty(noticeModel.f26263v)) {
            return true;
        }
        m.a("NoticeModelValue", "", noticeModel.toString());
        u91.e.g0(context);
        return false;
    }

    /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARNING: Code restructure failed: missing block: B:103:0x0302, code lost:
        if (r7 < 0) goto L_0x0309;
     */
    public final void c(Activity activity, NoticeModel noticeModel, String str) {
        int i;
        Exception e6;
        int i3;
        if (!PatchProxy.proxy(new Object[]{activity, noticeModel, str}, this, changeQuickRedirect, false, 235492, new Class[]{Activity.class, NoticeModel.class, String.class}, Void.TYPE).isSupported) {
            try {
                u91.e.G1("没有routerUrl(调试日志,不是bug):--通知中心:" + noticeModel.toString(), "push");
                HashMap hashMap = new HashMap();
                hashMap.put("taskId", noticeModel.f26260od);
                hashMap.put("type", String.valueOf(noticeModel.f26261pt));
                hashMap.put("value", noticeModel.f26263v);
                try {
                    openPush(activity, str, JSON.toJSONString(noticeModel));
                    qf1.a.A("100000", "1", "1", hashMap);
                    int i12 = noticeModel.f26261pt;
                    if (i12 == 0 || i12 == 1 || i12 == 2 || i12 == 3) {
                        if (!PatchProxy.proxy(new Object[]{activity}, k.f31806a, k.changeQuickRedirect, false, 152626, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                            ARouter.getInstance().build("/notice/NewMessageCenterPage").navigation(activity);
                            return;
                        }
                        return;
                    } else if (i12 == 5) {
                        u91.e.r0(activity, 3);
                        return;
                    } else if (i12 != 10) {
                        if (i12 == 40) {
                            try {
                                i3 = Integer.parseInt(noticeModel.f26263v) - 1;
                            } catch (Exception e12) {
                                e12.printStackTrace();
                            }
                        } else if (i12 != 13) {
                            if (i12 != 14) {
                                switch (i12) {
                                    case 16:
                                        u91.e.Q(activity, noticeModel.f26263v);
                                        return;
                                    case 17:
                                        u91.e.f1(activity, noticeModel.f26263v, "", true);
                                        return;
                                    case 18:
                                        u91.e.H0(activity, noticeModel.f26263v);
                                        return;
                                    case 19:
                                        if (b(activity, noticeModel)) {
                                            i = 0;
                                            try {
                                                u91.e.U0(activity, Long.parseLong(noticeModel.f26263v), 0, "", 0);
                                                return;
                                            } catch (Exception e13) {
                                                e6 = e13;
                                                u91.e.g0(activity);
                                                fo.a.g(e6, TAG, new Object[i]);
                                                return;
                                            }
                                        } else {
                                            return;
                                        }
                                    case 20:
                                        u91.e.x0(activity);
                                        return;
                                    case 21:
                                        ARouter.getInstance().build("/account/MyCouponPage").navigation(activity);
                                        return;
                                    case 22:
                                        if (b(activity, noticeModel)) {
                                            u91.e.Z0(activity, Integer.parseInt(noticeModel.f26263v));
                                            return;
                                        }
                                        return;
                                    case 23:
                                        if (b(activity, noticeModel)) {
                                            u91.e.I0(activity);
                                            u91.e.J0(activity, Integer.parseInt(noticeModel.f26263v));
                                            return;
                                        }
                                        return;
                                    case 24:
                                        u91.e.B0(activity, 0, 1);
                                        return;
                                    default:
                                        switch (i12) {
                                            case 26:
                                                u91.e.O(activity, noticeModel.f26263v);
                                                return;
                                            case 27:
                                                if (b(activity, noticeModel)) {
                                                    u91.e.N(activity, Integer.parseInt(noticeModel.f26263v), 0);
                                                    return;
                                                }
                                                return;
                                            case 28:
                                                ARouter.getInstance().build("/product/merchantRecharge").navigation();
                                                return;
                                            case 29:
                                                u91.e.D0(activity);
                                                return;
                                            default:
                                                switch (i12) {
                                                    case 31:
                                                        u91.e.X(activity, noticeModel.f26263v);
                                                        return;
                                                    case 32:
                                                        u91.e.S(activity, noticeModel.f26263v);
                                                        return;
                                                    case 33:
                                                        u91.e.v0(activity, false);
                                                        return;
                                                    case 34:
                                                        if (!PatchProxy.proxy(new Object[]{activity}, null, u91.e.changeQuickRedirect, true, 313805, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                                                            ARouter.getInstance().build("/identify/MyIdentifyPage").navigation(activity);
                                                            return;
                                                        }
                                                        return;
                                                    case 35:
                                                        if (!PatchProxy.proxy(new Object[]{activity}, null, u91.e.changeQuickRedirect, true, 313722, new Class[]{Context.class}, Void.TYPE).isSupported) {
                                                            ARouter.getInstance().build("/product/ManualIdentificationPage").navigation(activity);
                                                            return;
                                                        }
                                                        return;
                                                    case 36:
                                                        if (b(activity, noticeModel)) {
                                                            u91.e.u1(activity, Integer.parseInt(noticeModel.f26263v));
                                                            return;
                                                        }
                                                        return;
                                                    case 37:
                                                        String str2 = noticeModel.f26263v;
                                                        u91.e.z1(activity, str2, f.c() + "hybird/h5baseService/SellDetail?sellId=" + str2 + "&userId=" + ServiceManager.d().getUserId());
                                                        return;
                                                    default:
                                                        switch (i12) {
                                                            case 49:
                                                                if (b(activity, noticeModel)) {
                                                                    ServiceManager.I().showSingleTrendAsync(activity, Integer.parseInt(noticeModel.f26263v));
                                                                    return;
                                                                }
                                                                return;
                                                            case 50:
                                                                ServiceManager.I().showUserHomePage(activity, noticeModel.f26263v);
                                                                return;
                                                            case 51:
                                                                if (b(activity, noticeModel)) {
                                                                    ServiceManager.I().showSingleSpecialForum(activity, Integer.parseInt(noticeModel.f26263v));
                                                                    return;
                                                                }
                                                                return;
                                                            case 52:
                                                                u91.e.c0(activity, 1);
                                                                return;
                                                            case 53:
                                                                u91.e.c0(activity, 3);
                                                                return;
                                                            case 54:
                                                                u91.e.a0(activity, 0);
                                                                return;
                                                            case 55:
                                                                u91.e.h1(activity, 0);
                                                                return;
                                                            case 56:
                                                                u91.e.C(activity, noticeModel.f26263v);
                                                                return;
                                                            case 57:
                                                                break;
                                                            case 58:
                                                                if (!PatchProxy.proxy(new Object[]{activity}, null, u91.e.changeQuickRedirect, true, 313899, new Class[]{Context.class}, Void.TYPE).isSupported) {
                                                                    ARouter.getInstance().build("/financial_stage/BillCenterPage").navigation(activity);
                                                                    return;
                                                                }
                                                                return;
                                                            case 59:
                                                                if (!PatchProxy.proxy(new Object[]{activity}, null, u91.e.changeQuickRedirect, true, 313884, new Class[]{Context.class}, Void.TYPE).isSupported) {
                                                                    ARouter.getInstance().build("/financial_stage/RepayRecordListPage").navigation(activity);
                                                                    return;
                                                                }
                                                                return;
                                                            case 60:
                                                                ServiceManager.I().showUserHomePage(activity, noticeModel.f26263v);
                                                                return;
                                                            case 61:
                                                                ServiceManager.I().showUserHomePage(activity, noticeModel.f26263v);
                                                                return;
                                                            case 62:
                                                                u91.e.f0(activity);
                                                                return;
                                                            case 63:
                                                                if (!PatchProxy.proxy(new Object[]{activity}, null, u91.e.changeQuickRedirect, true, 313902, new Class[]{Context.class}, Void.TYPE).isSupported) {
                                                                    ARouter.getInstance().build("/order/ReservationListPageV2").navigation(activity);
                                                                    return;
                                                                }
                                                                return;
                                                            default:
                                                                return;
                                                        }
                                                }
                                        }
                                }
                            }
                            String userId = ServiceManager.d().getUserId();
                            if (!ei.a.a(userId)) {
                                u91.e.y1(activity, userId);
                                return;
                            }
                            return;
                        } else {
                            u91.e.i1(activity);
                            return;
                        }
                    } else if (b(activity, noticeModel)) {
                        Bundle bundle = new Bundle();
                        bundle.putInt("roomId", Integer.parseInt(noticeModel.f26263v));
                        u91.e.q(activity, bundle);
                        return;
                    } else {
                        return;
                    }
                } catch (Exception e14) {
                    e6 = e14;
                    i = 0;
                    u91.e.g0(activity);
                    fo.a.g(e6, TAG, new Object[i]);
                    return;
                }
            } catch (Exception e15) {
                e6 = e15;
                i = 0;
                u91.e.g0(activity);
                fo.a.g(e6, TAG, new Object[i]);
                return;
            }
        } else {
            return;
        }
        i3 = 0;
        u91.e.a0(activity, i3);
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void callbackNoticePushTip(String str, String str2) {
        if (!PatchProxy.proxy(new Object[]{str, str2}, this, changeQuickRedirect, false, 235496, new Class[]{String.class, String.class}, Void.TYPE).isSupported) {
            ew0.a aVar = ew0.a.f32059a;
            s sVar = new s();
            if (!PatchProxy.proxy(new Object[]{str, str2, sVar}, aVar, ew0.a.changeQuickRedirect, false, 235465, new Class[]{String.class, String.class, s.class}, Void.TYPE).isSupported) {
                HashMap j = a01.a.j("source", str, "type", str2);
                j.put("uid", ServiceManager.d().getUserId());
                j.doRequest(((NoticeService) j.getJavaGoApi(NoticeService.class)).callbackPushSwitchTip(rd.g.a(ParamsBuilder.newParams().addParams(j))), sVar);
            }
        }
    }

    public final void d(Activity activity, PrivacyLetterModel privacyLetterModel) {
        if (!PatchProxy.proxy(new Object[]{activity, privacyLetterModel}, this, changeQuickRedirect, false, 235491, new Class[]{Activity.class, PrivacyLetterModel.class}, Void.TYPE).isSupported) {
            if (a(privacyLetterModel)) {
                ew0.a.f32059a.m(privacyLetterModel.originId, "stationFail", "notify");
                return;
            }
            ew0.a.f32059a.m(privacyLetterModel.originId, "stationSucc", "notify");
            q.c(new th.f(privacyLetterModel, activity, 5));
        }
    }

    public final void e(PrivacyLetterModel privacyLetterModel) {
        if (!PatchProxy.proxy(new Object[]{privacyLetterModel}, this, changeQuickRedirect, false, 235490, new Class[]{PrivacyLetterModel.class}, Void.TYPE).isSupported) {
            if (a(privacyLetterModel)) {
                ew0.a.f32059a.m(privacyLetterModel.originId, "stationFail", "notify");
                return;
            }
            ew0.a.f32059a.m(privacyLetterModel.originId, "stationSucc", "notify");
            q.c(new r(privacyLetterModel, 11));
        }
    }

    public void f(PrivacyLetterModel privacyLetterModel) {
        if (!PatchProxy.proxy(new Object[]{privacyLetterModel}, this, changeQuickRedirect, false, 235480, new Class[]{PrivacyLetterModel.class}, Void.TYPE).isSupported) {
            long j = privacyLetterModel.startTime;
            long currentTimeMillis = (System.currentTimeMillis() / 1000) - j;
            if (privacyLetterModel.endTime <= 0) {
                privacyLetterModel.endTime = j + 15;
            }
            int i = 5;
            int i3 = privacyLetterModel.delayTime;
            if (i3 > 0) {
                i = i3;
            }
            if (System.currentTimeMillis() / 1000 > privacyLetterModel.endTime) {
                ew0.a.f32059a.m(privacyLetterModel.originId, "stationFail", "notify");
                return;
            }
            long j12 = (long) i;
            if (currentTimeMillis < j12) {
                q.d(new x(this, privacyLetterModel, 7), (j12 - currentTimeMillis) * 1000);
            } else {
                e(privacyLetterModel);
            }
        }
    }

    public void g(PrivacyLetterModel privacyLetterModel) {
        boolean z = true;
        if (!PatchProxy.proxy(new Object[]{privacyLetterModel}, this, changeQuickRedirect, false, 235479, new Class[]{PrivacyLetterModel.class}, Void.TYPE).isSupported) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{privacyLetterModel}, this, changeQuickRedirect, false, 235489, new Class[]{PrivacyLetterModel.class}, Boolean.TYPE);
            if (proxy.isSupported) {
                z = ((Boolean) proxy.result).booleanValue();
            } else {
                List<String> list = privacyLetterModel.whiteList;
                if (list != null && !list.isEmpty()) {
                    Iterator<String> it2 = privacyLetterModel.whiteList.iterator();
                    while (true) {
                        if (!it2.hasNext()) {
                            break;
                        } else if (it2.next().contains("http://m.poizon.com/router/home/HomePage?home=mall")) {
                            MutableLiveData<String> mutableLiveData = this.f20696a;
                            if (mutableLiveData != null) {
                                mutableLiveData.setValue(nd.e.n(privacyLetterModel) + "#@#v494_whitelist#@#");
                                this.f20696a = null;
                            }
                        }
                    }
                }
                z = false;
            }
            if (!z) {
                f(privacyLetterModel);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void getNoticePushTip(String str, INoticeService.PushTipCallback pushTipCallback) {
        if (!PatchProxy.proxy(new Object[]{str, pushTipCallback}, this, changeQuickRedirect, false, 235494, new Class[]{String.class, INoticeService.PushTipCallback.class}, Void.TYPE).isSupported) {
            getNoticePushTip(str, "", pushTipCallback);
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public Class<? extends Activity> getQMActivity() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 235475, new Class[0], Class.class);
        return proxy.isSupported ? (Class) proxy.result : NewMessageCenterActivity.class;
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void handlerNotice(Activity activity, Parcelable parcelable, String str) {
        if (!PatchProxy.proxy(new Object[]{activity, parcelable, str}, this, changeQuickRedirect, false, 235477, new Class[]{Activity.class, Parcelable.class, String.class}, Void.TYPE).isSupported) {
            handlerNotice(activity, parcelable, str, System.currentTimeMillis());
        }
    }

    @Override // com.alibaba.android.arouter.facade.template.IProvider
    public void init(Context context) {
        boolean z = PatchProxy.proxy(new Object[]{context}, this, changeQuickRedirect, false, 235474, new Class[]{Context.class}, Void.TYPE).isSupported;
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void openPush(Context context, String str, String str2) {
        if (!PatchProxy.proxy(new Object[]{context, str, str2}, this, changeQuickRedirect, false, 235476, new Class[]{Context.class, String.class, String.class}, Void.TYPE).isSupported) {
            gw0.a.openPush(str, str2, new a(this, context));
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void readAllNotice(INoticeService.ReadAllNoticeCallback readAllNoticeCallback) {
        if (!PatchProxy.proxy(new Object[]{readAllNoticeCallback}, this, changeQuickRedirect, false, 235498, new Class[]{INoticeService.ReadAllNoticeCallback.class}, Void.TYPE).isSupported) {
            ew0.a aVar = ew0.a.f32059a;
            e eVar = new e(this, readAllNoticeCallback);
            if (!PatchProxy.proxy(new Object[]{eVar}, aVar, ew0.a.changeQuickRedirect, false, 235468, new Class[]{s.class}, Void.TYPE).isSupported) {
                HashMap hashMap = new HashMap();
                hashMap.put("userId", ServiceManager.d().getUserId());
                j.doRequest(((NoticeService) j.getJavaGoApi(NoticeService.class)).readAllNotice(rd.g.a(ParamsBuilder.newParams().addParams(hashMap))), eVar);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void showPrivacyLetter(String str) {
        boolean z = true;
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 235481, new Class[]{String.class}, Void.TYPE).isSupported && !ei.a.a(str)) {
            try {
                if (str.endsWith("#@#v494_whitelist#@#")) {
                    str = str.substring(0, str.length() - 20);
                } else {
                    z = false;
                }
                PrivacyLetterModel privacyLetterModel = (PrivacyLetterModel) nd.e.f(str, PrivacyLetterModel.class);
                if (privacyLetterModel != null) {
                    if (z) {
                        f(privacyLetterModel);
                    } else {
                        g(privacyLetterModel);
                    }
                }
            } catch (Exception e6) {
                e6.printStackTrace();
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void showPrivacyLetterWithId(String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 235483, new Class[]{String.class}, Void.TYPE).isSupported && !TextUtils.isEmpty(str)) {
            ew0.a aVar = ew0.a.f32059a;
            c cVar = new c(ServiceManager.e());
            if (!PatchProxy.proxy(new Object[]{str, cVar}, aVar, ew0.a.changeQuickRedirect, false, 235460, new Class[]{String.class, s.class}, Void.TYPE).isSupported) {
                j.doRequest(((NoticeService) j.getJavaApi(NoticeService.class)).getPreviewPrivacyLetter(str), cVar);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void showPrivacyLetterWithParams(String str, String str2, String str3, String str4, String str5, boolean z) {
        if (!PatchProxy.proxy(new Object[]{str, str2, str3, str4, str5, new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 235484, new Class[]{String.class, String.class, String.class, String.class, String.class, Boolean.TYPE}, Void.TYPE).isSupported) {
            PrivacyLetterModel privacyLetterModel = new PrivacyLetterModel();
            privacyLetterModel.routerUrl = str5;
            privacyLetterModel.content = str3;
            privacyLetterModel.title = str2;
            privacyLetterModel.iconUrl = str;
            privacyLetterModel.tagUrl = str4;
            if (z) {
                privacyLetterModel.type = "alive";
                privacyLetterModel.originId = "-1";
            } else {
                privacyLetterModel.type = "img";
            }
            new PrivacyLetterManager().d(privacyLetterModel);
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public MutableLiveData<String> whiteListNoticeModel() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 235497, new Class[0], MutableLiveData.class);
        if (proxy.isSupported) {
            return (MutableLiveData) proxy.result;
        }
        if (this.f20696a == null) {
            this.f20696a = new MutableLiveData<>();
        }
        return this.f20696a;
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void getNoticePushTip(String str, String str2, INoticeService.PushTipCallback pushTipCallback) {
        if (!PatchProxy.proxy(new Object[]{str, str2, pushTipCallback}, this, changeQuickRedirect, false, 235495, new Class[]{String.class, String.class, INoticeService.PushTipCallback.class}, Void.TYPE).isSupported) {
            ew0.a aVar = ew0.a.f32059a;
            d dVar = new d(this, pushTipCallback);
            if (!PatchProxy.proxy(new Object[]{str, str2, dVar}, aVar, ew0.a.changeQuickRedirect, false, 235464, new Class[]{String.class, String.class, s.class}, Void.TYPE).isSupported) {
                HashMap j = a01.a.j("source", str, "style", str2);
                j.put("uid", ServiceManager.d().getUserId());
                j.doRequest(((NoticeService) j.getJavaGoApi(NoticeService.class)).getPushSwitchTip(rd.g.a(ParamsBuilder.newParams().addParams(j))), dVar);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void handlerNotice(Activity activity, Parcelable parcelable, String str, long j) {
        if (!PatchProxy.proxy(new Object[]{activity, parcelable, str, new Long(j)}, this, changeQuickRedirect, false, 235478, new Class[]{Activity.class, Parcelable.class, String.class, Long.TYPE}, Void.TYPE).isSupported && parcelable != null && activity != null) {
            NoticeModel noticeModel = (NoticeModel) parcelable;
            if (TextUtils.isEmpty(noticeModel.routerUrl)) {
                if (qc.b.f37325a) {
                    StringBuilder h12 = a.f.h("没有routerUrl(调试日志,不是bug)::");
                    h12.append(noticeModel.routerUrl);
                    fo.a.m(h12.toString(), new Object[0]);
                }
                c(activity, noticeModel, str);
            } else if (u91.e.d(activity, noticeModel.routerUrl, new b(this, j, noticeModel))) {
                HashMap hashMap = new HashMap();
                hashMap.put("pushURL", noticeModel.routerUrl);
                hashMap.put("taskId", noticeModel.f26260od);
                qf1.a.A("100400", "1", "1", hashMap);
            } else {
                if (qc.b.f37325a) {
                    StringBuilder h13 = a.f.h("没有routerUrl(调试日志,不是bug)::");
                    h13.append(noticeModel.routerUrl);
                    fo.a.m(h13.toString(), new Object[0]);
                }
                c(activity, noticeModel, str);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void showPrivacyLetter(Activity activity, String str) {
        PrivacyLetterModel privacyLetterModel;
        if (!PatchProxy.proxy(new Object[]{activity, str}, this, changeQuickRedirect, false, 235482, new Class[]{Activity.class, String.class}, Void.TYPE).isSupported && (privacyLetterModel = (PrivacyLetterModel) nd.e.f(str, PrivacyLetterModel.class)) != null) {
            long j = privacyLetterModel.startTime;
            long currentTimeMillis = (System.currentTimeMillis() / 1000) - j;
            if (privacyLetterModel.endTime <= 0) {
                privacyLetterModel.endTime = j + 15;
            }
            int i = 5;
            int i3 = privacyLetterModel.delayTime;
            if (i3 > 0) {
                i = i3;
            }
            if (System.currentTimeMillis() / 1000 > privacyLetterModel.endTime) {
                ew0.a.f32059a.m(privacyLetterModel.originId, "stationFail", "notify");
                return;
            }
            long j12 = (long) i;
            if (currentTimeMillis < j12) {
                q.d(new cc.c(this, activity, privacyLetterModel, 2), (j12 - currentTimeMillis) * 1000);
            } else {
                d(activity, privacyLetterModel);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void showPrivacyLetterWithParams(String str, String str2, String str3, String str4, String str5, boolean z, String str6) {
        if (!PatchProxy.proxy(new Object[]{str, str2, str3, str4, str5, new Byte(z ? (byte) 1 : 0), str6}, this, changeQuickRedirect, false, 235485, new Class[]{String.class, String.class, String.class, String.class, String.class, Boolean.TYPE, String.class}, Void.TYPE).isSupported) {
            PrivacyLetterModel privacyLetterModel = new PrivacyLetterModel();
            privacyLetterModel.routerUrl = str5;
            privacyLetterModel.content = str3;
            privacyLetterModel.title = str2;
            privacyLetterModel.iconUrl = str;
            privacyLetterModel.tagUrl = str4;
            if (z) {
                privacyLetterModel.type = "alive";
            } else {
                privacyLetterModel.type = "img";
            }
            privacyLetterModel.originId = str6;
            new PrivacyLetterManager().d(privacyLetterModel);
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void showPrivacyLetterWithParams(String str, String str2, String str3, String str4, String str5, boolean z, View.OnClickListener onClickListener) {
        if (!PatchProxy.proxy(new Object[]{str, str2, str3, str4, str5, new Byte(z ? (byte) 1 : 0), onClickListener}, this, changeQuickRedirect, false, 235486, new Class[]{String.class, String.class, String.class, String.class, String.class, Boolean.TYPE, View.OnClickListener.class}, Void.TYPE).isSupported) {
            PrivacyLetterModel privacyLetterModel = new PrivacyLetterModel();
            privacyLetterModel.routerUrl = str5;
            privacyLetterModel.content = str3;
            privacyLetterModel.title = str2;
            privacyLetterModel.iconUrl = str;
            privacyLetterModel.tagUrl = str4;
            if (z) {
                privacyLetterModel.type = "alive";
                privacyLetterModel.originId = "-1";
            } else {
                privacyLetterModel.type = "img";
            }
            PrivacyLetterManager privacyLetterManager = new PrivacyLetterManager();
            privacyLetterManager.c(onClickListener);
            privacyLetterManager.d(privacyLetterModel);
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.INoticeService
    public void showPrivacyLetterWithParams(String str, String str2, String str3, String str4, String str5, boolean z, String str6, View.OnClickListener onClickListener) {
        if (!PatchProxy.proxy(new Object[]{str, str2, str3, str4, str5, new Byte(z ? (byte) 1 : 0), str6, onClickListener}, this, changeQuickRedirect, false, 235487, new Class[]{String.class, String.class, String.class, String.class, String.class, Boolean.TYPE, String.class, View.OnClickListener.class}, Void.TYPE).isSupported) {
            PrivacyLetterModel privacyLetterModel = new PrivacyLetterModel();
            privacyLetterModel.routerUrl = str5;
            privacyLetterModel.content = str3;
            privacyLetterModel.title = str2;
            privacyLetterModel.iconUrl = str;
            privacyLetterModel.tagUrl = str4;
            privacyLetterModel.extraData = str6;
            if (z) {
                privacyLetterModel.type = "alive";
                privacyLetterModel.originId = "-1";
            } else {
                privacyLetterModel.type = "img";
            }
            PrivacyLetterManager privacyLetterManager = new PrivacyLetterManager();
            privacyLetterManager.c(onClickListener);
            privacyLetterManager.d(privacyLetterModel);
        }
    }
}